|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProvisioningService
Method Summary | |
---|---|
void |
changeAccountPassword(long accountId, char[] newPassword) This API should be called when user wants to change the password for his account. |
void |
changeAccountType(long accountId, Account.ACCOUNT_TYPE accountType) This API should be called when user wants to change the account type of the account. |
void |
disable(long accountId) Disables an account provisioned to a user. |
void |
enable(long accountId) Enables an existing account provisioned to a user. |
Account |
getAccountDetails(long accountId) Returns a Account value object which contains detailed information about the account corresponding to the specified account ID. |
java.util.List |
getAccountDetails(long[] accountIds) This API method returns a list of Account value object given the accountIds.The account object contains detailed information about the account corresponding to the specified account ID. |
java.util.List |
getAccountsProvisionedToUser(java.lang.String userId) This API method returns a list of all the accounts provisioned to the user. |
java.util.List |
getAccountsProvisionedToUser(java.lang.String userId, boolean populateAccountData) This API method returns a list of all the accounts provisioned to the user |
java.util.List |
getAccountsProvisionedToUser(java.lang.String userId, SearchCriteria criteria, java.util.HashMap configParams, boolean populateAccountData) Returns a list of all the accounts provisioned to the user |
EntitlementInstance |
getEntitlementInstance(long entitlementInstanceKey) This API method returns an entitlement instance provisioned to the user corresponding to the entitlement key |
java.util.List |
getEntitlementInstances(long[] entitlementInstanceKeys) Returns a list of entitlement instances provisioned to the user corresponding to the entitlement instances keys |
java.util.List |
getEntitlementsForUser(java.lang.String userId) Returns a list of all the entitlements provisioned to the user |
java.util.List |
getEntitlementsForUser(java.lang.String userId, SearchCriteria criteria, java.util.HashMap configParams) Searches for entitlement instances provisioned to a user matching the specified SearchCriteria |
Account |
getMinimalAccountDetails(long accountId) This API method returns an Account value object corresponding to the specified account ID. |
java.util.List |
getPasswordResettableAccountsForUser(java.lang.String userID) Returns a list of accounts provisioned to the user for which password can be reset. |
java.util.List |
getUserAccountDetailsInApplicationInstance(java.lang.String userId, long appInstanceKey) Checks if the user has an account in the specified application instance. |
void |
grantEntitlement(long accountId, Entitlement entitlement) Grants the specified Entitlement to the specified account |
void |
grantEntitlements(long accountId, java.util.List entitlements) Grants the specified Entitlements to the specified account |
boolean |
isApplicationInstanceProvisionedToUser(java.lang.String userId, ApplicationInstance appInstance) Returns a boolean indicating whether the specified user has an account in the specified application instance. |
boolean |
isEntitlementProvisionedToUser(java.lang.String userId, Entitlement entitlement) Returns a boolean indicating whether the specified user has been granted the specific entitlement. |
void |
modify(Account account) Modifies an existing provisioned account. |
Account |
prepopulateAccountData(java.lang.String userId, ApplicationInstance appInstance) This API should be called before invoking the provision API. |
long |
provision(java.lang.String userId, Account account) This API provisions an account to a user. |
void |
revoke(long accountId) Revokes an account provisioned to a user. |
void |
revokeEntitlement(EntitlementInstance entitlementInstance) Revokes the specified entitlement from the specified accounts |
void |
revokeEntitlements(java.util.List entitlementInstances) Revokes the specified entitlement from the specified accounts |
void |
updateEntitlement(EntitlementInstance entitlementInstance) Updates the attributes of the specified entitlement instance |
void |
updateEntitlements(java.util.List entitlementInstances) Updates the attributes of the specified entitlement instances |
Method Detail |
---|
long provision(java.lang.String userId, Account account) throws UserNotFoundException, ApplicationInstanceNotFoundException, AccessDeniedException, GenericProvisioningException
userId
- The target user to whom the account will be provisioned.accountvo
- Contains information regarding the account profile of the user. This value object will have information regarding the application instance used during provisioning.UserNotFoundException
- thrown if the target user does not exist in the systemApplicationInstanceNotFoundException
- thrown if the application instance contained in the value object does not exist in the system.AccessDeniedException
- thrown if there are authorization failures while provisioning the account to the target userGenericProvisioningException
- thrown if any other error, connector failures occur.void enable(long accountId) throws AccountNotFoundException, ImproperAccountStateException, AccessDeniedException, GenericProvisioningException
accountId
- The accountId of the account under considerationAccountNotFoundException
- thrown when the account with the specified accountId does not exist.AccessDeniedException
- thrown if there are authorization failures while performing enable operation on the accountGenericProvisioningException
- thrown if any other error, connector failures occur.ImproperAccountStateException
- thrown if the account is not in disabled state when the enable operation is attemptedvoid disable(long accountId) throws AccountNotFoundException, ImproperAccountStateException, AccessDeniedException, GenericProvisioningException
accountId
- The accountId of the account under considerationAccountNotFoundException
- thrown when the account with the specified accountId does not exist.AccessDeniedException
- thrown if there are authorization failures while performing enable operation on the accountGenericProvisioningException
- thrown if any other error, connector failures occur.ImproperAccountStateException
- thrown if the account is not in provisioned/enabled state when the enable operation is attemptedvoid modify(Account account) throws AccountNotFoundException, AccessDeniedException, GenericProvisioningException
account
-AccountNotFoundException
- thrown when the account with the specified accountId does not exist.AccessDeniedException
- thrown if there are authorization failures while performing enable operation on the accountGenericProvisioningException
- thrown if any other error, connector failures occur.void revoke(long accountId) throws AccountNotFoundException, AccessDeniedException, GenericProvisioningException
accountId
- The accountId of the account under considerationAccessDeniedException
- thrown if there are authorization failures while performing revoke operation on the accountGenericProvisioningException
- thrown if any other error, connector failures occur.ImproperAccountStateException
- thrown if the account is already revokedAccountNotFoundException
void grantEntitlement(long accountId, Entitlement entitlement) throws AccountNotFoundException, EntitlementNotFoundException, EntitlementAlreadyProvisionedException, AccessDeniedException, ImproperAccountStateException, GenericProvisioningException
accountId
- the accountId of the account to which the entitlements should be grantedentitlement
- the entitlement which should be granted to the accountAccountNotFoundException
- if the account with the specified accountId does not exist.GenericProvisioningException
- if any other errors occurEntitlementNotFoundException
- if the entitlement definition does not existEntitlementAlreadyProvisionedException
- if the entitlement has already provisioned to the specified accountImproperAccountStateException
- if the account is already revokedAccessDeniedException
void revokeEntitlement(EntitlementInstance entitlementInstance) throws AccountNotFoundException, EntitlementNotProvisionedException, AccessDeniedException, GenericProvisioningException
entitlementInstance
- the entitlement that needs to be revokedAccountNotFoundException
- if the specified accountId is not foundAccessDeniedException
- if there are authorization failures while performing the entitlement revokeGenericProvisioningException
- if any other errors occurEntitlementNotProvisionedException
void updateEntitlement(EntitlementInstance entitlementInstance) throws AccountNotFoundException, EntitlementNotFoundException, AccessDeniedException, GenericProvisioningException
entitlementInstance
- the modified entitlement instanceAccountNotFoundException
- if the specified accountId is not foundEntitlementNotFoundException
- if the specified entitlement instance is not found in the systemAccessDeniedException
- if there are authorization failures while performing the entitlement updateGenericProvisioningException
- if any other errors occur while performing entitlement updatevoid grantEntitlements(long accountId, java.util.List entitlements) throws BulkProvisioningException
accountId
- the accountId of the account to which the entitlements should be grantedentitlements
- the list of entitlements that need to be granted to the accountAccessDeniedException
- if there are authorization failures while performing the entitlement grantBulkProvisioningException
- if errors occur during bulk operationsvoid revokeEntitlements(java.util.List entitlementInstances) throws BulkProvisioningException
entitlementInstances
- the list of entitlement instances that need to be revokedAccessDeniedException
- if there are authorization failures while performing the entitlement revokeBulkProvisioningException
- if errors occur during bulk operationsvoid updateEntitlements(java.util.List entitlementInstances) throws BulkProvisioningException
entitlementInstances
- the list of modified entitlement instancesAccessDeniedException
- if there are authorization failures while performing the entitlement updateBulkProvisioningException
- if errors occur during bulk operationsjava.util.List getAccountsProvisionedToUser(java.lang.String userId) throws UserNotFoundException, GenericProvisioningException
getAccountsProvisionedToUser(String userId, boolean populateAccountData)
userId
-UserNotFoundException
GenericProvisioningException
java.util.List getAccountsProvisionedToUser(java.lang.String userId, SearchCriteria criteria, java.util.HashMap configParams, boolean populateAccountData) throws UserNotFoundException, GenericProvisioningException
userId
-criteria
- The search criteria based on which entries will be retrieved from the backend. The SearchCriteria Operators supported are AND, OR, NOT, GREATER_THAN, GREATER_EQUAL, LESS_THAN, LESS_EQUAL, EQUAL and NOT_EQUAL. For additional comparisons like contains the SearchCriteria Operator will be EQUAL with value to be searched will be '*<value>*'
The following is a list of attributes supported: ProvisioningConstants.AppInstanceSearchAttribute.DISPLAY_NAME.getId() ProvisioningConstants.AppInstanceSearchAttribute.OBJ_NAME.getId() ProvisioningConstants.AppInstanceSearchAttribute.ACCOUNT_STATUS.getId()
configParams
- Parameters to further configure the search operation. There are four configuration parameters. STARTROW, ENDROW, SORTEDBY and SORTORDER.
The STARTROW and ENDROW search configuration parameters indicates which subset of the complete search result is to be fetched. These parameters are mandatory.
The SORTEDBY search configuration parameter indicates the attribute on which search result is to be sorted. This parameter is optional
The SORTORDER search configuration parameter indicates the order of sorting. There are two possible values for this parameter. To sort the result in ascending order use SortOrder.ASCENDING and to sort the result in descending order use SortOrder.DESCENDING.
The following is a list of attributes supported: ProvisioningConstants.AppInstanceSearchAttribute.DISPLAY_NAME.getId() ProvisioningConstants.AppInstanceSearchAttribute.OBJ_NAME.getId() ProvisioningConstants.AppInstanceSearchAttribute.ACCOUNT_STATUS.getId() ProvisioningConstants.AppInstanceSearchAttribute.PROVISIONED_ON.getId()
populateAccountData
- A boolean to indicate whether account data should be populated in the returned list of Account VO. If set to false, account data will not be populated.UserNotFoundException
GenericProvisioningException
java.util.List getAccountsProvisionedToUser(java.lang.String userId, boolean populateAccountData) throws UserNotFoundException, GenericProvisioningException
userId
- The target user for whom the list of account is returned.populateAccountData
- boolean to indicate if account data should be populated in the returned Account VO. If set to false, account data will not be populated.UserNotFoundException
- if the target user does not exist (i.e deleted) in the system.GenericProvisioningException
- if any other errors occur while fetching the accounts provisioned to user. This API does not throw AccessDeniedException since this is a bulk operation.Account
, AccountData
, ApplicationInstance
, EntitlementInstance
EntitlementInstance getEntitlementInstance(long entitlementInstanceKey) throws AccessDeniedException, EntitlementInstanceNotFoundException, GenericProvisioningException
userId
-AccessDeniedException
EntitlementInstanceNotFoundException
GenericProvisioningException
java.util.List getEntitlementInstances(long[] entitlementInstanceKeys) throws GenericProvisioningException
userId
-GenericProvisioningException
java.util.List getEntitlementsForUser(java.lang.String userId) throws UserNotFoundException, GenericProvisioningException
userId
-UserNotFoundException
GenericProvisioningException
java.util.List getEntitlementsForUser(java.lang.String userId, SearchCriteria criteria, java.util.HashMap configParams) throws UserNotFoundException, GenericProvisioningException
SearchCriteria
userId
- The usr_key of target usercriteria
- The search criteria based on which entries will be retrieved from the backend. The SearchCriteria Operators supported are AND, OR, NOT, GREATER_THAN, GREATER_EQUAL, LESS_THAN, LESS_EQUAL, EQUAL and NOT_EQUAL. For additional comparisons like contains the SearchCriteria Operator will be EQUAL with value to be searched will be '*<value>*'
The following is a list of search attributes supported: ProvisioningConstants.EntitlementSearchAttribute.ENTITLEMENT_DISPLAYNAME.getId()
configParams
- Parameters to further configure the search operation. There are four configuration parameters. STARTROW, ENDROW, SORTEDBY and SORTORDER.
The STARTROW and ENDROW search configuration parameters indicates which subset of the complete search result is to be fetched. These parameters are mandatory.
The SORTEDBY search configuration parameter indicates the attribute on which search result is to be sorted. This parameter is optional
The SORTORDER search configuration parameter indicates the order of sorting. There are two possible values for this parameter. To sort the result in ascending order use SortOrder.ASCENDING and to sort the result in descending order use SortOrder.DESCENDING.
The following is a list of search attributes supported: ProvisioningConstants.EntitlementSearchAttribute.ENTITLEMENT_DISPLAYNAME.getId()
UserNotFoundException
GenericProvisioningException
boolean isApplicationInstanceProvisionedToUser(java.lang.String userId, ApplicationInstance appInstance) throws UserNotFoundException, ApplicationInstanceNotFoundException, GenericProvisioningException, AccessDeniedException
userId
-appInstance
-UserNotFoundException
- thrown if a user with the specified userId is not found in the systemApplicationInstanceNotFoundException
- thrown if the specified Application instance is not found in the system.GenericProvisioningException
AccessDeniedException
boolean isEntitlementProvisionedToUser(java.lang.String userId, Entitlement entitlement) throws UserNotFoundException, EntitlementNotFoundException, GenericProvisioningException, AccessDeniedException
userId
-entitlement
-UserNotFoundException
- thrown if a user with the specified userId is not found in the systemEntitlementNotFoundException
- thrown if the specified Entitlement is not found in the system.GenericProvisioningException
AccessDeniedException
Account getAccountDetails(long accountId) throws AccountNotFoundException, AccessDeniedException, GenericProvisioningException
accountId
-AccountNotFoundException
- thrown if no account is found corresponding to the specified accountId.AccessDeniedException
- thrown if there are authorization failuresGenericProvisioningException
Account getMinimalAccountDetails(long accountId) throws AccountNotFoundException, AccessDeniedException, GenericProvisioningException
getAccountDetails(long accountId)
accountId
- The account id of account whose details to be fetched.Account
value object.AccountNotFoundException
- if no account is found corresponding to the specified accountId.AccessDeniedException
- if there is any authorization failure fetching account details. To avoid this exception, the logged in user should at least have ApplicationInstance
Viewer Admin Role on Organization to which this ApplicationInstance
is published to. If default permissions to admin roles are changed, then make sure user's admin role should have permission to view ApplicationInstance
.GenericProvisioningException
- if any other errors occur while fetching account details.java.util.List getAccountDetails(long[] accountIds) throws GenericProvisioningException
accountId
-GenericProvisioningException
java.util.List getUserAccountDetailsInApplicationInstance(java.lang.String userId, long appInstanceKey) throws UserNotFoundException, ApplicationInstanceNotFoundException, AccessDeniedException, GenericProvisioningException
userId
-appInstanceKey
-UserNotFoundException
- thrown if no user is found in the system.ApplicationInstanceNotFoundException
- thrown if the specified Application instance is not found in the system.AccessDeniedException
- thrown if there are authorization failuresGenericProvisioningException
Account prepopulateAccountData(java.lang.String userId, ApplicationInstance appInstance) throws UserNotFoundException, ApplicationInstanceNotFoundException, AccessDeniedException, GenericProvisioningException
userId
-appInstance
-UserNotFoundException
- thrown if a user with the specified userId is not found in the systemApplicationInstanceNotFoundException
- thrown if the specified Application instance is not found in the system.AccessDeniedException
- thrown if there are authorization failuresGenericProvisioningException
void changeAccountPassword(long accountId, char[] newPassword) throws AccessDeniedException, AccountNotFoundException, GenericProvisioningException
accountId
- - This is OIU_KEY for the accountnewPassword
- - Character array containing new passwordAccountNotFoundException
- thrown if no account is found corresponding to the specified accountId.AccessDeniedException
- thrown if there are authorization failuresGenericProvisioningException
- thrown if any error in db, connector failures occur.java.util.List getPasswordResettableAccountsForUser(java.lang.String userID) throws UserNotFoundException, GenericProvisioningException
userId
-UserNotFoundException
GenericProvisioningException
void changeAccountType(long accountId, Account.ACCOUNT_TYPE accountType) throws AccessDeniedException, AccountNotFoundException, GenericProvisioningException
accountId
- - This is OIU_KEY for the accountaccountType
- - The values can be Account.ACCOUNT_TYPE.Primary, Account.ACCOUNT_TYPE.Secondery, Account.ACCOUNT_TYPE.Admin, Account.ACCOUNT_TYPE.Other, Account.ACCOUNT_TYPE.ServiceAccount An account can not change from Primary to any other type However, any other type can be changed into primary account.AccountNotFoundException
- thrown if no account is found corresponding to the specified accountId.AccessDeniedException
- thrown if there are authorization failuresGenericProvisioningException
- thrown if any error in db, connector failures occur.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |