com.sun.enterprise.deployment
Class RoleReference

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.EnvironmentProperty
                  extended by com.sun.enterprise.deployment.RoleReference
All Implemented Interfaces:
InjectionCapable, ApplicationParameter, ContextParameter, EnvironmentEntry, InitializationParameter, NameValuePair, SecurityRoleReference, WebDescriptor, java.io.Serializable

public class RoleReference
extends EnvironmentProperty
implements SecurityRoleReference

Special kind of environment property that encapsulates the primitive roles as defined by the bean developer. The name of a primitive role will appear in the bean code, the value will be mapped to the name of a Role chosen by the application assembler which is referenced by the EjbBundle being assembled.

Author:
Danny Coward
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sun.enterprise.deployment.EnvironmentProperty
lookupName, mappedName
 
Fields inherited from class com.sun.enterprise.deployment.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
 
Constructor Summary
RoleReference()
          Default constructor.
RoleReference(EnvironmentProperty environmentProperty)
          Construct the role reference with the same name and rolename the same as the environment property value.
RoleReference(java.lang.String name, java.lang.String description)
          Construct a role reference from the given name and description.
 
Method Summary
 Role getRole()
          Return the role object from this descriptor.
 java.lang.String getRolename()
          Return the coded name.
 SecurityRole getSecurityRoleLink()
          Return the rolename.
 void print(java.lang.StringBuffer toStringBuffer)
          Returns a formatted version of this object as a String.
 void setRolename(java.lang.String rolename)
          Sets the coded name.
 void setSecurityRoleLink(SecurityRole securityRole)
          Sets the rolename.
 
Methods inherited from class com.sun.enterprise.deployment.EnvironmentProperty
addInjectionTarget, equals, getComponentEnvName, getInjectionTargets, getInjectResourceType, getLookupName, getMappedName, getResolvedValue, getResolvedValueObject, getType, getValue, getValueObject, getValueType, hasAValue, hashCode, hasInjectionTargetFromXml, hasLookupName, isConflictResourceGroup, isInjectable, isSetValueCalled, printInjectableResourceInfo, setInjectResourceType, setLookupName, setMappedName, setType, setValue
 
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, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.enterprise.deployment.web.SecurityRoleReference
getDescription, setDescription
 
Methods inherited from interface com.sun.enterprise.deployment.web.WebDescriptor
getDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUri
 
Methods inherited from interface com.sun.enterprise.deployment.web.NameValuePair
getDescription, getName, setDescription, setName
 

Constructor Detail

RoleReference

public RoleReference()
Default constructor.


RoleReference

public RoleReference(java.lang.String name,
                     java.lang.String description)
Construct a role reference from the given name and description.


RoleReference

public RoleReference(EnvironmentProperty environmentProperty)
Construct the role reference with the same name and rolename the same as the environment property value.

Parameters:
the - environment property instance.
Method Detail

getRole

public Role getRole()
Return the role object from this descriptor.

Returns:
the role.

getSecurityRoleLink

public SecurityRole getSecurityRoleLink()
Return the rolename.

Specified by:
getSecurityRoleLink in interface SecurityRoleReference
Returns:
the role name.

setSecurityRoleLink

public void setSecurityRoleLink(SecurityRole securityRole)
Sets the rolename.

Specified by:
setSecurityRoleLink in interface SecurityRoleReference
Parameters:
the - rolename.

getRolename

public java.lang.String getRolename()
Return the coded name.

Specified by:
getRolename in interface SecurityRoleReference
Returns:
the role name used in the bean code.

setRolename

public void setRolename(java.lang.String rolename)
Sets the coded name.

Specified by:
setRolename in interface SecurityRoleReference
Parameters:
the - role name used in the bean code.

print

public void print(java.lang.StringBuffer toStringBuffer)
Returns a formatted version of this object as a String.

Overrides:
print in class EnvironmentProperty


Copyright © 2012 GlassFish Community. All Rights Reserved.