Skip to main content

tech.pisoft.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).

Deprecated Above the wire object limit this BULK form FAILS, and a bounded single-class query does not: the Key Service refuses a listing at the 1,025th object rather than emitting a package no conforming reader can read (WireLimits::MAX_OBJECT_PARAMS = 1024). Use AdministrationQuery#getPrincipalList(String, Query) with a Query carrying an order plus a limit and offset, one concrete principal class at a time, and concatenate the classes in the application if you need every type. ⚠ RETAINED AND STILL WORKING, DELIBERATELY. On an estate below the limit this is correct and cheaper than five queries; the deprecation is a warning about scale, not a removal notice. ⚠ This form is the widest of the three: it names no class at all, so the Key Service lists the umbrella class PrincipalInfo every principal of every type in one package and it is therefore the first to reach the ceiling.

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.

Deprecated Above the wire object limit this BULK form FAILS, and a bounded single-class query does not: the Key Service refuses a listing at the 1,025th object rather than emitting a package no conforming reader can read (WireLimits::MAX_OBJECT_PARAMS = 1024). Use AdministrationQuery#getPrincipalList(String, Query) with a Query carrying an order plus a limit and offset. ⚠ THE LIMIT IS CHARGED ACROSS THE WHOLE PACKAGE, NOT PER CLASS, so naming several classes here does not divide the budget between them it is the same one package. Ask for ONE class at a time. ⚠ RETAINED AND STILL WORKING on an estate below the limit; the deprecation is a warning about scale, not a removal notice.

Parameters

ParameterDescription
strClsNameA string representing the name of a class to which the principals belong. UserAndPasswordInfo SRPPrincipalInfo 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.

Deprecated Above the wire object limit this BULK form FAILS, and a bounded single-class query does not: the Key Service refuses a listing at the 1,025th object rather than emitting a package no conforming reader can read (WireLimits::MAX_OBJECT_PARAMS = 1024). Use AdministrationQuery#getPrincipalList(int, String, Query), whose System ID argument selects the same peer and whose Query carries the order, limit and offset. ⚠ THIS IS THE FEDERATED FORM AND IT IS THE ONE WHERE THE FAILURE WAS WORST. The refusal used to arrive inside the CALLING Key Service's decoder rather than at this client, so an operator met an unexplained failure seconds into a cross-server listing that named neither the limit nor the listing. ⚠ RETAINED AND STILL WORKING against a peer below the limit; the deprecation is a warning about scale, not a removal notice.

Parameters

ParameterDescription
strClsNameA string representing the name of a class to which the principals belong. UserAndPasswordInfo SRPPrincipalInfo 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.

Remark: NOT DEPRECATED, AND THE REASON IS THAT IT HAS NO BOUNDED TWIN. This one sends GET_GROUP_PRINCIPALS, a different operation from the three deprecated above, and no query-bearing form of it exists on any tier – so a deprecation here would point at a replacement that does not exist, which is worse than none. ⚠ IT IS NONETHELESS SUBJECT TO THE SAME CEILING: a group with more than 1,024 members cannot be listed by this method, and the Key Service refuses rather than truncating (WireLimits::MAX_OBJECT_PARAMS). Recorded here so the absence of a deprecation is not read as an absence of the limit.

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.

strName is NOT a target selector. The principal addressed is always m_Conn.getLoginID(), the caller's own login id; strName is an input to the SRP verifier, which setPassword() derives over it. The Key Service REFUSES any name that is not the caller's own; it never renames the caller's row.

Parameters

ParameterDescription
strNameA string representing the name of the user making the change. Must be the calling principal's own name.
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​