com.ibm.wsspi.wim
Class RepositoryImpl
- java.lang.Object
-
- com.ibm.wsspi.wim.RepositoryImpl
-
- All Implemented Interfaces:
- Repository
public abstract class RepositoryImpl extends java.lang.Object implements Repository
The default implementation of Repository interface.
-
-
Field Summary
Fields Modifier and Type Field and Description java.lang.String
iReposId
-
Constructor Summary
Constructors Constructor and Description RepositoryImpl()
-
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 identifiers)
Delete the entity specified in the root data object.DataObject
get(DataObject root)
Returns information of the specified entities.java.lang.String
getRepositoryId()
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
-
getRepositoryId
public java.lang.String getRepositoryId()
-
initialize
public void initialize(DataObject reposConfig) throws WIMException
Description copied from interface:Repository
Initializes the adapter.- Specified by:
initialize
in interfaceRepository
- Parameters:
reposConfig
- The DataObject which contains configuration data of this adapter.- Throws:
WIMException
-
create
public DataObject create(DataObject root) throws WIMException
Description copied from interface:Repository
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.- Specified by:
create
in interfaceRepository
- Parameters:
root
- The root data object which contains the entity to be created.- Throws:
WIMException
-
get
public DataObject get(DataObject root) throws WIMException
Description copied from interface:Repository
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.- Specified by:
get
in interfaceRepository
- Parameters:
root
- The root data object containing the request information.- Throws:
WIMException
-
delete
public DataObject delete(DataObject identifiers) throws WIMException
Description copied from interface:Repository
Delete the entity specified in the root data object.- Specified by:
delete
in interfaceRepository
- Parameters:
identifiers
- The root data object which contains the entity to delete. The identifier of the entity should be specified.- Throws:
WIMException
-
update
public DataObject update(DataObject root) throws WIMException
Description copied from interface:Repository
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.- Specified by:
update
in interfaceRepository
- Parameters:
root
- The root data object containing entity with changes need to update.- Throws:
WIMException
-
search
public DataObject search(DataObject root) throws WIMException
Description copied from interface:Repository
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.- Specified by:
search
in interfaceRepository
- Parameters:
root
- the root data object containing the control(s) related to search.- Throws:
WIMException
-
login
public DataObject login(DataObject root) throws WIMException
Description copied from interface:Repository
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.- Specified by:
login
in interfaceRepository
- Parameters:
root
- the root data object containing the account to authenticate.- Throws:
WIMException
-
createSchema
public DataObject createSchema(DataObject root) throws WIMException
Description copied from interface:Repository
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.- Specified by:
createSchema
in interfaceRepository
- Parameters:
root
- The input root data object which contains the information of the new entity and property types.- Throws:
WIMException
-
getSchema
public DataObject getSchema(DataObject root) throws WIMException
Description copied from interface:Repository
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.- Specified by:
getSchema
in interfaceRepository
- Parameters:
root
- The input root data object which contains the request information.- Throws:
WIMException
-
-