Skip to main content

com.eruces.teadmin.Administration

The Administration class manages all user, role and ACL information.

Since: 1.0

© Pi Soft, 2018-2026 · Tricryption Engine 8.1

Inheritance

Static Public Attributes

TypeNameDescription
final shortADD_ACLENTRYThe ADD_ACLENTRY field is a container for adding an ACL entry.
final shortUPDATE_ACLENTRYThe UPDATE_ACLENTRY field is a container for updating an ACL entry.
final shortREMOVE_ACLENTRYThe REMOVE_ACLENTRY field is a container for removing an ACL entry.

Public Member Functions

MemberDescription
Administration()The Administration constructor is the default class constructor.
ACLInfo getACL(String strHiddenLink)The getACL method retrieves a TTag's ACL.
ACLInfo getACL(byte[] strHiddenLink)The getACL method retrieves a TTag's ACL.
void updateACL(short nCode, ACLInfo acl)The updateACL method updates ACL information.
PrincipalInfo addPrincipal(PrincipalInfo pal)The addPrincipal method adds a new principal to the system.
void removePrincipal(PrincipalInfo pal, PrincipalInfo palRe)The removePrincipal method removes a principal from the system and assigns the principal's keys to another principal.
void removePrincipal(PrincipalInfo pal)The removePrincipal method removes a principal from the TE system.
void updatePrincipal(PrincipalInfo pal)The updatePrincipal method updates information about a principal.
PrincipalInfo getPrincipal(PrincipalInfo info)The getPrincipal method gets detailed information about a specific principal.
PrincipalInfo[] getPrincipalList()The getPrincipalList method gets a list of all principals (Database Edition).
PrincipalInfo[] getPrincipalList(PList listIDs)The getPrincipalList method gets a list of all principals that are part of a specific list.
PrincipalInfo[] getPrincipalList(int[] sid, long[] pid)The getPrincipalList method gets a list of all principals that are part of a specific list.
PrincipalInfo[] getPrincipalList(String[] strClsName)The getPrincipalList method gets a list of all principals of a specific type.
PrincipalInfo[] getPrincipalList(String[] strClsName, int nSysID)The getPrincipalList method gets a list of all principals of a specific type from a remote server.
PrincipalInfo[] getPrincipalList(long nGroupID)The getPrincipalList method gets a list of all principals of a group.
UserAndPasswordInfo getUserByName(String strUserName)The getUserByName method gets information about a user having a specific username.
Role[] createRoles(Role role[])The createRoles method adds multiple new roles to the system.
void assignRoles(PrincipalInfo pinfo, long[] roleid)The assignRoles method assigns existing roles to a principal.
void removeRoles(PrincipalInfo pinfo, long[] roleid)The removeRole method removes a role from a specific principal.
void removeRole(long id)The removeRole method removes a role having a specific ID from the system.
Role[] getAllRoles()The getAllRoles method gets a list of all roles.
Role[] getRolesOfPrincipal(PrincipalInfo p)The getRolesOfPrincipal method gets an array of roles assigned to a specific principal.
Role[] getRolesOfPrincipal(PList plistRoleIDs)The getRolesOfPrincipal method gets an array of roles assigned to a specific principal.
void updateRoles(Role role[])The updateRoles method updates multiple roles.
Operation[] getAllOperations()The getAllOperations method gets a list of all user operations.
void assignGroups(PrincipalInfo pinfo, long[] groupid)The assignGroups method assigns multiple groups to a principal.
void removeGroups(PrincipalInfo pinfo, long[] groupid)The removeGroups method removes multiple groups from a principal.
void addPrincipalsToGroup(long nGroupID, long[] nPrincipalIDs)The addPrincipalsToGroup method adds multiple existing principals to a specific group.
void removePrincipalsFromGroup(long nGroupID, long[] nPrincipalIDs)The removePrincipalsFromGroup method removes multiple principals from a specific group.
void resetPassword(String strName, String strPasswd)The resetPassword method resets the password of the currently logged on user.
void emergencyCheckIn(long[] nPrincipalIDs)The emergencyCheckIn method allows administrative check-in of all keys checked out by a specific principal.
int getSystemID()The getSystemID method gets a system ID.
Version getVersion()The getVersion method gets a system's version information.

