OBEROn SDK

com.oberon.ooql.sdk
Class ActorAccess

java.lang.Object
  extended by com.oberon.ooql.sdk.ActorAccess
All Implemented Interfaces:
java.io.Serializable

public class ActorAccess
extends java.lang.Object
implements java.io.Serializable

Defines the Actor Access

Version:
5.0
See Also:
Serialized Form

Field Summary
static java.lang.String ASSIGNMENT
          "Assignment" type
static java.lang.String TEAM
          "Team" type
static java.lang.String USER
          "User" type
 
Constructor Summary
ActorAccess(java.lang.String actorType, java.lang.String actorName)
          Define new actor access
ActorAccess(java.lang.String actorType, java.lang.String actorName, java.util.BitSet accessFlags, int accessNum)
          Define new actor access mask
 
Method Summary
 boolean equals(ActorAccess access)
          Compare two actor access instances
 boolean getAccess(int accessType)
          Get the access status for the specified access flag
 java.util.BitSet getAccesses()
          Get the actor access mask
 java.lang.String getActorName()
          Get the actor name
 java.lang.String getActorType()
          Get the actor type
static int indexOf(java.util.Vector<ActorAccess> accesses, ActorAccess access)
          Get the position of the given actor access in a Vector
static int indexOf(java.util.Vector<ActorAccess> accesses, java.lang.String actorType, java.lang.String actorName)
          Get the position of the given actor type/name in a Vector
 boolean setAccess(int accessType, boolean accessFlag)
          Set a single access flag
 java.lang.String setAccesses(java.util.BitSet accessFlags, int accessNum)
          Set the actor access mask
 void setAllAccess()
          Enable all access flags for the current actor type/name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER

public static final java.lang.String USER
"User" type

See Also:
Constant Field Values

TEAM

public static final java.lang.String TEAM
"Team" type

See Also:
Constant Field Values

ASSIGNMENT

public static final java.lang.String ASSIGNMENT
"Assignment" type

See Also:
Constant Field Values
Constructor Detail

ActorAccess

public ActorAccess(java.lang.String actorType,
                   java.lang.String actorName)
Define new actor access

Parameters:
actorType - the actor type: can be USER , TEAM , ASSIGNMENT
actorName - the actor name

ActorAccess

public ActorAccess(java.lang.String actorType,
                   java.lang.String actorName,
                   java.util.BitSet accessFlags,
                   int accessNum)
Define new actor access mask

Parameters:
actorType - the actor type: can be USER , TEAM , ASSIGNMENT
actorName - the actor name
accessFlags - set of actor's accesses
accessNum - number of access flags
Method Detail

getActorType

public java.lang.String getActorType()
Get the actor type

Returns:
USER , TEAM or ASSIGNMENT

getActorName

public java.lang.String getActorName()
Get the actor name


setAccess

public boolean setAccess(int accessType,
                         boolean accessFlag)
Set a single access flag

Parameters:
accessType - the access type (depends on the usage)
accessFlag - enable or disable the access
Returns:
true if the access is changed respect to the current setting

setAllAccess

public void setAllAccess()
Enable all access flags for the current actor type/name


getAccess

public boolean getAccess(int accessType)
Get the access status for the specified access flag

Parameters:
accessType - the access type (depends on the usage)

setAccesses

public java.lang.String setAccesses(java.util.BitSet accessFlags,
                                    int accessNum)
Set the actor access mask

Parameters:
accessFlags - set of actor's accesses
accessNum - number of access flags

getAccesses

public java.util.BitSet getAccesses()
Get the actor access mask


equals

public boolean equals(ActorAccess access)
Compare two actor access instances

Returns:
true if equal

indexOf

public static int indexOf(java.util.Vector<ActorAccess> accesses,
                          ActorAccess access)
Get the position of the given actor access in a Vector

Parameters:
accesses - Vector of actor access instances
access - the element to search
Returns:
the position or -1 if not found

indexOf

public static int indexOf(java.util.Vector<ActorAccess> accesses,
                          java.lang.String actorType,
                          java.lang.String actorName)
Get the position of the given actor type/name in a Vector

Parameters:
accesses - Vector of actor access instances
actorType - the actor type: can be USER , TEAM , ASSIGNMENT
actorName - the actor name
Returns:
the position or -1 if not found

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.