public class ObjectStatePrivilege extends ObjectPrivilege
Constructor and Description |
---|
ObjectStatePrivilege(ActionGroup actiongroup,
TotalAuthority authority,
ChoiceValue[] allowedstates)
create an object state privilege for the given authority for the provided
states
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object otherobject) |
java.lang.String |
generateAttributeName() |
java.lang.String |
generateClassName() |
void |
generateSecurityManagerSuperStatement(SourceGenerator sg)
generates the super statement for the security manager
|
java.lang.String |
getSecurityManagerClassName() |
java.lang.String |
getStatesSummary() |
void |
validate()
validates that the privilege is correct
|
void |
writeImport(SourceGenerator sg,
ActionDefinition contextaction)
method used to write all imports necessary for the privilege
|
getObjectForPrivilege, getSecurityManagerName, writeDefinition
getAuthority, toString
getActiongroup
public ObjectStatePrivilege(ActionGroup actiongroup, TotalAuthority authority, ChoiceValue[] allowedstates)
actiongroup
- action group privilege is given onauthority
- authority privilege is given toallowedstates
- list of states of the object for which the privilege is
givenpublic java.lang.String generateAttributeName()
generateAttributeName
in class ObjectPrivilege
public java.lang.String generateClassName()
generateClassName
in class ObjectPrivilege
public java.lang.String getSecurityManagerClassName()
getSecurityManagerClassName
in class ObjectPrivilege
public void validate()
ObjectPrivilege
validate
in class ObjectPrivilege
public void writeImport(SourceGenerator sg, ActionDefinition contextaction) throws java.io.IOException
Privilege
writeImport
in class Privilege
sg
- source generatorcontextaction
- context action of the privilegejava.io.IOException
- if anything bad happens in the writing of the importspublic void generateSecurityManagerSuperStatement(SourceGenerator sg) throws java.io.IOException
ObjectPrivilege
generateSecurityManagerSuperStatement
in class ObjectPrivilege
sg
- source generatiojava.io.IOException
- if anything bad happens while writing the fieldpublic java.lang.String getStatesSummary()
public boolean equals(java.lang.Object otherobject)
equals
in class java.lang.Object