Module org.tentackle.fx.rdc
Package org.tentackle.fx.rdc
Class PdoEditor<T extends org.tentackle.pdo.PersistentDomainObject<T>>
- java.lang.Object
-
- org.tentackle.fx.AbstractFxController
-
- org.tentackle.fx.rdc.PdoEditor<T>
-
- Type Parameters:
T- the pdo type
- All Implemented Interfaces:
org.tentackle.fx.FxController,org.tentackle.pdo.DomainContextProvider,org.tentackle.pdo.PdoHolder<T>,org.tentackle.validate.ScopeConfigurator
- Direct Known Subclasses:
DefaultPdoEditor,SecurityEditor
public abstract class PdoEditor<T extends org.tentackle.pdo.PersistentDomainObject<T>> extends org.tentackle.fx.AbstractFxController implements org.tentackle.pdo.PdoHolder<T>, org.tentackle.pdo.DomainContextProviderFxController to edit a PDO.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description PdoEditor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.tentackle.pdo.DomainContextgetDomainContext()java.util.TreeSet<org.tentackle.validate.ValidationMapper>getValidationMappers()Gets the validation mappers to map the validation results to the controls.booleanisChangeable()Get the changeable property of the editor's view.booleanisEditAllowed()Returns whether the user has sufficient permissions to edit the PDO.booleanisNewAllowed()Returns whether the user is allowed to create a new PDO.booleanisRemoveAllowed()Returns whether the user is allowed to edit the PDO and the PDO is removable.booleanisViewAllowed()Returns whether the user has sufficient permissions to view the PDO.voidprint()Prints the current PDO.abstract voidrequestInitialFocus()Requests the initial focus after stage is shown.voidsetChangeable(boolean changeable)Set the changeable property of the editor's view.booleanvalidateForm()Validates the form before the PDO get saved.
This can be used for validations that are not covered by the persistence model, for example password confirmation.-
Methods inherited from class org.tentackle.fx.AbstractFxController
configure, createBinder, getBinder, getContainer, getDefaultScopes, getFXMLFields, getFXMLMethods, getStage, getView, setView, validateInjections
-
-
-
-
Method Detail
-
requestInitialFocus
public abstract void requestInitialFocus()
Requests the initial focus after stage is shown.
-
getDomainContext
public org.tentackle.pdo.DomainContext getDomainContext()
- Specified by:
getDomainContextin interfaceorg.tentackle.pdo.DomainContextProvider
-
isViewAllowed
public boolean isViewAllowed()
Returns whether the user has sufficient permissions to view the PDO.- Returns:
- true if allowed
-
isEditAllowed
public boolean isEditAllowed()
Returns whether the user has sufficient permissions to edit the PDO.- Returns:
- true if allowed
-
isRemoveAllowed
public boolean isRemoveAllowed()
Returns whether the user is allowed to edit the PDO and the PDO is removable.- Returns:
- true if remove allowed
-
isNewAllowed
public boolean isNewAllowed()
Returns whether the user is allowed to create a new PDO.- Returns:
- true if creation allowed
-
getValidationMappers
public java.util.TreeSet<org.tentackle.validate.ValidationMapper> getValidationMappers()
Gets the validation mappers to map the validation results to the controls.- Returns:
- the mappers, null if none
-
validateForm
public boolean validateForm()
Validates the form before the PDO get saved.
This can be used for validations that are not covered by the persistence model, for example password confirmation.- Returns:
- true if ok
-
print
public void print()
Prints the current PDO.
-
setChangeable
public void setChangeable(boolean changeable)
Set the changeable property of the editor's view.- Parameters:
changeable- true if changeable
-
isChangeable
public boolean isChangeable()
Get the changeable property of the editor's view.- Returns:
- true if changeable
-
-