1. Project Clover database Tue Dec 20 2016 21:24:09 CET
  2. Package org.xwiki.refactoring.job

File CreateRequest.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
4
4
1
72
26
4
1
1
4
1

Classes

Class Line # Actions
CreateRequest 33 4 0% 4 0
1.0100%
 

Contributing tests

This file is covered by 10 tests. .

Source view

1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.refactoring.job;
21   
22    import java.util.Collections;
23    import java.util.List;
24   
25    import org.xwiki.model.reference.EntityReference;
26   
27    /**
28    * A job request that can be used to create a collection of entities using a specified template.
29    *
30    * @version $Id: cfc8ad7a069d6c69fb1f03f8742ec12f379991e8 $
31    * @since 7.4M2
32    */
 
33    public class CreateRequest extends EntityRequest
34    {
35    private static final long serialVersionUID = 1L;
36   
37    private static final String PROPERTY_TEMPLATE = "template";
38   
39    private static final String PROPERTY_SKIPPED_ENTITIES = "skippedEntities";
40   
41    /**
42    * @param templateReference the reference of the entity to use as template
43    */
 
44  27 toggle public void setTemplateReference(EntityReference templateReference)
45    {
46  27 this.setProperty(PROPERTY_TEMPLATE, templateReference);
47    }
48   
49    /**
50    * @return the reference of the entity to use as template
51    */
 
52  74 toggle public EntityReference getTemplateReference()
53    {
54  74 return this.getProperty(PROPERTY_TEMPLATE);
55    }
56   
57    /**
58    * @return the list of entities that are to be skipped by the job's execution
59    */
 
60  28 toggle public List<EntityReference> getSkippedEntities()
61    {
62  28 return this.getProperty(PROPERTY_SKIPPED_ENTITIES, Collections.<EntityReference>emptyList());
63    }
64   
65    /**
66    * @param skippedEntities the list of entities that to skip in the job's execution
67    */
 
68  18 toggle public void setSkippedEntities(List<EntityReference> skippedEntities)
69    {
70  18 this.setProperty(PROPERTY_SKIPPED_ENTITIES, skippedEntities);
71    }
72    }