Class OperationGenerator
- java.lang.Object
-
- org.tentackle.maven.AbstractGenerator
-
- org.tentackle.maven.plugin.wizard.AbstractValidateableGenerator
-
- org.tentackle.maven.plugin.wizard.OperationGenerator
-
- All Implemented Interfaces:
org.tentackle.validate.ScopeConfigurator,org.tentackle.validate.Validateable
public class OperationGenerator extends AbstractValidateableGenerator
Generator for the operation files.
-
-
Constructor Summary
Constructors Constructor Description OperationGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.tentackle.validate.ValidationResult>generate()Creates the operation files.java.lang.StringgetDomainImplementation()java.lang.StringgetDomainInterface()java.lang.StringgetLongDescription()java.lang.StringgetOperationName()java.lang.StringgetPersistenceImplementation()java.lang.StringgetPersistenceInterface()OperationProfilegetProfile()java.lang.StringgetShortDescription()java.lang.StringgetSuperDomainImplementation()Gets the name of the parent domain class.java.lang.StringgetSuperDomainInterface()Gets the name of the parent domain interface.java.lang.StringgetSuperOperationInterface()Gets the name of the parent operation interface.java.lang.StringgetSuperOperationName()java.lang.StringgetSuperPersistenceImplementation()Gets the name of the parent persistence class.java.lang.StringgetSuperPersistenceInterface()Gets the name of the parent persistence interface.booleanisAbstractOperation()booleanisDomainValid()booleanisPersistenceValid()booleanisRemoteEnabled()voidsetAbstractOperation(boolean abstractOperation)voidsetDomainImplementation(java.lang.String domainImplementation)voidsetDomainInterface(java.lang.String domainInterface)voidsetLongDescription(java.lang.String longDescription)voidsetOperationName(java.lang.String operationName)voidsetPersistenceImplementation(java.lang.String persistenceImplementation)voidsetPersistenceInterface(java.lang.String persistenceInterface)voidsetProfile(OperationProfile profile)voidsetRemoteEnabled(boolean remoteEnabled)voidsetShortDescription(java.lang.String shortDescription)voidsetSuperOperationName(java.lang.String superOperationName)-
Methods inherited from class org.tentackle.maven.plugin.wizard.AbstractValidateableGenerator
getDefaultScopes, validate
-
-
-
-
Method Detail
-
generate
public java.util.List<org.tentackle.validate.ValidationResult> generate() throws java.io.IOException, freemarker.template.TemplateExceptionCreates the operation files.- Returns:
- the validation results, empty if okay, never null
- Throws:
java.io.IOException- if file creation failedfreemarker.template.TemplateException- if code generation failed
-
isDomainValid
public boolean isDomainValid()
-
isPersistenceValid
public boolean isPersistenceValid()
-
getProfile
@Bindable @NotNull public OperationProfile getProfile()
-
setProfile
@Bindable public void setProfile(OperationProfile profile)
-
getOperationName
@Bindable @NotNull(message="missing operation name") public java.lang.String getOperationName()
-
setOperationName
@Bindable public void setOperationName(java.lang.String operationName)
-
getSuperOperationName
@Bindable public java.lang.String getSuperOperationName()
-
setSuperOperationName
@Bindable public void setSuperOperationName(java.lang.String superOperationName)
-
isAbstractOperation
@Bindable public boolean isAbstractOperation()
-
setAbstractOperation
@Bindable public void setAbstractOperation(boolean abstractOperation)
-
getShortDescription
@Bindable @NotNull(message="missing short description") public java.lang.String getShortDescription()
-
setShortDescription
@Bindable public void setShortDescription(java.lang.String shortDescription)
-
getLongDescription
@Bindable public java.lang.String getLongDescription()
-
setLongDescription
@Bindable public void setLongDescription(java.lang.String longDescription)
-
getDomainInterface
@Bindable @NotNull(message="missing domain interface", condition="!$isPersistenceValid") public java.lang.String getDomainInterface()
-
setDomainInterface
@Bindable public void setDomainInterface(java.lang.String domainInterface)
-
getPersistenceInterface
@Bindable @NotNull(message="missing persistence interface", condition="!$isDomainValid") public java.lang.String getPersistenceInterface()
-
setPersistenceInterface
@Bindable public void setPersistenceInterface(java.lang.String persistenceInterface)
-
getDomainImplementation
@Bindable @Changeable(condition="$isDomainValid") public java.lang.String getDomainImplementation()
-
setDomainImplementation
@Bindable public void setDomainImplementation(java.lang.String domainImplementation)
-
getPersistenceImplementation
@Bindable @Changeable(condition="$isPersistenceValid") public java.lang.String getPersistenceImplementation()
-
setPersistenceImplementation
@Bindable public void setPersistenceImplementation(java.lang.String persistenceImplementation)
-
isRemoteEnabled
@Bindable public boolean isRemoteEnabled()
-
setRemoteEnabled
@Bindable public void setRemoteEnabled(boolean remoteEnabled)
-
getSuperOperationInterface
public java.lang.String getSuperOperationInterface()
Gets the name of the parent operation interface.- Returns:
- the super interface
-
getSuperDomainInterface
public java.lang.String getSuperDomainInterface()
Gets the name of the parent domain interface.- Returns:
- the super domain interface
-
getSuperPersistenceInterface
public java.lang.String getSuperPersistenceInterface()
Gets the name of the parent persistence interface.- Returns:
- the super persistence interface
-
getSuperDomainImplementation
public java.lang.String getSuperDomainImplementation()
Gets the name of the parent domain class.- Returns:
- the super domain class
-
getSuperPersistenceImplementation
public java.lang.String getSuperPersistenceImplementation()
Gets the name of the parent persistence class.- Returns:
- the super persistence class
-
-