com.eruces.teadmin.PrincipalInfo
The PrincipalInfo class is an abstract class that keeps the common attribute for all principals.
Inheritance
- Inherits com.eruces.teadmin.UpdatableObject
- Inherited by com.eruces.teadmin.GroupInfo
- Inherited by com.eruces.teadmin.LdapPrincipalInfo
- Inherited by com.eruces.teadmin.MsgPrincipalInfo
- Inherited by com.eruces.teadmin.TransportPrincipalInfo
- Inherited by com.eruces.teadmin.UserAndPasswordInfo
- Inherited by com.eruces.teadmin.WindowsPrincipalInfo
- Inherited by com.eruces.teadmin.XAuthPrincipalInfo
Protected Attributes
| Type | Name | Description |
|---|---|---|
| int | m_nSystemID | An integer representing the system ID. |
| long | m_nPrincipalID | An integer representing the principal ID. |
| PList | m_listRoleID | A PList object representing the Role IDs. |
| int | m_nFlags | An integer representing the flags. |
| PList | m_listGroup | A PList object representing the list of groups to which this principal belongs. |
| PList | m_listReviewerID | A PList object representing the list of reviewer IDs. |
| PList | m_listAclTemplateId | A PList object representing the list of of ACL template IDs. |
| long | m_defaultGroup | An integer representing the default group ID. |
Public Member Functions
| Member | Description |
|---|---|
PrincipalInfo() | The PrincipalInfo constructor is the default class constructor. |
PrincipalInfo(long nPrincipalID) | The PrincipalInfo constructor specifies a principal ID. |
PrincipalInfo(int nSystemID, long nPrincipalID) | The PrincipalInfo constructor specifies a system ID and a principal ID. |
long getPrincipalID() | The getPrincipalID method gets a principal's unique identifier. |
void setPrincipalID(long nPrincipalID) | The setPrincipalID method sets a principal ID. |
int getSystemID() | The getSystemID method gets a system ID. |
abstract String getPrincipalName() | The getPrincipalName method gets a principal name. |
PList getRoleIDs() | The getRoleIDs method gets a list of role IDs. |
void addRole(long nRoleID) | The addRole method adds a role to a principal's information. |
void removeRole(long nRoleID) | The removeRole method removes a role from a principal's information. |
void removeRole() | The removeRole method removes an empty role from a principal's information. |
void clearRoles() | The clearRoles method removes all roles from a principal's information. |
PList getGroupIDs() | The getGroupIDs method gets a list of IDs for the groups to which the principal belongs. |
long getGroupID() | The getGroupID method gets the unique identifier for the group to which a principal belongs. |
void addGroup(long nGroupID) | The addGroup method adds a group ID to a principal's information. |
void clearGroup() | The clearGroup method removes all group IDs from a principal's information. |
void removeGroup(long nGroupID) | The removeGroup method removes the group ID from a principal's information. |
boolean isBuiltIn() | The isBuiltIn method checks whether a principal is preset or user-defined. |
boolean isDisabled() | The isDisabled method checks whether a principal is active or disabled. |
void setDisableStatus(boolean bStatus) | The setDisableStatus method sets a variable that disables or enables a principal. |
abstract boolean equals(Object anotherInfo) | The equals method compares two principals. |
String toString() | The toString method converts PrincipalInfo object data to a string. |
Member Function Documentation
PrincipalInfo()
The PrincipalInfo constructor is the default class constructor.
PrincipalInfo(long nPrincipalID)
The PrincipalInfo constructor specifies a principal ID.
Parameters
| Parameter | Description |
|---|---|
nPrincipalID | An integer representing a principal ID. |
PrincipalInfo(int nSystemID, long nPrincipalID)
The PrincipalInfo constructor specifies a system ID and a principal ID.
Parameters
| Parameter | Description |
|---|---|
nSystemID | An integer representing a system ID. |
nPrincipalID | An integer representing a principal ID. |
long getPrincipalID()
The getPrincipalID method gets a principal's unique identifier.
Returns: Returns an integer representing a principal ID.
void setPrincipalID(long nPrincipalID)
The setPrincipalID method sets a principal ID.
Parameters
| Parameter | Description |
|---|---|
nPrincipalID | An integer representing a principal ID. |
int getSystemID()
The getSystemID method gets a system ID.
Returns: Returns an integer representing a system ID.
abstract String getPrincipalName()
The getPrincipalName method gets a principal name.
Returns: Returns a string representing a principal name.
PList getRoleIDs()
The getRoleIDs method gets a list of role IDs.
Returns: Returns a list of role IDs.
void addRole(long nRoleID)
The addRole method adds a role to a principal's information.
Parameters
| Parameter | Description |
|---|---|
nRoleID | An integer representing a role ID. |
void removeRole(long nRoleID)
The removeRole method removes a role from a principal's information.
Parameters
| Parameter | Description |
|---|---|
nRoleID | An integer representing a role ID. |
void removeRole()
The removeRole method removes an empty role from a principal's information.
void clearRoles()
The clearRoles method removes all roles from a principal's information.
PList getGroupIDs()
The getGroupIDs method gets a list of IDs for the groups to which the principal belongs.
Returns: A PList object representing the list of group IDs.
Remark: Because in current version, one principal can only have one group So only one group will be in list
long getGroupID()
The getGroupID method gets the unique identifier for the group to which a principal belongs.
Returns: An integer representing the group ID.
void addGroup(long nGroupID)
The addGroup method adds a group ID to a principal's information.
Parameters
| Parameter | Description |
|---|---|
nGroupID | An integer representing a group ID. |
void clearGroup()
The clearGroup method removes all group IDs from a principal's information.
void removeGroup(long nGroupID)
The removeGroup method removes the group ID from a principal's information.
Parameters
| Parameter | Description |
|---|---|
nGroupID | An integer representing the group ID. |
Remark: because one principal must belongs to one group, so the group cannot be removed, use set group instead
boolean isBuiltIn()
The isBuiltIn method checks whether a principal is preset or user-defined.
Returns: A boolean value representing the origination of a principal; True = preset principal, False = user-defined principal.
boolean isDisabled()
The isDisabled method checks whether a principal is active or disabled.
Returns: A boolean value representing the status of a principal; True = principal has been disabled, False = principal is active.
void setDisableStatus(boolean bStatus)
The setDisableStatus method sets a variable that disables or enables a principal.
Parameters
| Parameter | Description |
|---|---|
bStatus | A boolean value indicating the action to be taken; True = disable the principal, False = enable the principal. |
abstract boolean equals(Object anotherInfo)
The equals method compares two principals.
Parameters
| Parameter | Description |
|---|---|
anotherInfo | A PrincipalInfo object to which the current PrincipalInfo object will be compared. |
Returns: Returns a boolean value indicating whether the two principals are the same; True = principals are the same, False = principals are different.
Remark: Overrides the equals method in the java.lang.Object class.
String toString()
The toString method converts PrincipalInfo object data to a string.
Returns: Returns a string representing PrincipalInfo object data.
Remark: Overrides the toString method in the com.eruces.teadmin.UpdatableObject class.