Package com.sun.enterprise.deployment
Class RoleReference
- java.lang.Object
-
- java.util.Observable
-
- org.glassfish.deployment.common.DynamicAttributesDescriptor
-
- org.glassfish.deployment.common.Descriptor
-
- com.sun.enterprise.deployment.EnvironmentProperty
-
- com.sun.enterprise.deployment.RoleReference
-
- All Implemented Interfaces:
InjectionCapable
,ApplicationParam
,ContextParameter
,EnvironmentEntry
,InitializationParameter
,NameValuePair
,SecurityRoleReference
,WebDescriptor
,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 org.glassfish.deployment.common.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
-
-
Constructor Summary
Constructors Constructor Description RoleReference()
Default constructor.RoleReference(EnvironmentProperty environmentProperty)
Construct the role reference with the same name and rolename the same as the environment property value.RoleReference(String name, String description)
Construct a role reference from the given name and description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Role
getRole()
Return the role object from this descriptor.String
getRoleName()
Return the coded name.SecurityRole
getSecurityRoleLink()
Return the rolename.void
print(StringBuilder toStringBuilder)
Returns a formatted version of this object as a String.void
setRoleName(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, isConflict, isConflictResourceGroup, isInjectable, isSetValueCalled, printInjectableResourceInfo, setInjectResourceType, setLookupName, setMappedName, setType, setValue
-
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, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.enterprise.deployment.web.NameValuePair
getDescription, getName, setDescription, setName
-
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
-
-
-
-
Constructor Detail
-
RoleReference
public RoleReference()
Default constructor.
-
RoleReference
public RoleReference(String name, 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 interfaceSecurityRoleReference
- Returns:
- the role name.
-
setSecurityRoleLink
public void setSecurityRoleLink(SecurityRole securityRole)
Sets the rolename.- Specified by:
setSecurityRoleLink
in interfaceSecurityRoleReference
- Parameters:
the
- rolename.
-
getRoleName
public String getRoleName()
Return the coded name.- Specified by:
getRoleName
in interfaceSecurityRoleReference
- Returns:
- the role name used in the bean code.
-
setRoleName
public void setRoleName(String rolename)
Sets the coded name.- Specified by:
setRoleName
in interfaceSecurityRoleReference
- Parameters:
the
- role name used in the bean code.
-
print
public void print(StringBuilder toStringBuilder)
Returns a formatted version of this object as a String.- Overrides:
print
in classEnvironmentProperty
-
-