Oracle Collaboration Suite Discussions Java API Reference
10g (10.1.1)

Part No. B16232-01


oracle.discussions.sdk
Class TdGranteeRole

java.lang.Object
  extended byoracle.discussions.sdk.TdGranteeRole


public class TdGranteeRole
extends java.lang.Object

Associates a oracle discussions user with a specific oracle discussions role.

Sample code snippet illustrating the usage of TdGranteeRole.

  List lstOfOldACLs = tdc.listGranteeRoles();
  TdRole tdOperatorOldRole = null;
  TdRole tdOperatorNewRole = null;
  for (int i=0; i<lstOfOldACLs.size(); i++)
  {
    TdGranteeRole tdgrOld = (TdGranteeRole) lstOfOldACLs.get(i);
    if (tdgrOld.getGrantee().equals(operator))
      tdOperatorOldRole = tdgrOld.getTdRole();
  }
  
Since:
OCS 10.1.1
See Also:
TdRole.java

Field Summary
static int TD_GROUP
static int TD_USER

Constructor Summary
TdGranteeRole(TdUser usrctx, TdRole tdRole, boolean inherited)
Constructor which initializes a GranteeRole object taking in a oracle discussions user, a oracle discussions role and a boolean variable.

Method Summary
boolean equals(java.lang.Object o1, java.lang.Object o2)
Compares two objects and returns a boolean value indicating if they are equal.
TdUser getGrantee()
Returns a user who is associated with the role.
TdRole getTdRole()
Returns a oracle discussions role which is associated with a particular user.
boolean isInherited()
Specifies if the role is an inherited role.
void setInherited(boolean inherited)
Sets a boolean variable indicating that the role is inherited.
void setTdRole(TdRole tdr)
Returns a role with the one passed as an argument.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TD_USER

public static final int TD_USER
See Also:
Constant Field Values

TD_GROUP

public static final int TD_GROUP
See Also:
Constant Field Values

Constructor Detail

TdGranteeRole

public TdGranteeRole(TdUser usrctx,
                     TdRole tdRole,
                     boolean inherited)
Constructor which initializes a GranteeRole object taking in a oracle discussions user, a oracle discussions role and a boolean variable.
Parameters:
usrctx - a oracle discussions user object who is being assigned with the role
tdRole - a oracle discussions role which is to be assigned to the user
inherited - whether this role is a result of inheritance from a role in a parent facility, or whether it is expliclity granted to the user on the container

Method Detail

getGrantee

public TdUser getGrantee()
Returns a user who is associated with the role.
Returns:
TdUser

getTdRole

public TdRole getTdRole()
Returns a oracle discussions role which is associated with a particular user.
Returns:
TdRole

setTdRole

public void setTdRole(TdRole tdr)
Returns a role with the one passed as an argument.
Parameters:
tdr - oracle discussions role which is set

isInherited

public boolean isInherited()
Specifies if the role is an inherited role. A role is inherited if it is not explicitly granted to a user on a container but the user acquires it just because he holds a role on the parent container for the specified container.
Returns:
boolean

setInherited

public void setInherited(boolean inherited)
Sets a boolean variable indicating that the role is inherited. A role is inherited if it is not explicitly granted to a user on a container but the user acquires it just because he holds a role on the parent container for the specified container.

equals

public boolean equals(java.lang.Object o1,
                      java.lang.Object o2)
Compares two objects and returns a boolean value indicating if they are equal. A true return value indicates that they are equal and a false value indicates that they are not equal.
Parameters:
o1 - Object which is to be compared for equality
o2 - Object which is to be compared for equality
Returns:
boolean

Copyright © 2005, Oracle. All rights reserved.