Interface ResourceService
-
- All Superinterfaces:
JAXRSService
- All Known Implementing Classes:
ResourceServiceImpl
@Path("resources") public interface ResourceService extends JAXRSServiceREST operations for external resources.
-
-
Field Summary
-
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheck(@NotNull ResourceTO resourceTO)Checks whether the connection to resource could be established.javax.ws.rs.core.Responsecreate(@NotNull ResourceTO resourceTO)Creates a new resource.voiddelete(@NotNull String key)Deletes the resource matching the given name.javax.ws.rs.core.ResponsegetConnObjectKeyValue(@NotNull String key, @NotNull String anyTypeKey, @NotNull String anyKey)Returns the calculated connObjectKey value for the given type and key.List<ResourceTO>list()Returns a list of all resources.ResourceTOread(@NotNull String key)Returns the resource with matching name.ConnObjectreadConnObject(@NotNull String key, @NotNull String anyTypeKey, @NotNull String value)Returns connector object from the external resource, for the given type and key.voidremoveSyncToken(@NotNull String key, @NotNull String anyTypeKey)Removes the sync token value associated to the given any type from the given resource.PagedConnObjectResultsearchConnObjects(@NotNull String key, @NotNull String anyTypeKey, ConnObjectTOQuery connObjectTOQuery)Returns a paged list of connector objects from external resource, for the given type, matching page/size conditions.voidsetLatestSyncToken(@NotNull String key, @NotNull String anyTypeKey)Queries the connector underlying the given resource for the latest sync token value associated to the given any type and stores the value internally, for later usage.voidupdate(@NotNull ResourceTO resourceTO)Updates the resource matching the given name.
-
-
-
Method Detail
-
getConnObjectKeyValue
@OPTIONS @Path("{key}/{anyTypeKey}/{anyKey}") javax.ws.rs.core.Response getConnObjectKeyValue(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("anyTypeKey") @NotNull String anyTypeKey, @NotNull @PathParam("anyKey") @NotNull String anyKey)Returns the calculated connObjectKey value for the given type and key.- Parameters:
key- name of resource to read connector object fromanyTypeKey- any object typeanyKey- user, group or any object key- Returns:
- connObjectKey value for the external resource, for the given type and key
-
readConnObject
@GET @Path("{key}/{anyTypeKey}/{value}") @Produces({"application/json","application/yaml","application/xml"}) ConnObject readConnObject(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("anyTypeKey") @NotNull String anyTypeKey, @NotNull @PathParam("value") @NotNull String value)Returns connector object from the external resource, for the given type and key.- Parameters:
key- name of resource to read connector object fromanyTypeKey- any object typevalue- if value looks like a UUID then it is interpreted as user, group or any object key, otherwise as key value on the resource- Returns:
- connector object from the external resource, for the given type and key
-
searchConnObjects
@GET @Path("{key}/{anyTypeKey}") @Produces({"application/json","application/yaml","application/xml"}) PagedConnObjectResult searchConnObjects(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("anyTypeKey") @NotNull String anyTypeKey, @BeanParam ConnObjectTOQuery connObjectTOQuery)Returns a paged list of connector objects from external resource, for the given type, matching page/size conditions.- Parameters:
key- name of resource to read connector object fromanyTypeKey- any object typeconnObjectTOQuery- query conditions- Returns:
- connector objects from the external resource, for the given type
-
read
@GET @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) ResourceTO read(@NotNull @PathParam("key") @NotNull String key)Returns the resource with matching name.- Parameters:
key- Name of resource to be read- Returns:
- resource with matching name
-
list
@GET @Produces({"application/json","application/yaml","application/xml"}) List<ResourceTO> list()Returns a list of all resources.- Returns:
- list of all resources
-
create
@POST @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) javax.ws.rs.core.Response create(@NotNull @NotNull ResourceTO resourceTO)Creates a new resource.- Parameters:
resourceTO- Resource to be created- Returns:
- Response object featuring Location header of created resource
-
update
@PUT @Path("{key}") @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) void update(@NotNull @NotNull ResourceTO resourceTO)Updates the resource matching the given name.- Parameters:
resourceTO- resource to be stored
-
setLatestSyncToken
@POST @Path("{key}/{anyTypeKey}") @Produces({"application/json","application/yaml","application/xml"}) void setLatestSyncToken(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("anyTypeKey") @NotNull String anyTypeKey)Queries the connector underlying the given resource for the latest sync token value associated to the given any type and stores the value internally, for later usage.- Parameters:
key- resourceanyTypeKey- any type
-
removeSyncToken
@DELETE @Path("{key}/{anyTypeKey}") @Produces({"application/json","application/yaml","application/xml"}) void removeSyncToken(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("anyTypeKey") @NotNull String anyTypeKey)Removes the sync token value associated to the given any type from the given resource.- Parameters:
key- resourceanyTypeKey- any type
-
delete
@DELETE @Path("{key}") @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) void delete(@NotNull @PathParam("key") @NotNull String key)Deletes the resource matching the given name.- Parameters:
key- name of resource to be deleted
-
check
@POST @Path("check") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) void check(@NotNull @NotNull ResourceTO resourceTO)Checks whether the connection to resource could be established.- Parameters:
resourceTO- resource to be checked
-
-