Class HostEffectConstraint
- java.lang.Object
-
- org.jboss.as.controller.access.constraint.AbstractConstraint
-
- org.jboss.as.controller.access.constraint.HostEffectConstraint
-
- All Implemented Interfaces:
Constraint
,ScopingConstraint
public class HostEffectConstraint extends AbstractConstraint implements Constraint, ScopingConstraint
Constraint related to whether the target resource is associated with one or more managed domain hosts.- Author:
- Brian Stansberry (c) 2013 Red Hat Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static ScopingConstraintFactory
FACTORY
-
Constructor Summary
Constructors Constructor Description HostEffectConstraint(List<String> allowed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScopingConstraintFactory
getFactory()
Get the factory that produces constraints of this typeConstraint
getOutofScopeReadConstraint()
Get a constraint that should be used for reads of resources that are outside the scope of the constraint.Constraint
getStandardConstraint()
boolean
replaces(Constraint other)
Gets whether this constraint is equivalent to and can thus replace another constraint in aManagementPermission
.void
setAllowedHosts(List<String> allowed)
boolean
violates(Constraint other, Action.ActionEffect actionEffect)
Gets whether this constraint violates another constraint
-
-
-
Field Detail
-
FACTORY
public static final ScopingConstraintFactory FACTORY
-
-
Method Detail
-
violates
public boolean violates(Constraint other, Action.ActionEffect actionEffect)
Description copied from interface:Constraint
Gets whether this constraint violates another constraint- Specified by:
violates
in interfaceConstraint
- Parameters:
other
- the other constraintactionEffect
- the effect being evaluated- Returns:
true
if the combination of constraints is a violation
-
replaces
public boolean replaces(Constraint other)
Description copied from class:AbstractConstraint
Gets whether this constraint is equivalent to and can thus replace another constraint in aManagementPermission
.This default implementation always returns
false
.- Specified by:
replaces
in interfaceConstraint
- Overrides:
replaces
in classAbstractConstraint
- Parameters:
other
- the other constraint- Returns:
false
, always
-
getFactory
public ScopingConstraintFactory getFactory()
Description copied from interface:ScopingConstraint
Get the factory that produces constraints of this type- Specified by:
getFactory
in interfaceScopingConstraint
-
getStandardConstraint
public Constraint getStandardConstraint()
- Specified by:
getStandardConstraint
in interfaceScopingConstraint
-
getOutofScopeReadConstraint
public Constraint getOutofScopeReadConstraint()
Description copied from interface:ScopingConstraint
Get a constraint that should be used for reads of resources that are outside the scope of the constraint.- Specified by:
getOutofScopeReadConstraint
in interfaceScopingConstraint
-
-