Package org.openiam.idm.srvc.user.dto
Class User
- java.lang.Object
-
- org.openiam.base.BaseObject
-
- org.openiam.base.KeyDTO
-
- org.openiam.base.KeyNameDTO
-
- org.openiam.base.AbstractMetadataTypeDTO
-
- org.openiam.idm.srvc.user.dto.User
-
- All Implemented Interfaces:
Serializable
,BaseIdentity
,ProvisionObject
,ProvisionOperationAware
- Direct Known Subclasses:
ProvisionUser
public class User extends AbstractMetadataTypeDTO implements ProvisionObject
User domain object. This object is used to transfer data between the service layer and the client layer.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
log
-
Fields inherited from class org.openiam.base.AbstractMetadataTypeDTO
mdGrouping, mdTypeId, metadataTypeName
-
Fields inherited from class org.openiam.base.KeyNameDTO
name_
-
Fields inherited from class org.openiam.base.BaseObject
DELETE, NEW, objectState, requestClientIP, requestorLogin, requestorSessionID, requestorUserId, UPDATE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAddress(Address address)
void
addAffiliation(Organization org)
Deprecated.void
addAffiliation(Organization organization, Set<String> rights, Date startDate, Date endDate)
void
addAffiliationWithRights(Organization organization, Set<AccessRight> rights, Date startDate, Date endDate)
void
addEmail(EmailAddress email)
void
addGroup(String id)
void
addGroup(Group group)
Deprecated.void
addGroup(Group group, Set<String> rights, Date startDate, Date endDate)
void
addGroup(Group group, Set<String> rights, Date startDate, Date endDate, String description)
void
addGroupWithRights(Group group, Set<AccessRight> rights, Date startDate, Date endDate)
void
addGroupWithRights(Group group, Set<AccessRight> rights, Date startDate, Date endDate, String description)
void
addOrganization(String id)
void
addPhone(Phone phone)
void
addPrimaryAccount(String accountId, MetadataType type)
void
addPrincipal(Login login)
void
addRelatedAccount(String relatedAccountId, MetadataType type)
void
addResource(String id)
void
addResource(Resource resource)
Deprecated.void
addResource(Resource resource, Set<String> rights, Date startDate, Date endDate)
void
addResource(Resource resource, Set<String> rights, Date startDate, Date endDate, String description)
void
addResourceWithRights(Resource resource, Set<AccessRight> rights, Date startDate, Date endDate)
void
addResourceWithRights(Resource resource, Set<AccessRight> rights, Date startDate, Date endDate, String description)
void
addRole(String id)
void
addRole(Role role)
Deprecated.void
addRole(Role role, Set<String> rights, Date startDate, Date endDate)
void
addRole(Role role, Set<String> rights, Date startDate, Date endDate, String description)
void
addRoleWithRights(Role role, Set<AccessRight> rights, Date startDate, Date endDate)
void
addRoleWithRights(Role role, Set<AccessRight> rights, Date startDate, Date endDate, String description)
void
addSubordinate(Supervisor supervisor)
void
addSupervisor(User superiorUser, MetadataType type)
void
addUserAttribute(UserAttribute entity)
void
addUserNote(UserNote note)
boolean
containsLogin(String loginId)
boolean
containsLoginWithManagedSystem(String managedSystemId)
Address
getAddressById(String id)
Address
getAddressByMetadataType(MetadataType metadataType)
Address
getAddressByName(String name)
UserToOrganizationMembershipXref
getAffiliation(String organizationId)
UserAttribute
getAttribute(String name)
Returns the attribute object that is specified by the NAME parameter.EmailAddress
getDefActiveEmailAddress()
Address
getDefaultAddress()
EmailAddress
getDefaultEmailAddress()
Gets the first default email address for this userPhone
getDefaultPhone()
String
getDisplayName()
EmailAddress
getEmailAddressById(String id)
EmailAddress
getEmailAddressByMetadataType(MetadataType metadataType)
EmailAddress
getEmailByName(String name)
UserToGroupMembershipXref
getGroup(String groupId)
ProvisioningObjectType
getObjectType()
Phone
getPhoneById(String id)
Phone
getPhoneByMetadataType(MetadataType metadataType)
Phone
getPhoneByName(String name)
Login
getPrimaryPrincipal(String managedSysId)
Login
getPrincipalByManagedSysId(String managedSysId)
EmailAddress
getPublishedEmailAddress()
UserToUserMembershipXref
getRelatedAccount(String relatedAccountId)
UserToResourceMembershipXref
getResource(String resourceId)
UserToRoleMembershipXref
getRole(String roleId)
UserNote
getUserNote(String noteId)
Returns the note object for the specified noteId.void
markAffiliateAsDeleted(String id)
Deprecated.void
markGroupAsDeleted(String groupId)
Deprecated.void
markLoginAsDeleted(Login login)
void
markLoginAsInactive(Login login)
void
markRoleAsDeleted(String id)
Deprecated.void
mergeUser(User newData)
method is used to merge user data during its trasfer during selfreg stepsvoid
removeAffiliation(String organizationId)
void
removeAttributes(UserAttribute attr)
Removes the attribute object from the underlying collection.void
removeGroup(String groupId)
void
removeGroup(Group group)
void
removeNote(UserNote note)
Removes the note object from the underlying collection.void
removePrimaryAccount()
void
removeRelatedAccount(String relatedAccountId)
void
removeResource(String resourceId)
void
removeResource(Resource resource)
void
removeRole(String roleId)
void
removeSubordinate(String subordinateId)
void
removeSupervisor(String supervisorId)
void
saveAttribute(UserAttribute attr)
Updates the underlying collection with the UserAttribute object that is being passed in.void
saveNote(UserNote note)
Updates the underlying collection with the UserNote object that is being passed in.void
setAccessRightIds(Collection<String> accessRightIds)
protected User
updateAttributes(Map<String,UserAttribute> attrMap)
void
updateUser(User newUser)
-
Methods inherited from class org.openiam.base.KeyNameDTO
equals, getName, hashCode, setName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openiam.base.BaseIdentity
getId, setId
-
Methods inherited from interface org.openiam.provision.dto.ProvisionObject
getId, setId
-
Methods inherited from interface org.openiam.provision.dto.ProvisionOperationAware
getOperation
-
-
-
-
Method Detail
-
getObjectType
public ProvisioningObjectType getObjectType()
- Specified by:
getObjectType
in interfaceProvisionObject
-
getDisplayName
public String getDisplayName()
-
addAffiliation
@Deprecated public void addAffiliation(Organization org)
Deprecated.
-
markAffiliateAsDeleted
@Deprecated public void markAffiliateAsDeleted(String id)
Deprecated.
-
removeAffiliation
public void removeAffiliation(String organizationId)
-
addAffiliation
public void addAffiliation(Organization organization, Set<String> rights, Date startDate, Date endDate)
-
addAffiliationWithRights
public void addAffiliationWithRights(Organization organization, Set<AccessRight> rights, Date startDate, Date endDate)
-
addUserNote
public void addUserNote(UserNote note)
-
saveNote
public void saveNote(UserNote note)
Updates the underlying collection with the UserNote object that is being passed in. The note is added if its does note exist and updated if its does exist.- Parameters:
note
-
-
removeNote
public void removeNote(UserNote note)
Removes the note object from the underlying collection.- Parameters:
note
-
-
getUserNote
public UserNote getUserNote(String noteId)
Returns the note object for the specified noteId.- Parameters:
noteId
-- Returns:
-
addUserAttribute
public void addUserAttribute(UserAttribute entity)
-
saveAttribute
public void saveAttribute(UserAttribute attr)
Updates the underlying collection with the UserAttribute object that is being passed in. The attribute is added if its does not exist and updated if its does exist.- Parameters:
attr
-
-
removeAttributes
public void removeAttributes(UserAttribute attr)
Removes the attribute object from the underlying collection.- Parameters:
attr
-
-
getAttribute
public UserAttribute getAttribute(String name)
Returns the attribute object that is specified by the NAME parameter.- Parameters:
name
- - The attribute map is keyed on the NAME property.- Returns:
-
getDefaultAddress
public Address getDefaultAddress()
-
getAddressByMetadataType
public Address getAddressByMetadataType(MetadataType metadataType)
-
getEmailAddressByMetadataType
public EmailAddress getEmailAddressByMetadataType(MetadataType metadataType)
-
getDefaultEmailAddress
public EmailAddress getDefaultEmailAddress()
Gets the first default email address for this userIf there is no EmailAddress record with the default flag set to true, this function will return the first active Email Address
- Returns:
-
getEmailByName
public EmailAddress getEmailByName(String name)
-
getDefaultPhone
public Phone getDefaultPhone()
-
addPhone
public void addPhone(Phone phone)
-
getPhoneByMetadataType
public Phone getPhoneByMetadataType(MetadataType metadataType)
-
addAddress
public void addAddress(Address address)
-
getEmailAddressById
public EmailAddress getEmailAddressById(String id)
-
addEmail
public void addEmail(EmailAddress email)
-
markRoleAsDeleted
@Deprecated public void markRoleAsDeleted(String id)
Deprecated.
-
removeRole
public void removeRole(String roleId)
-
addRole
public void addRole(Role role, Set<String> rights, Date startDate, Date endDate, String description)
-
addRoleWithRights
public void addRoleWithRights(Role role, Set<AccessRight> rights, Date startDate, Date endDate)
-
addRoleWithRights
public void addRoleWithRights(Role role, Set<AccessRight> rights, Date startDate, Date endDate, String description)
-
addRole
@Deprecated public void addRole(Role role)
Deprecated.
-
removeGroup
public void removeGroup(String groupId)
-
removeGroup
public void removeGroup(Group group)
-
markGroupAsDeleted
@Deprecated public void markGroupAsDeleted(String groupId)
Deprecated.
-
getResource
public UserToResourceMembershipXref getResource(String resourceId)
-
getRole
public UserToRoleMembershipXref getRole(String roleId)
-
getRelatedAccount
public UserToUserMembershipXref getRelatedAccount(String relatedAccountId)
-
getGroup
public UserToGroupMembershipXref getGroup(String groupId)
-
getAffiliation
public UserToOrganizationMembershipXref getAffiliation(String organizationId)
-
markLoginAsInactive
public void markLoginAsInactive(Login login)
-
markLoginAsDeleted
public void markLoginAsDeleted(Login login)
-
addGroup
@Deprecated public void addGroup(Group group)
Deprecated.Use addGroupWithRights- Parameters:
group
-
-
addGroup
public void addGroup(Group group, Set<String> rights, Date startDate, Date endDate, String description)
-
addGroupWithRights
public void addGroupWithRights(Group group, Set<AccessRight> rights, Date startDate, Date endDate)
-
addGroup
public void addGroup(String id)
-
addRole
public void addRole(String id)
-
addResource
public void addResource(String id)
-
addOrganization
public void addOrganization(String id)
-
addGroupWithRights
public void addGroupWithRights(Group group, Set<AccessRight> rights, Date startDate, Date endDate, String description)
-
addResource
@Deprecated public void addResource(Resource resource)
Deprecated.Use addResourceWithRights- Parameters:
resource
-
-
addResourceWithRights
public void addResourceWithRights(Resource resource, Set<AccessRight> rights, Date startDate, Date endDate)
-
addResourceWithRights
public void addResourceWithRights(Resource resource, Set<AccessRight> rights, Date startDate, Date endDate, String description)
-
removeResource
public void removeResource(String resourceId)
-
removeResource
public void removeResource(Resource resource)
-
addResource
public void addResource(Resource resource, Set<String> rights, Date startDate, Date endDate)
-
addResource
public void addResource(Resource resource, Set<String> rights, Date startDate, Date endDate, String description)
-
addPrincipal
public void addPrincipal(Login login)
-
containsLogin
public boolean containsLogin(String loginId)
-
containsLoginWithManagedSystem
public boolean containsLoginWithManagedSystem(String managedSystemId)
-
mergeUser
public void mergeUser(User newData)
method is used to merge user data during its trasfer during selfreg steps- Parameters:
newData
- - merge from
-
updateUser
public void updateUser(User newUser)
-
updateAttributes
protected User updateAttributes(Map<String,UserAttribute> attrMap)
-
setAccessRightIds
public void setAccessRightIds(Collection<String> accessRightIds)
-
addSupervisor
public void addSupervisor(User superiorUser, MetadataType type)
-
removeSupervisor
public void removeSupervisor(String supervisorId)
-
addSubordinate
public void addSubordinate(Supervisor supervisor)
-
removeSubordinate
public void removeSubordinate(String subordinateId)
-
getPublishedEmailAddress
public EmailAddress getPublishedEmailAddress()
-
getDefActiveEmailAddress
public EmailAddress getDefActiveEmailAddress()
-
addPrimaryAccount
public void addPrimaryAccount(String accountId, MetadataType type)
-
removePrimaryAccount
public void removePrimaryAccount()
-
addRelatedAccount
public void addRelatedAccount(String relatedAccountId, MetadataType type)
-
removeRelatedAccount
public void removeRelatedAccount(String relatedAccountId)
-
-