public interface ProfileAPI extends ProfileAPI
ProfileAPI
gives FULL access on
profile administation: creation / update / removal of profiles, adding / removing members to / from a profile, retrieving / searching for profiles. ProfileEntry
Modifier and Type | Method and Description |
---|---|
Profile |
createProfile(ProfileCreator creator)
Create a new custom profile
|
Profile |
createProfile(String name,
String description)
Create a new custom profile
|
Profile |
createProfile(String name,
String description,
String iconPath)
Deprecated.
|
ProfileEntry |
createProfileEntry(ProfileEntryCreator creator)
Create a new profile entry
|
ProfileEntry |
createProfileEntry(String name,
String description,
long profileId,
String type)
Create a new profile entry
|
ProfileEntry |
createProfileEntry(String name,
String description,
long profileId,
String type,
String page)
Create a new profile entry
|
void |
deleteProfile(long id)
Delete a specific custom profile
|
void |
deleteProfileEntry(long id)
Delete a specific profile entry
|
byte[] |
exportAllProfiles()
Export all profiles from DataBase to XML file
|
byte[] |
exportProfilesWithIdsSpecified(long[] profileIds)
Export specific profiles from DataBase to XML file
|
List<ImportStatus> |
importProfiles(byte[] xmlContent,
ImportPolicy policy)
Import profiles from XML file.
|
List<String> |
importProfilesUsingSpecifiedPolicy(byte[] xmlContent,
ImportPolicy policy)
Deprecated.
|
Profile |
updateProfile(long id,
ProfileUpdater updater)
Update a custom profile.
|
ProfileEntry |
updateProfileEntry(long id,
ProfileEntryUpdater updater)
Update a profile entry.
|
createProfileMember, createProfileMember, deleteProfileMember, getNumberOfProfileMembers, getProfile, getProfileEntry, getProfilesForUser, getProfilesForUser, searchProfileEntries, searchProfileMembers, searchProfiles
@Deprecated Profile createProfile(String name, String description, String iconPath) throws AlreadyExistsException, CreationException
createProfile(String name, String description)
name
- the profile namedescription
- the profile descriptioniconPath
- the profile icon pathCreationException
- If can't create the new profileAlreadyExistsException
- If the profile already existsProfile createProfile(String name, String description) throws AlreadyExistsException, CreationException
name
- the profile namedescription
- the profile descriptioniconPath
- the profile icon pathCreationException
- If can't create the new profileAlreadyExistsException
- If the profile already existsProfile createProfile(ProfileCreator creator) throws AlreadyExistsException, CreationException
creator
- the attributes to initializeCreationException
- If can't create the new profileAlreadyExistsException
- If the profile already existsvoid deleteProfile(long id) throws DeletionException
id
- the identifier of the profile to deleteDeletionException
- If can't delete the profilebyte[] exportAllProfiles() throws ExecutionException
ExecutionException
- If can't export profilesbyte[] exportProfilesWithIdsSpecified(long[] profileIds) throws ExecutionException
profileIds
- profile identifiers to exportExecutionException
- If can't export profiles@Deprecated List<String> importProfilesUsingSpecifiedPolicy(byte[] xmlContent, ImportPolicy policy) throws ExecutionException
importProfiles(byte[], ImportPolicy)
xmlContent
- xml content to importpolicy
- import policy to define different way how to import xml content in different caseExecutionException
- If can't import profilesProfile updateProfile(long id, ProfileUpdater updater) throws ProfileNotFoundException, UpdateException, AlreadyExistsException
id
- the identifier of the profile to updateupdater
- the attributes to updateUpdateException
- If can't update profilesProfileNotFoundException
- If the profile to update cannot be found with the given idAlreadyExistsException
- If a profile with the new name already existsProfileEntry createProfileEntry(ProfileEntryCreator creator) throws CreationException
creator
- the attributes to initialize.
The type value must be "folder" or "link". If type = "link", the page is also mandatory.
Index must be an odd long value if the profile is not inserted at last position
To insert at first position, the value of index must be -1CreationException
- If can't create the new profile entryProfileEntry createProfileEntry(String name, String description, long profileId, String type) throws CreationException
name
- the profile entry namedescription
- the profile entry descriptionprofileId
- the linked profile identifiertype
- the value must be "folder" or "link". If type = "link", the page parameter.CreationException
- If can't create the new profile entryProfileEntry createProfileEntry(String name, String description, long profileId, String type, String page) throws CreationException
name
- the profile entry namedescription
- the profile entry descriptionprofileId
- the linked profile idtype
- the value must be "folder" or "link". If type = "link", the page parameter.page
- token of the linked pageCreationException
- If can't create the new profile entryvoid deleteProfileEntry(long id) throws DeletionException
id
- the identifier of the profile entry to deleteDeletionException
- If can't delete the profile entryProfileEntry updateProfileEntry(long id, ProfileEntryUpdater updater) throws ProfileEntryNotFoundException, UpdateException
id
- the identifier of the profile entry to updateupdater
- the attributes to updateProfileEntryNotFoundException
- if no ProfileEntry
can be found with the provided ID.UpdateException
- If can't update the profile entry
Index must be an odd long value if index is updated
To put at first position, the value of index must be -1List<ImportStatus> importProfiles(byte[] xmlContent, ImportPolicy policy) throws ExecutionException
xmlContent
- xml content to importpolicy
- import policy to define different ways of how to import xml content in different caseExecutionException
- If there is an unexpected error during the importsCopyright © 2014 Bonitasoft S.A.. All rights reserved.