com.sun.enterprise.deployment
Class AuthorizationConstraintImpl

java.lang.Object
  extended by java.util.Observable
      extended by com.sun.enterprise.deployment.DynamicAttributesDescriptor
          extended by com.sun.enterprise.deployment.Descriptor
              extended by com.sun.enterprise.deployment.AuthorizationConstraintImpl
All Implemented Interfaces:
AuthorizationConstraint, WebDescriptor, java.io.Serializable

public class AuthorizationConstraintImpl
extends Descriptor
implements AuthorizationConstraint

This descriptor represents an authorization contraint on a security constraint in a web application.

Author:
Danny Coward
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sun.enterprise.deployment.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
AuthorizationConstraintImpl()
          Default constructor that creates an AuthorizationConstraint with no roles.
AuthorizationConstraintImpl(AuthorizationConstraintImpl other)
          Copy constructor.
 
Method Summary
 void addSecurityRole(SecurityRole securityRole)
          Adds a role to the authorization constraint.
 void addSecurityRole(java.lang.String roleName)
          Adds a role to the authorization constraint
 java.util.Enumeration getSecurityRoles()
          Return the security roles involved in this constraint.
 void print(java.lang.StringBuffer toStringBuffer)
          Prints a formatted representation of this object.
 void removeSecurityRole(SecurityRole securityRole)
          Removes the given role from the autrhorization constraint.
 
Methods inherited from class com.sun.enterprise.deployment.Descriptor
addDeploymentExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, 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 com.sun.enterprise.deployment.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 java.util.Enumeration getSecurityRoles()
Return the security roles involved in this constraint. The enumeration is empty if there are none.

Specified by:
getSecurityRoles in interface AuthorizationConstraint
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 interface AuthorizationConstraint
Parameters:
the - role to be added.

addSecurityRole

public void addSecurityRole(java.lang.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(java.lang.StringBuffer toStringBuffer)
Prints a formatted representation of this object.

Overrides:
print in class Descriptor


Copyright © 2012 GlassFish Community. All Rights Reserved.