Class AbstractStaticRelativeDisableConditions
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.model.disableconditions.AbstractStaticRelativeDisableConditions
- All Implemented Interfaces:
DisableConditions
,LogEnabled
,PluginAware
,Disposable
,Component
,Configurable
,Contextualizable
,Serviceable
- Direct Known Subclasses:
ConfigDisableConditions
,DataHolderStaticRelativeDisableConditions
,SkinDisableConditions
,UsersAndGroupsDataDisableConditions
,VoidStaticRelativeDisableConditions
public abstract class AbstractStaticRelativeDisableConditions
extends AbstractLogEnabled
implements DisableConditions, Component, Serviceable, Contextualizable, Configurable, Disposable, PluginAware
List of disable conditions
Composed by a list of sub conditions or conditions and a association operator
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.runtime.model.disableconditions.DisableConditions
DisableConditions.ASSOCIATION_TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDisableConditionComponent
(String conditionRole, Class<? extends DisableCondition> conditionClass, Configuration conditionConfiguration) Add a component of disable conditionvoid
configure
(Configuration configuration) protected String
configureDisableCondition
(Configuration conditionConfiguration) Configures the disable condition from the given configurationvoid
contextualize
(Context context) void
dispose()
Get the associationGet the conditionsprotected abstract Class
<? extends DisableCondition> Retrieves the class ofDisableCondition
to createGet the sub conditionsvoid
service
(ServiceManager manager) void
setAssociation
(DisableConditions.ASSOCIATION_TYPE associationType) Set the associationvoid
setPluginInfo
(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.runtime.model.disableconditions.DisableConditions
getExternalDisableConditions, init
-
Constructor Details
-
AbstractStaticRelativeDisableConditions
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
configureDisableCondition
protected String configureDisableCondition(Configuration conditionConfiguration) throws ConfigurationException Configures the disable condition from the given configuration- Parameters:
conditionConfiguration
- the condition's configuration- Returns:
- the role of the condition
- Throws:
ConfigurationException
- if an error occurs
-
addDisableConditionComponent
protected void addDisableConditionComponent(String conditionRole, Class<? extends DisableCondition> conditionClass, Configuration conditionConfiguration) Add a component of disable condition- Parameters:
conditionRole
- the condition's roleconditionClass
- the condition's classconditionConfiguration
- the condition's configuration
-
getRelativeDisableConditionClass
Retrieves the class ofDisableCondition
to create- Returns:
- the class of
DisableCondition
to create
-
getConditions
Description copied from interface:DisableConditions
Get the conditions- Specified by:
getConditions
in interfaceDisableConditions
- Returns:
- The list of conditions
-
getSubConditions
Description copied from interface:DisableConditions
Get the sub conditions- Specified by:
getSubConditions
in interfaceDisableConditions
- Returns:
- The list of underlying conditions
-
getAssociationType
Description copied from interface:DisableConditions
Get the association- Specified by:
getAssociationType
in interfaceDisableConditions
- Returns:
- The association
-
setAssociation
Description copied from interface:DisableConditions
Set the association- Specified by:
setAssociation
in interfaceDisableConditions
- Parameters:
associationType
- The new association between underlying conditions
-
setPluginInfo
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
dispose
- Specified by:
dispose
in interfaceDisposable
-