com.ibm.wsspi.wim
Interface Repository
-
- All Known Implementing Classes:
- RepositoryImpl
public interface Repository
Repository interface to be implemented by all adapters.
-
-
Method Summary
Methods Modifier and Type Method and Description DataObject
create(DataObject root)
Creates the entity under the given root data object.DataObject
createSchema(DataObject root)
Creates the schema of new entity types and property types at runtime.DataObject
delete(DataObject root)
Delete the entity specified in the root data object.DataObject
get(DataObject root)
Returns information of the specified entities.DataObject
getSchema(DataObject root)
Retrieve the repository specific schema information of entity types and property types.void
initialize(DataObject reposConfig)
Initializes the adapter.DataObject
login(DataObject root)
Authenticates the account data object in the specified root data object.DataObject
search(DataObject root)
Searches the profile repositories for entities matching the given search expression and returns them with the requested properties.DataObject
update(DataObject root)
Updates entity specified in the root data object.
-
-
-
Method Detail
-
initialize
void initialize(DataObject reposConfig) throws WIMException
Initializes the adapter.- Parameters:
reposConfig
- The DataObject which contains configuration data of this adapter.- Throws:
WIMException
-
create
DataObject create(DataObject root) throws WIMException
Creates the entity under the given root data object. This method is used for creating an entity. Empty root data object can be got from getRootDataObject API. The entity needed to create can be added under the root data object along with the properties.
The output root data object of the create method contains the created entity data object which contains its identifier.- Parameters:
root
- The root data object which contains the entity to be created.- Throws:
WIMException
- Return:
- The root data object which contains the created entity and its identifier.
-
get
DataObject get(DataObject root) throws WIMException
Returns information of the specified entities. The entities to be retrieved are added under the root data object. Controls can be added under the root data object to specify what kind of information is returned. This method is used for retrieving information of an entity or entities. The entities to retrieve need to add under the root data object with the identifiers specified. By specifying different controls, different information can be returned. For example, PropertyControl is used for returning the properties of the entity/entities. GroupMembershipControl is used for returning groups the entity/entities belongs to.- Parameters:
root
- The root data object containing the request information.- Throws:
WIMException
- Return:
- The root data object containing the requested information.
-
delete
DataObject delete(DataObject root) throws WIMException
Delete the entity specified in the root data object.- Parameters:
root
- The root data object which contains the entity to delete. The identifier of the entity should be specified.- Throws:
WIMException
- Return:
- The root data object containing the deleted entity and its descendants (if there are any), with their identifiers.
-
update
DataObject update(DataObject root) throws WIMException
Updates entity specified in the root data object. There are two ways to update. The caller can create an empty root data object and specify the changes needed. All the changes will replace the existing values. The caller can also call get API method to get the values to be updated, make the changes, then send back to update.- Parameters:
root
- The root data object containing entity with changes need to update.- Throws:
WIMException
- Return:
- The root data object containing the updated entity with its identifier.
-
search
DataObject search(DataObject root) throws WIMException
Searches the profile repositories for entities matching the given search expression and returns them with the requested properties. The search method is used to search entities. Only the entities which match the search expression will be returned. The following four controls are related to search. There are SearchControl, PageControl, SortControl, PageResponseControl, and SortResponseControl. The SearchControl contains the property name list which you want to return from the search operation. For example, you want get uid, cn for all the people whose sn equals to "Doe". The search expression is also included in the SearchControl. If you want to use the paged search function, the PageControl is needed.- Parameters:
root
- the root data object containing the control(s) related to search.- Throws:
WIMException
- Return:
- the root data object containing the entities matching the search expression.
-
login
DataObject login(DataObject root) throws WIMException
Authenticates the account data object in the specified root data object. User can be authenticated either using loginId/password or using X509Certificate. The successfully authenticated account data object will be returned with requested properties.- Parameters:
root
- the root data object containing the account to authenticate.- Throws:
WIMException
- Return:
- the root data object containing the account which is successfully authenticated.
-
createSchema
DataObject createSchema(DataObject root) throws WIMException
Creates the schema of new entity types and property types at runtime. When this method is called, the new types should have been added to the schema model in the SchemaManager. and the configuration information in ConfigManager should have been updated to accept these new types. The adapter needs to support the new types and refresh the schema or configuration cache if it is necessary. If the adapter does not support creating new types, com.ibm.websphere.exception.OperationNotSupportException should be thrown.- Parameters:
root
- The input root data object which contains the information of the new entity and property types.- Throws:
WIMException
- Return:
- The output root data object which contains the new types successfully created.
-
getSchema
DataObject getSchema(DataObject root) throws WIMException
Retrieve the repository specific schema information of entity types and property types. Examples of the repository specific schema include the LDAP syntax of the property and the object classes of the entity.- Parameters:
root
- The input root data object which contains the request information.- Throws:
WIMException
- Return:
- The output root data object which contains the requested schemas.
-
-