Class OperationGenerator
java.lang.Object
org.tentackle.buildsupport.codegen.AbstractGenerator
org.tentackle.maven.plugin.wizard.AbstractValidateableGenerator
org.tentackle.maven.plugin.wizard.OperationGenerator
- All Implemented Interfaces:
org.tentackle.validate.ScopeConfigurator,org.tentackle.validate.Validateable
Generator for the operation files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.tentackle.validate.ValidationResult> generate()Creates the operation files.Gets the name of the parent domain class.Gets the name of the parent domain interface.Gets the name of the parent operation interface.Gets the name of the parent persistence class.Gets the name of the parent persistence interface.voidbooleanbooleanbooleanbooleanvoidsetAbstractOperation(boolean abstractOperation) voidsetDomainImplementation(String domainImplementation) voidsetDomainInterface(String domainInterface) voidsetLongDescription(String longDescription) voidsetOperationName(String operationName) voidsetPersistenceImplementation(String persistenceImplementation) voidsetPersistenceInterface(String persistenceInterface) voidsetProfile(OperationProfile profile) voidsetRemoteEnabled(boolean remoteEnabled) voidsetShortDescription(String shortDescription) voidsetSuperOperationName(String superOperationName) Methods inherited from class org.tentackle.maven.plugin.wizard.AbstractValidateableGenerator
getDefaultScopesMethods inherited from class org.tentackle.buildsupport.codegen.AbstractGenerator
createFreemarkerConfiguration, getTemplateDirectory, setTemplateDirectoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tentackle.validate.Validateable
validate
-
Constructor Details
-
OperationGenerator
public OperationGenerator()
-
-
Method Details
-
generate
public List<org.tentackle.validate.ValidationResult> generate() throws IOException, freemarker.template.TemplateExceptionCreates the operation files.- Returns:
- the validation results, empty if okay, never null
- Throws:
IOException- if file creation failedfreemarker.template.TemplateException- if code generation failed
-
initializeRemoteDefault
public void initializeRemoteDefault() -
isDomainValid
public boolean isDomainValid() -
isPersistenceValid
public boolean isPersistenceValid() -
getProfile
-
setProfile
-
getOperationName
-
setOperationName
-
getSuperOperationName
-
setSuperOperationName
-
isAbstractOperation
@Bindable public boolean isAbstractOperation() -
setAbstractOperation
@Bindable public void setAbstractOperation(boolean abstractOperation) -
getShortDescription
-
setShortDescription
-
getLongDescription
-
setLongDescription
-
getDomainInterface
@Bindable @NotNull(message="missing domain interface", condition="!$isPersistenceValid") public String getDomainInterface() -
setDomainInterface
-
getPersistenceInterface
@Bindable @NotNull(message="missing persistence interface", condition="!$isDomainValid") public String getPersistenceInterface() -
setPersistenceInterface
-
getDomainImplementation
-
setDomainImplementation
-
getPersistenceImplementation
-
setPersistenceImplementation
-
isRemoteEnabled
@Bindable @Changeable(condition="$isPersistenceValid") public boolean isRemoteEnabled() -
setRemoteEnabled
@Bindable public void setRemoteEnabled(boolean remoteEnabled) -
getSuperOperationInterface
Gets the name of the parent operation interface.- Returns:
- the super interface
-
getSuperDomainInterface
Gets the name of the parent domain interface.- Returns:
- the super domain interface
-
getSuperPersistenceInterface
Gets the name of the parent persistence interface.- Returns:
- the super persistence interface
-
getSuperDomainImplementation
Gets the name of the parent domain class.- Returns:
- the super domain class
-
getSuperPersistenceImplementation
Gets the name of the parent persistence class.- Returns:
- the super persistence class
-