Interface GenerateTask
- All Superinterfaces:
ScheduleTask
Generation task.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic enumSource used for generating.static enumThe condition the generate task should be marked as "finished successful"static enumThe generationTypeused for this generate task -
Method Summary
Modifier and TypeMethodDescriptioncreateEntityEntry(long entityId, long pageRefId) Create an entry which may be added to theentity start node list.Get available url creators.booleantrueif execution should be canceled if there are no changes,falseotherwise.booleanShould a tagged repository revision be created for this generation.booleantrueif media files should be created,falseotherwise.booleantrueif directory should be deleted before generation,falseotherwiseReturns a modifyable Collection of entity start nodes.longReturns the threshold of errors until generation should be canceledbooleangetGenerateFlag(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.GenerationSourceGet the generation source state.@NotNull List<IDProvider>Returns a modifyable list of start nodes for apartialgenerate.booleantrueif the startnodes are definable by the user,falseotherwise (default)@NotNull GenerateTask.TypegetType()The generationused for thistypeGenerateTaskDeprecated.@NotNull UrlCreatorSpecificationGet the url creator setting.The url prefixA set of variables set for thisGenerateTasklongReturns the threshold of warnings until generation should be canceled.voidremoveVariable(@NotNull String name) Removes a variable having the given name.voidsetCancelScheduleWhenNoChanges(boolean value) Providetrueif execution should be canceled if there are no changes,falseotherwisevoidsetCreateGenerateTag(boolean createTag) Should a tagged repository revision be created for this generation.voidsetCreateMediaFiles(boolean value) Providetrueif media files should be created,falseotherwise.voidsetDeleteDirectory(boolean value) Providetrueif directory should be deleted before generation,falseotherwisevoidsetErrorThreshold(long value) Provide the threshold of errors until generation should be canceled.voidsetGenerateFlag(Language language, TemplateSet templateSet, boolean generate) Set the generate flag for a specific language/template set combination.voidsetGenerationSource(@NotNull GenerateTask.GenerationSource value) Set the source version to use for generation.voidsetStartnodesDefinableByUser(boolean value) Providetrueif the startnodes should be definable by the user,falseotherwise (default).voidProvide aSuccessConditionvoidsetType(@NotNull GenerateTask.Type type) Provide theused for thisTypeGenerateTask.voidsetUrlCreatorClassName(String value) Deprecated.since 5.0 - usesetUrlCreatorSpecification(UrlCreatorSpecification).voidsetUrlCreatorSpecification(@NotNull UrlCreatorSpecification value) Set the url creator specifiaction.voidsetUrlPrefix(String value) Provide the url prefixvoidsetUseAclDb(boolean value) Set Access Control databse usage.voidsetVariable(@NotNull String name, @Nullable String value) Sets a value to a variable with the given name.voidsetWarningThreshold(long value) Set the threshold of warnings until generation should be canceled.booleanuseAclDb()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 generationused for thistypeGenerateTask- Since:
- 4.0
-
setType
Provide theused for thisTypeGenerateTask.- Parameters:
type- theused for thisTypeGenerateTask- 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()trueif the startnodes are definable by the user,falseotherwise (default)- Since:
- 4.0
-
setStartnodesDefinableByUser
void setStartnodesDefinableByUser(boolean value) Providetrueif the startnodes should be definable by the user,falseotherwise (default).- Parameters:
value-trueif the startnodes should be definable by the user,falseotherwise (default)- Since:
- 4.0
-
getStartNodes
Returns a modifyable list of start nodes for apartialgenerate.You may
clearthe list,add, andremoveelements. Only elements ofStore.Type#SITESTOREandStore.Type#MEDIASTOREcan be added.- Returns:
- A modifyable list of start nodes, containing e.g.
page refsormedia nodes. - Since:
- 4.0
-
getCreateMediaFiles
boolean getCreateMediaFiles()trueif media files should be created,falseotherwise.- Since:
- 4.0
-
setCreateMediaFiles
void setCreateMediaFiles(boolean value) Providetrueif media files should be created,falseotherwise.- Parameters:
value-trueif media files should be created,falseotherwise.- 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()trueif execution should be canceled if there are no changes,falseotherwise.- Since:
- 4.0
-
setCancelScheduleWhenNoChanges
void setCancelScheduleWhenNoChanges(boolean value) Providetrueif execution should be canceled if there are no changes,falseotherwise- Parameters:
value-trueif execution should be canceled if there are no changes,falseotherwise- Since:
- 4.0
-
getDeleteDirectory
boolean getDeleteDirectory()trueif directory should be deleted before generation,falseotherwise- Since:
- 4.0
-
setDeleteDirectory
void setDeleteDirectory(boolean value) Providetrueif directory should be deleted before generation,falseotherwise- Parameters:
value-trueif directory should be deleted before generation,falseotherwise- 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 tofalseno tagged repository revision will be created.- Parameters:
createTag-trueif 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:
trueif a tag should be generated- Since:
- 4.2.402
-
createEntityEntry
Create an entry which may be added to theentity start node list. This is only possible forentitieswith 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. Forpartialgenerations all these combinations (ofEntityandPageRef) will be generated.You may
clearthe collection,add, andremoveelements.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.RELEASEfor projects supporting release,GenerateTask.GenerationSource.CURRENTotherwise.- 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().