Package com.priint.pubserver.config
Enum PluginConfigDependencyRestriction
- java.lang.Object
-
- java.lang.Enum<PluginConfigDependencyRestriction>
-
- com.priint.pubserver.config.PluginConfigDependencyRestriction
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PluginConfigDependencyRestriction>
public enum PluginConfigDependencyRestriction extends java.lang.Enum<PluginConfigDependencyRestriction>
Java class for PluginConfigDependencyRestriction.
<simpleType name="PluginConfigDependencyRestriction"> <restriction base="{http://www.w3.org/2001/XMLSchema}string"> <enumeration value="UNDEFINED"/> <enumeration value="OPTIONAL"/> <enumeration value="PARENT"/> <enumeration value="CONFIRM"/> <enumeration value="CHILD"/> <enumeration value="SIBLING"/> <enumeration value="TWIN"/> <enumeration value="REQUIRES"/> <enumeration value="REQUIRED_BY"/> </restriction> </simpleType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CHILDJust like TWIN, dependent files must be copied, moved or deleted alongside the actual file.CONFIRMWhen copying, moving or deleting configuration files, the application (or user) can choose whether to cancel the operation or to copy, move or delete dependent files too.OPTIONALWhen copying, moving or deleting configuration files, dependent files will NOT be copied, moved or deletedPARENTWhen copying, moving or deleting configuration files, dependent files WILL be copied, moved or deletedREQUIRED_BYThe source configuration is required by the target configuration.REQUIRESThe source configuration requires the existence of the target configuration.SIBLINGApplication knows of a relation between two configurations but will not enforce any operation when copying, moving or deleting configuration files.TWINDependent files must be copied, moved or deleted alongside the actual file.UNDEFINEDDependency restrictions must never be UNDEFINED, this is just to have a (non null) default value when instantiating using the default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PluginConfigDependencyRestrictionfromValue(java.lang.String value)Get enum value by string.
May throw exception if enum value is unknown.PluginConfigDependencyRestrictiongetBackwardRestriction()booleanisDeleteDependencyForbidden()The target dependency cannot be deleted.booleanisDeleteForbidden()The source of this dependency is not allowed to be deleted until the target is also deleted.booleanmustDeleteDependency()If the source of this dependency is deleted the dependency on the target is also deleted.booleanmustDeleteTarget()If the source of this dependency is deleted the target is also deleted.java.lang.Stringvalue()static PluginConfigDependencyRestrictionvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static PluginConfigDependencyRestriction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNDEFINED
public static final PluginConfigDependencyRestriction UNDEFINED
Dependency restrictions must never be UNDEFINED, this is just to have a (non null) default value when instantiating using the default constructor
-
REQUIRES
public static final PluginConfigDependencyRestriction REQUIRES
The source configuration requires the existence of the target configuration.
The source can only be imported if the target is also imported or already existing.
If the source is exported the target will also be exported
The target configuration must include a REQUIRED_BY restriction to the source.When copying or deleting configuration files, dependency references will also be copied or deleted.
-
REQUIRED_BY
public static final PluginConfigDependencyRestriction REQUIRED_BY
The source configuration is required by the target configuration.
The target configuration must include a REQUIRES restriction to the source.
-
OPTIONAL
public static final PluginConfigDependencyRestriction OPTIONAL
When copying, moving or deleting configuration files, dependent files will NOT be copied, moved or deleted
-
PARENT
public static final PluginConfigDependencyRestriction PARENT
When copying, moving or deleting configuration files, dependent files WILL be copied, moved or deleted
-
CONFIRM
public static final PluginConfigDependencyRestriction CONFIRM
When copying, moving or deleting configuration files, the application (or user) can choose whether to cancel the operation or to copy, move or delete dependent files too.
-
CHILD
public static final PluginConfigDependencyRestriction CHILD
Just like TWIN, dependent files must be copied, moved or deleted alongside the actual file. Unlike MANDATORY, CHILD indicates, that the dependent file cannot exist without the actual file. Though applications are not required to handle CHILD dependencies any other way than TWIN, CHILD should be used for declarative for "part-of" relationships.
-
SIBLING
public static final PluginConfigDependencyRestriction SIBLING
Application knows of a relation between two configurations but will not enforce any operation when copying, moving or deleting configuration files.
-
TWIN
public static final PluginConfigDependencyRestriction TWIN
Dependent files must be copied, moved or deleted alongside the actual file.
-
-
Method Detail
-
values
public static PluginConfigDependencyRestriction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PluginConfigDependencyRestriction c : PluginConfigDependencyRestriction.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PluginConfigDependencyRestriction valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
value
public java.lang.String value()
- Returns:
- the name of the enum value
-
fromValue
public static PluginConfigDependencyRestriction fromValue(java.lang.String value)
Get enum value by string.
May throw exception if enum value is unknown.- Parameters:
value-- Returns:
- value
-
mustDeleteTarget
public boolean mustDeleteTarget()
If the source of this dependency is deleted the target is also deleted.- Returns:
- true if mustDeleteTarget
-
mustDeleteDependency
public boolean mustDeleteDependency()
If the source of this dependency is deleted the dependency on the target is also deleted.- Returns:
- true if mustDeleteDependency
-
isDeleteForbidden
public boolean isDeleteForbidden()
The source of this dependency is not allowed to be deleted until the target is also deleted.- Returns:
- true if isDeleteForbidden
-
isDeleteDependencyForbidden
public boolean isDeleteDependencyForbidden()
The target dependency cannot be deleted. The target must be modified directly to remove this dependency (as source dependency).- Returns:
- true if isDeleteDependencyForbidden
-
getBackwardRestriction
public PluginConfigDependencyRestriction getBackwardRestriction()
-
-