Class AuthorizationConstraintImpl
- java.lang.Object
-
- java.util.Observable
-
- org.glassfish.deployment.common.DynamicAttributesDescriptor
-
- org.glassfish.deployment.common.Descriptor
-
- org.glassfish.web.deployment.descriptor.AuthorizationConstraintImpl
-
- All Implemented Interfaces:
AuthorizationConstraint
,WebDescriptor
,Serializable
public class AuthorizationConstraintImpl extends Descriptor implements AuthorizationConstraint
This descriptor represents an authorization constraint on a security constraint in a web application.- Author:
- Danny Coward
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.glassfish.deployment.common.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
-
Fields inherited from interface com.sun.enterprise.deployment.web.AuthorizationConstraint
BASIC_METHOD, FORM_METHOD, MUTUAL_METHOD
-
-
Constructor Summary
Constructors Constructor Description AuthorizationConstraintImpl()
Default constructor that creates an AuthorizationConstraint with no roles.AuthorizationConstraintImpl(AuthorizationConstraintImpl other)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSecurityRole(SecurityRole securityRole)
Adds a role to the authorization constraint.void
addSecurityRole(String roleName)
Adds a role to the authorization constraintEnumeration<SecurityRole>
getSecurityRoles()
Return the security roles involved in this constraint.void
print(StringBuilder toStringBuilder)
Prints a formatted representation of this object.void
removeSecurityRole(SecurityRole securityRole)
Removes the given role from the autrhorization constraint.-
Methods inherited from class org.glassfish.deployment.common.Descriptor
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getDisplayName, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getName, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setDisplayName, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setName, setSmallIconUri, visit
-
Methods inherited from class org.glassfish.deployment.common.DynamicAttributesDescriptor
addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toString
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.enterprise.deployment.web.WebDescriptor
getDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUri
-
-
-
-
Constructor Detail
-
AuthorizationConstraintImpl
public AuthorizationConstraintImpl()
Default constructor that creates an AuthorizationConstraint with no roles.
-
AuthorizationConstraintImpl
public AuthorizationConstraintImpl(AuthorizationConstraintImpl other)
Copy constructor.
-
-
Method Detail
-
getSecurityRoles
public Enumeration<SecurityRole> getSecurityRoles()
Return the security roles involved in this constraint. The enumeration is empty if there are none.- Specified by:
getSecurityRoles
in interfaceAuthorizationConstraint
- Returns:
- the enumeration of security roles in this constraint.
-
addSecurityRole
public void addSecurityRole(SecurityRole securityRole)
Adds a role to the authorization constraint.- Specified by:
addSecurityRole
in interfaceAuthorizationConstraint
- Parameters:
the
- role to be added.
-
addSecurityRole
public void addSecurityRole(String roleName)
Adds a role to the authorization constraint- Parameters:
the
- role name to be added
-
removeSecurityRole
public void removeSecurityRole(SecurityRole securityRole)
Removes the given role from the autrhorization constraint.- Parameters:
the
- role to be removed.
-
print
public void print(StringBuilder toStringBuilder)
Prints a formatted representation of this object.- Overrides:
print
in classDescriptor
-
-