Class DirectoryDefaultHelper
java.lang.Object
com.orchestranetworks.service.directory.DirectoryDefaultHelper
Helper class that works with
DirectoryDefault
class.
Underlying user and role entities managed by this class are persisted in the
EBX® repository.- Since:
- 5.7.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcedureResult
deleteRole
(Role aRole, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Deletes the role entity corresponding to the specified role.static ProcedureResult
deleteUser
(UserReference aUserReference, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Deletes the user entity corresponding to the specified user reference.static DirectoryDefault.RoleEntity
findRole
(Role aRole, DirectoryDefault aDirectory) Returns the role entity corresponding to the specified role if it exists,null
otherwise.static DirectoryDefault.UserEntity
findUser
(UserReference aUserReference, DirectoryDefault aDirectory) Returns the user entity corresponding to the specified user reference if it exists,null
otherwise.static DirectoryDefault.RoleEntity
Returns a new role entity whose key is the specified role.static DirectoryDefault.UserEntity
newUser
(UserReference aUserReference, DirectoryDefault aDirectory) Returns a new user entity whose key is the specified user reference.static ProcedureResult
saveRole
(DirectoryDefault.RoleEntity aRole, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Makes the specified role entity persistent if it does not yet exist in the EBX® repository; updates it if it exists.static ProcedureResult
saveUser
(DirectoryDefault.UserEntity aUser, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Makes the specified user entity persistent if it does not exist yet in the EBX® repository; updates it if it exists.
-
Constructor Details
-
DirectoryDefaultHelper
public DirectoryDefaultHelper()
-
-
Method Details
-
findRole
Returns the role entity corresponding to the specified role if it exists,null
otherwise.- Throws:
IllegalArgumentException
- if the specified role is a built-in role.
-
findUser
public static DirectoryDefault.UserEntity findUser(UserReference aUserReference, DirectoryDefault aDirectory) Returns the user entity corresponding to the specified user reference if it exists,null
otherwise. -
newRole
Returns a new role entity whose key is the specified role. The returned entity is transient; once its properties have been set, the methodsaveRole
must be called to make it persistent.- Throws:
IllegalArgumentException
- if the specified role is a built-in role.
-
newUser
public static DirectoryDefault.UserEntity newUser(UserReference aUserReference, DirectoryDefault aDirectory) Returns a new user entity whose key is the specified user reference. The returned entity is transient; once its properties have been set, the methodsaveUser
must be called to make it persistent. -
saveRole
public static ProcedureResult saveRole(DirectoryDefault.RoleEntity aRole, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Makes the specified role entity persistent if it does not yet exist in the EBX® repository; updates it if it exists. -
saveUser
public static ProcedureResult saveUser(DirectoryDefault.UserEntity aUser, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Makes the specified user entity persistent if it does not exist yet in the EBX® repository; updates it if it exists. -
deleteRole
public static ProcedureResult deleteRole(Role aRole, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Deletes the role entity corresponding to the specified role.- Throws:
IllegalArgumentException
- if the specified role is a built-in role.
-
deleteUser
public static ProcedureResult deleteUser(UserReference aUserReference, String aTrackingInfoOrNull, DirectoryDefault aDirectory) Deletes the user entity corresponding to the specified user reference.
-