Class PCAccessHelper
java.lang.Object
com.webmethods.caf.portalclient.access.PCAccessHelper
Simplifies getting some basic access information
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NONE
public static final int NONE- See Also:
-
READ
public static final int READ- See Also:
-
CREATE_CONTAINER
public static final int CREATE_CONTAINER- See Also:
-
CREATE_ITEM
public static final int CREATE_ITEM- See Also:
-
CREATE_REFERENCE
public static final int CREATE_REFERENCE- See Also:
-
MODIFY
public static final int MODIFY- See Also:
-
MODIFY_REFERENCE
public static final int MODIFY_REFERENCE- See Also:
-
MODIFY_PERMISSION
public static final int MODIFY_PERMISSION- See Also:
-
DELETE
public static final int DELETE- See Also:
-
DELETE_REFERENCE
public static final int DELETE_REFERENCE- See Also:
-
ALL
public static final int ALL- See Also:
-
-
Constructor Details
-
PCAccessHelper
public PCAccessHelper()
-
-
Method Details
-
getAccess
Determines what the access rights a user has on a resource- Parameters:
itemID
- the MWS thing ID of the resource to get access rights foruserID
- the URI of the principal to retrieve rights for- Returns:
- the bit-field of rights explictly granted to the specified principal. See
PCAccessHelper
for bit-field constants. - Throws:
Exception
-
hasAccess
Determines whether the user has the specified rights on a resource- Parameters:
itemID
- the MWS thing ID of the resource to check access rights foruserID
- the URI of the principal to check access rights foraccessRights
- the bit-field of rights to check against. SeePCAccessHelper
for bit-field constants.- Returns:
- true if the user has access, false otherwise
- Throws:
Exception
-