Interface GenerateTask
- All Superinterfaces:
ScheduleTask
Generation task.
- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static enum
Source used for generating.static enum
The condition the generate task should be marked as "finished successful"static enum
The generationType
used for this generate task -
Method Summary
Modifier and TypeMethodDescriptioncreateEntityEntry
(long entityId, long pageRefId) Create an entry which may be added to theentitystart node list
.Get available url creators.boolean
true
if execution should be canceled if there are no changes,false
otherwise.boolean
Should a tagged repository revision be created for this generation.boolean
true
if media files should be created,false
otherwise.boolean
true
if directory should be deleted before generation,false
otherwiseReturns a modifyable Collection of entity start nodes.long
Returns the threshold of errors until generation should be canceledboolean
getGenerateFlag
(Language language, TemplateSet templateSet) Get the generate flag for a specific language/template set combination.Get a list of language/template set combinations which should be generated.@NotNull GenerateTask.GenerationSource
Get the generation source state.@NotNull List<IDProvider>
Returns a modifyable list of start nodes for apartial
generate.boolean
true
if the startnodes are definable by the user,false
otherwise (default)@NotNull GenerateTask.Type
getType()
The generationtype
GenerateTask
Deprecated.@NotNull UrlCreatorSpecification
Get the url creator setting.The url prefixA set of variables set for thisGenerateTask
long
Returns the threshold of warnings until generation should be canceled.void
removeVariable
(@NotNull String name) Removes a variable having the given name.void
setCancelScheduleWhenNoChanges
(boolean value) Providetrue
if execution should be canceled if there are no changes,false
otherwisevoid
setCreateGenerateTag
(boolean createTag) Should a tagged repository revision be created for this generation.void
setCreateMediaFiles
(boolean value) Providetrue
if media files should be created,false
otherwise.void
setDeleteDirectory
(boolean value) Providetrue
if directory should be deleted before generation,false
otherwisevoid
setErrorThreshold
(long value) Provide the threshold of errors until generation should be canceled.void
setGenerateFlag
(Language language, TemplateSet templateSet, boolean generate) Set the generate flag for a specific language/template set combination.void
setGenerationSource
(@NotNull GenerateTask.GenerationSource value) Set the source version to use for generation.void
setStartnodesDefinableByUser
(boolean value) Providetrue
if the startnodes should be definable by the user,false
otherwise (default).void
Provide aSuccessCondition
void
setType
(@NotNull GenerateTask.Type type) Provide theType
GenerateTask
.void
setUrlCreatorClassName
(String value) Deprecated.since 5.0 - usesetUrlCreatorSpecification(UrlCreatorSpecification)
.void
setUrlCreatorSpecification
(@NotNull UrlCreatorSpecification value) Set the url creator specifiaction.void
setUrlPrefix
(String value) Provide the url prefixvoid
setUseAclDb
(boolean value) Set Access Control databse usage.void
setVariable
(@NotNull String name, @Nullable String value) Sets a value to a variable with the given name.void
setWarningThreshold
(long value) Set the threshold of warnings until generation should be canceled.boolean
useAclDb()
Should the Access Control databse be used.Methods inherited from interface de.espirit.firstspirit.access.schedule.ScheduleTask
checkParams, getClusterNodeName, getDescription, getExecuteInFault, getExecuteParallel, getName, getRemoteTaskType, getScheduleEntry, getTemplate, hasTemplate, isActive, isExecuteOnClusterNode, isProjectTask, setActive, setClusterNodeName, setDescription, setExecuteInFault, setExecuteOnClusterNode, setExecuteParallel, setName, setTemplate, test
-
Method Details
-
getType
The generationtype
GenerateTask
- Since:
- 4.0
-
setType
Provide theType
GenerateTask
.- Parameters:
type
- the
used for thisType
GenerateTask
- Since:
- 4.0
-
getVariables
A set of variables set for thisGenerateTask
- Since:
- 4.0
-
setVariable
Sets a value to a variable with the given name.- Parameters:
name
- The variable's name.value
- The value to set.- Since:
- 4.0
-
removeVariable
Removes a variable having the given name.- Parameters:
name
- The variable's name.- Since:
- 4.0
-
getStartnodesDefinableByUser
boolean getStartnodesDefinableByUser()true
if the startnodes are definable by the user,false
otherwise (default)- Since:
- 4.0
-
setStartnodesDefinableByUser
void setStartnodesDefinableByUser(boolean value) Providetrue
if the startnodes should be definable by the user,false
otherwise (default).- Parameters:
value
-true
if the startnodes should be definable by the user,false
otherwise (default)- Since:
- 4.0
-
getStartNodes
Returns a modifyable list of start nodes for apartial
generate.You may
clear
the list,add
, andremove
elements.Only elements ofStore.Type#SITESTORE
andStore.Type#MEDIASTORE
can be added.- Returns:
- A modifyable list of start nodes, containing e.g.
page refs
ormedia nodes
. - Since:
- 4.0
-
getCreateMediaFiles
boolean getCreateMediaFiles()true
if media files should be created,false
otherwise.- Since:
- 4.0
-
setCreateMediaFiles
void setCreateMediaFiles(boolean value) Providetrue
if media files should be created,false
otherwise.- Parameters:
value
-true
if media files should be created,false
otherwise.- Since:
- 4.0
-
getUrlCreatorClassName
Deprecated.since 5.0 - usegetUrlCreatorSpecification()
.The url creator class name- Since:
- 4.0
-
setUrlCreatorClassName
Deprecated.since 5.0 - usesetUrlCreatorSpecification(UrlCreatorSpecification)
.Provide the url creator class name.- Parameters:
value
- The url creator class name- Since:
- 4.0
-
getUrlCreatorSpecification
Get the url creator setting.- Returns:
- The current url creator specification.
- Throws:
IllegalStateException
- If the specification could not be loaded.- Since:
- 5.0
- See Also:
-
setUrlCreatorSpecification
Set the url creator specifiaction.- Parameters:
value
- the new url creator specification- Since:
- 5.0
- See Also:
-
getAvailableUrlCreatorSpecifications
List<UrlCreatorSpecification> getAvailableUrlCreatorSpecifications()Get available url creators.- Returns:
- List of available url creator specifications
- Since:
- 5.0
- See Also:
-
getCancelScheduleWhenNoChanges
boolean getCancelScheduleWhenNoChanges()true
if execution should be canceled if there are no changes,false
otherwise.- Since:
- 4.0
-
setCancelScheduleWhenNoChanges
void setCancelScheduleWhenNoChanges(boolean value) Providetrue
if execution should be canceled if there are no changes,false
otherwise- Parameters:
value
-true
if execution should be canceled if there are no changes,false
otherwise- Since:
- 4.0
-
getDeleteDirectory
boolean getDeleteDirectory()true
if directory should be deleted before generation,false
otherwise- Since:
- 4.0
-
setDeleteDirectory
void setDeleteDirectory(boolean value) Providetrue
if directory should be deleted before generation,false
otherwise- Parameters:
value
-true
if directory should be deleted before generation,false
otherwise- Since:
- 4.0
-
getUrlPrefix
String getUrlPrefix()The url prefix- Since:
- 4.0
-
setUrlPrefix
Provide the url prefix- Parameters:
value
- the url prefix- Since:
- 4.0
-
getSuccessCondition
GenerateTask.SuccessCondition getSuccessCondition()- Since:
- 4.0.120
-
setSuccessCondition
Provide aSuccessCondition
- Since:
- 4.0.120
-
getErrorThreshold
long getErrorThreshold()Returns the threshold of errors until generation should be canceled- Since:
- 4.0
- See Also:
-
setErrorThreshold
void setErrorThreshold(long value) Provide the threshold of errors until generation should be canceled.- Parameters:
value
- the threshold of errors until generation should be canceled- Since:
- 4.0
- See Also:
-
getWarningThreshold
long getWarningThreshold()Returns the threshold of warnings until generation should be canceled.- Since:
- 4.0
- See Also:
-
setWarningThreshold
void setWarningThreshold(long value) Set the threshold of warnings until generation should be canceled.- Parameters:
value
- the threshold of warnings until generation should be canceled- Since:
- 4.0
- See Also:
-
setGenerateFlag
Set the generate flag for a specific language/template set combination. -
getGenerateFlag
Get the generate flag for a specific language/template set combination. -
getGenerateList
List<Pair<Language,TemplateSet>> getGenerateList()Get a list of language/template set combinations which should be generated. -
useAclDb
boolean useAclDb()Should the Access Control databse be used.- Since:
- 4.1
-
setUseAclDb
void setUseAclDb(boolean value) Set Access Control databse usage.- Since:
- 4.1
-
setCreateGenerateTag
void setCreateGenerateTag(boolean createTag) Should a tagged repository revision be created for this generation. If set tofalse
no taggedrepository revision will be created.- Parameters:
createTag
-true
if a tag should be generated- Since:
- 4.2.402
-
getCreateGenerateTag
boolean getCreateGenerateTag()Should a tagged repository revision be created for this generation. Default value istrue
.- Returns:
true
if a tag should be generated- Since:
- 4.2.402
-
createEntityEntry
Create an entry which may be added to theentitystart node list
. This is only possible forentities
with numeric keys(entity.getKeyValue()
.getValue(0)
instanceofNumber
- Since:
- 5.0.4
- See Also:
-
getEntityStartNodes
Collection<GenerateTask.EntityEntry> getEntityStartNodes()Returns a modifyable Collection of entity start nodes. Forpartial
generations all thesecombinations (ofEntity
andPageRef
) will be generated.You may
clear
the collection,add
, andremove
elements.Warning: There is no persistence for this Collection. Initially this list is empty. If elements are added during a client session these elements will remain in the list until you call
clear()
. So to be safe you should always clear the list first.- Returns:
- A modifiable collection of
entity entries
. - Since:
- 5.0.4
- See Also:
-
getGenerationSource
Get the generation source state. Default value isGenerateTask.GenerationSource.RELEASE
for projects supportingrelease,GenerateTask.GenerationSource.CURRENT
otherwise.- Returns:
- The generation source state (never
null
). - Since:
- 5.2.1503
- See Also:
-
setGenerationSource
Set the source version to use for generation.- Parameters:
value
- New generation source state (nevernull
).- Since:
- 5.2.1503
- See Also:
-
getUrlCreatorSpecification()
.