|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.access.AccessSelector
AccessSelector represents both rule antecendents (in access policy rules) and ACL locators. It is composed of a domain reference, persistent type identifier, and a state name. AccessSelectors can be used to derive QuerySpecification objects that can be used to search for rules or ACLs either by setting a specific domain, type and state or by setting any of these fields to "null," in which case the query returns all objects that match the non-null fileds. The AccessSelector constructor sets the persistent type identifier to the root of the type hierarchy and the state to "ALL". AccessSelector objects can also be obtained from access policies using the getAccessSelector method, effectively using policies as selector factories. In this case, the domain reference is the same as the one of the policy.
Use the newAccessSelector
static factory method(s), not
the AccessSelector
constructor, to construct instances of
this class. Instances must be constructed using the static factory(s),
in order to ensure proper initialization of the instance.
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
static String |
OWNER_REF
Label for the attribute; Reference to an administartive domain. |
private ObjectReference |
ownerRef
|
protected static long |
PRE_R6_VERSION_UID
|
private static String |
RESOURCE
|
private static String |
SELECTOR_NAME
Constant used to create search condition. |
(package private) static long |
serialVersionUID
|
static String |
STATE_NAME
Label for the attribute; Name of the state the selector refers to. |
private static int |
STATE_NAME_UPPER_LIMIT
|
private String |
stateName
|
static String |
TYPE_ID
Label for the attribute; Persistable type identifier of the type the selector refers to. |
private static int |
TYPE_ID_UPPER_LIMIT
|
private String |
typeId
|
Constructor Summary | |
AccessSelector()
|
Method Summary | |
boolean |
equals(Object obj)
Determines if the access selector is equal to the object passed as argument. |
ClassInfo |
getClassInfo()
Returns the ClassInfo object for this class. |
String |
getConceptualClassname()
Deprecated. |
ObjectReference |
getOwnerRef()
Gets the value of the attribute: OWNER_REF. |
QuerySpec |
getQuerySpec(Class target_class)
Returns a query specification for the class (AccessPolicyRule or PolicyAcl) passed as argument. |
String |
getStateName()
Gets the value of the attribute: STATE_NAME. |
String |
getTypeId()
Gets the value of the attribute: TYPE_ID. |
int |
hashCode()
Returns the access selector hash code. |
protected boolean |
hasNullFields()
Returns true if the selector has a field (ownerRef, typeId or stateName) that is null. |
protected void |
initialize()
Supports initialization, following construction of an instance. |
protected void |
initialize(ObjectReference domain_ref)
Supports initialization, following construction of an instance. |
protected void |
initialize(ObjectReference domain_ref,
String type_id,
String state_name)
Supports initialization, following construction of an instance. |
boolean |
isMoreGeneral(AccessSelector sel)
Returns true if the current selector is more general than the one passed as argument, otherwise returns false. |
static AccessSelector |
newAccessSelector()
No argument constructor. |
static AccessSelector |
newAccessSelector(ObjectReference domain_ref)
Constructor that takes a domain reference argument. |
static AccessSelector |
newAccessSelector(ObjectReference domain_ref,
String type_id,
String state_name)
Constructor that takes a domain reference, a persistence type identifier, and a state name as arguments. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
void |
readExternal(PersistentRetrieveIfc input)
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(AccessSelector thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
setOwnerRef(ObjectReference a_OwnerRef)
Sets the value of the attribute: OWNER_REF. |
void |
setStateName(String a_StateName)
Sets the value of the attribute: STATE_NAME. |
void |
setTypeId(String a_TypeId)
Sets the value of the attribute: TYPE_ID. |
String |
toString()
Returns the conceptual (modeled) name for the class. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
void |
writeExternal(PersistentStoreIfc output)
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String TYPE_ID
private static int TYPE_ID_UPPER_LIMIT
private String typeId
public static final String STATE_NAME
private static int STATE_NAME_UPPER_LIMIT
private String stateName
public static final String OWNER_REF
private ObjectReference ownerRef
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
protected static final long PRE_R6_VERSION_UID
private static final String SELECTOR_NAME
Constructor Detail |
public AccessSelector()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(AccessSelector thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public void writeExternal(PersistentStoreIfc output) throws SQLException, DatastoreException
(Not intended for general use.)
Supported API: false
writeExternal
in interface ObjectMappable
output
-
SQLException
DatastoreException
public void readExternal(PersistentRetrieveIfc input) throws SQLException, DatastoreException
(Not intended for general
use.)
Supported API: false
readExternal
in interface ObjectMappable
input
-
SQLException
DatastoreException
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
public String toString()
public ClassInfo getClassInfo() throws WTIntrospectionException
getClassInfo
in interface NetFactor
WTIntrospectionException
public String getTypeId()
public void setTypeId(String a_TypeId)
a_TypeId
- public String getStateName()
public void setStateName(String a_StateName)
a_StateName
- public ObjectReference getOwnerRef()
public void setOwnerRef(ObjectReference a_OwnerRef)
a_OwnerRef
- public static AccessSelector newAccessSelector() throws WTException
WTException
protected void initialize() throws WTException
WTException
public static AccessSelector newAccessSelector(ObjectReference domain_ref) throws WTException
domain_ref
-
WTException
protected void initialize(ObjectReference domain_ref) throws WTException
domain_ref
-
WTException
public static AccessSelector newAccessSelector(ObjectReference domain_ref, String type_id, String state_name) throws WTException
domain_ref
- type_id
- state_name
-
WTException
protected void initialize(ObjectReference domain_ref, String type_id, String state_name) throws WTException
domain_ref
- type_id
- state_name
-
WTException
public boolean equals(Object obj)
obj
-
public int hashCode()
public QuerySpec getQuerySpec(Class target_class) throws WTException
target_class
-
WTException
public boolean isMoreGeneral(AccessSelector sel)
sel
-
protected boolean hasNullFields()
An AccessSelector with null fields can only be used in queries.
Supported API: false
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |