Interface ResourceService
- All Superinterfaces:
org.apache.syncope.common.rest.api.service.JAXRSService
@Path("resources")
public interface ResourceService
extends org.apache.syncope.common.rest.api.service.JAXRSService
REST 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
Modifier and TypeMethodDescriptionvoidcheck(@NotNull org.apache.syncope.common.lib.to.ResourceTO resourceTO) Checks whether the connection to resource could be established.jakarta.ws.rs.core.Responsecreate(@NotNull org.apache.syncope.common.lib.to.ResourceTO resourceTO) Creates a new resource.voidDeletes the resource matching the given name.jakarta.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<org.apache.syncope.common.lib.to.ResourceTO> list()Returns a list of all resources.org.apache.syncope.common.lib.to.ResourceTOReturns the resource with matching name.org.apache.syncope.common.lib.to.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.org.apache.syncope.common.lib.to.PagedConnObjectResultsearchConnObjects(@NotNull String key, @NotNull String anyTypeKey, org.apache.syncope.common.rest.api.beans.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 org.apache.syncope.common.lib.to.ResourceTO resourceTO) Updates the resource matching the given name.
-
Method Details
-
getConnObjectKeyValue
@OPTIONS @Path("{key}/{anyTypeKey}/{anyKey}") jakarta.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"}) org.apache.syncope.common.lib.to.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"}) org.apache.syncope.common.lib.to.PagedConnObjectResult searchConnObjects(@NotNull @PathParam("key") @NotNull String key, @NotNull @PathParam("anyTypeKey") @NotNull String anyTypeKey, @BeanParam org.apache.syncope.common.rest.api.beans.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"}) org.apache.syncope.common.lib.to.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<org.apache.syncope.common.lib.to.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"}) jakarta.ws.rs.core.Response create(@NotNull @NotNull org.apache.syncope.common.lib.to.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 org.apache.syncope.common.lib.to.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 org.apache.syncope.common.lib.to.ResourceTO resourceTO) Checks whether the connection to resource could be established.- Parameters:
resourceTO- resource to be checked
-