Member Function Documentation

Administration()

The Administration constructor is the default class constructor.

The getACL method retrieves a TTag's ACL.

Parameters

ParameterDescription
strHiddenLinkA String representing the TTag

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the Key Service refuses the operation, or an argument fails the check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: An ACLInfo object representing the ACL.

The getACL method retrieves a TTag's ACL.

Parameters

ParameterDescription
strHiddenLinkbyte array of the TTag

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the Key Service refuses the operation, or an argument fails the check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an ACLInfo object.

void updateACL(short nCode, ACLInfo acl)

The updateACL method updates ACL information.

Parameters

ParameterDescription
nCodeA short variable representing an operation code; possible values could be ADD_ACLENTRY, UPDATE_ACLENTRY, REMOVE_ACLENTRY.
aclAn ACLInfo object to be modified.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

See also: ADD_ACLENTRY, UPDATE_ACLENTRY, REMOVE_ACLENTRY

PrincipalInfo addPrincipal(PrincipalInfo pal)

The addPrincipal method adds a new principal to the system.

Parameters

ParameterDescription
palA principal object to be added

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the Key Service refuses the operation, or an argument fails the check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void removePrincipal(PrincipalInfo pal, PrincipalInfo palRe)

The removePrincipal method removes a principal from the system and assigns the principal's keys to another principal.

Parameters

ParameterDescription
palA principal object to be removed.
palReA replacement PrincipalInfo object to which the removed principal's keys will be assigned.

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the Key Service refuses the operation, or an argument fails the check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void removePrincipal(PrincipalInfo pal)

The removePrincipal method removes a principal from the TE system.

(Only for Database edition) Deprecated

Parameters

ParameterDescription
palprincipal object to be removed

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Remark: This method can only be used for Database Edition

void updatePrincipal(PrincipalInfo pal)

The updatePrincipal method updates information about a principal.

Parameters

ParameterDescription
palA principal object to be updated.

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the principal returned by the Key Service does not match the one submitted.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

PrincipalInfo getPrincipal(PrincipalInfo info)

The getPrincipal method gets detailed information about a specific principal.

Parameters

ParameterDescription
infoA principal object which principal ID should be set

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the Key Service refuses the operation, or an argument fails the check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns a PrincipalInfo object with detailed principal information.

PrincipalInfo[] getPrincipalList()

The getPrincipalList method gets a list of all principals (Database Edition).

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of principals.

PrincipalInfo[] getPrincipalList(PList listIDs)

The getPrincipalList method gets a list of all principals that are part of a specific list.

Parameters

ParameterDescription
listIDsA list of principal IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of principals.

PrincipalInfo[] getPrincipalList(int[] sid, long[] pid)

The getPrincipalList method gets a list of all principals that are part of a specific list.

Parameters

ParameterDescription
sidAn integer array of system ids.
pidA long array of principal ids.

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the Key Service refuses the operation, or an argument fails the check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of principals.

PrincipalInfo[] getPrincipalList(String[] strClsName)

The getPrincipalList method gets a list of all principals of a specific type.

Parameters

ParameterDescription
strClsNameA string representing the name of a class to which the principals belong. UserAndPasswordInfo SRPPrincipalInfo WindowsPrincipalInfo LdapPrincipalInfo CertObjectInfo

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of principals.

PrincipalInfo[] getPrincipalList(String[] strClsName, int nSysID)

The getPrincipalList method gets a list of all principals of a specific type from a remote server.

Parameters

ParameterDescription
strClsNameA string representing the name of a class to which the principals belong. UserAndPasswordInfo SRPPrincipalInfo WindowsPrincipalInfo LdapPrincipalInfo CertObjectInfo
nSysIDThe remote System ID

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of principals.

PrincipalInfo[] getPrincipalList(long nGroupID)

The getPrincipalList method gets a list of all principals of a group.

Parameters

ParameterDescription
nGroupIDAn integer representing the ID of the group to which the principals belong.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns An array of principals.

UserAndPasswordInfo getUserByName(String strUserName)

The getUserByName method gets information about a user having a specific username.

Parameters

ParameterDescription
strUserNameA string representing a user name.

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the Key Service refuses the operation, or an argument fails the check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: A user object

Role[] createRoles(Role role[])

The createRoles method adds multiple new roles to the system.

Parameters

ParameterDescription
roleAn array of roles

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Array of roles

void assignRoles(PrincipalInfo pinfo, long[] roleid)

The assignRoles method assigns existing roles to a principal.

Parameters

ParameterDescription
pinfoA principal object.
roleidAn array of role IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void removeRoles(PrincipalInfo pinfo, long[] roleid)

The removeRole method removes a role from a specific principal.

Parameters

ParameterDescription
pinfoA principal object.
roleidAn array of role IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void removeRole(long id)

The removeRole method removes a role having a specific ID from the system.

Parameters

ParameterDescription
idA number representing a role ID.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Role[] getAllRoles()

The getAllRoles method gets a list of all roles.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of all roles.

Role[] getRolesOfPrincipal(PrincipalInfo p)

The getRolesOfPrincipal method gets an array of roles assigned to a specific principal.

Parameters

ParameterDescription
pA principal object.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of roles.

Role[] getRolesOfPrincipal(PList plistRoleIDs)

The getRolesOfPrincipal method gets an array of roles assigned to a specific principal.

Parameters

ParameterDescription
plistRoleIDsA list of role IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of roles.

void updateRoles(Role role[])

The updateRoles method updates multiple roles.

Parameters

ParameterDescription
roleAn array of roles.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Operation[] getAllOperations()

The getAllOperations method gets a list of all user operations.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of operations.

void assignGroups(PrincipalInfo pinfo, long[] groupid)

The assignGroups method assigns multiple groups to a principal.

Parameters

ParameterDescription
pinfoA Principal object.
groupidAn array of group IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void removeGroups(PrincipalInfo pinfo, long[] groupid)

The removeGroups method removes multiple groups from a principal.

Parameters

ParameterDescription
pinfoA Principal object.
groupidAn array of group IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void addPrincipalsToGroup(long nGroupID, long[] nPrincipalIDs)

The addPrincipalsToGroup method adds multiple existing principals to a specific group.

Parameters

ParameterDescription
nGroupIDAn integer representing a group ID.
nPrincipalIDsAn array of principal IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void removePrincipalsFromGroup(long nGroupID, long[] nPrincipalIDs)

The removePrincipalsFromGroup method removes multiple principals from a specific group.

Parameters

ParameterDescription
nGroupIDAn integer representing a group ID.
nPrincipalIDsAn array of principal IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void resetPassword(String strName, String strPasswd)

The resetPassword method resets the password of the currently logged on user.

Parameters

ParameterDescription
strNameA string representing the name of the user making the change.
strPasswdA string representing the new password.

Exceptions

ExceptionDescription
teadmin.AdminExceptionif the new password fails the format check this method makes before sending the request.
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

void emergencyCheckIn(long[] nPrincipalIDs)

The emergencyCheckIn method allows administrative check-in of all keys checked out by a specific principal.

Parameters

ParameterDescription
nPrincipalIDsAn array of principal IDs.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

int getSystemID()

The getSystemID method gets a system ID.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an integer representing a system ID.

Version getVersion()

The getVersion method gets a system's version information.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: A Version object containing version information.

Examples