Interface ConnectorService
-
- All Superinterfaces:
JAXRSService
- All Known Implementing Classes:
ConnectorServiceImpl
@Path("connectors") public interface ConnectorService extends JAXRSService
REST operations for connector bundles and instances.
-
-
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 List<ConnIdObjectClass>
buildObjectClassInfo(@NotNull ConnInstanceTO connInstanceTO, boolean includeSpecial)
Builds the list of ConnId object classes information for the connector bundle matching the given connector instance key, with the provided configuration.void
check(@NotNull ConnInstanceTO connInstanceTO)
Checks whether the connection to resource could be established.javax.ws.rs.core.Response
create(@NotNull ConnInstanceTO connInstanceTO)
Creates a new connector instance.void
delete(@NotNull String key)
Deletes the connector instance matching the provided key.List<ConnIdBundle>
getBundles(String lang)
Returns available connector bundles with property keys in selected language.List<ConnInstanceTO>
list(String lang)
Returns a list of all connector instances with property keys in the matching language.ConnInstanceTO
read(@NotNull String key, String lang)
Returns connector instance with matching key.ConnInstanceTO
readByResource(@NotNull String resourceName, String lang)
Returns connector instance for matching resource.void
reload()
Reload all connector bundles and instances.void
update(@NotNull ConnInstanceTO connInstanceTO)
Updates the connector instance matching the provided key.
-
-
-
Method Detail
-
getBundles
@GET @Path("bundles") @Produces({"application/json","application/yaml","application/xml"}) List<ConnIdBundle> getBundles(@QueryParam("lang") String lang)
Returns available connector bundles with property keys in selected language.- Parameters:
lang
- language to select property keys; default language is English- Returns:
- available connector bundles with property keys in selected language
-
buildObjectClassInfo
@POST @Path("{key}/supportedObjectClasses") @Produces({"application/json","application/yaml","application/xml"}) @Consumes({"application/json","application/yaml","application/xml"}) List<ConnIdObjectClass> buildObjectClassInfo(@NotNull @NotNull ConnInstanceTO connInstanceTO, @QueryParam("includeSpecial") @DefaultValue("false") boolean includeSpecial)
Builds the list of ConnId object classes information for the connector bundle matching the given connector instance key, with the provided configuration.- Parameters:
connInstanceTO
- connector instance object providing configuration propertiesincludeSpecial
- if set to true, special schema names (like '__PASSWORD__') will be included; default is false- Returns:
- supported object classes info for the connector bundle matching the given connector instance key, with the provided configuration
-
read
@GET @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) ConnInstanceTO read(@NotNull @PathParam("key") @NotNull String key, @QueryParam("lang") String lang)
Returns connector instance with matching key.- Parameters:
key
- connector instance key to be readlang
- language to select property keys, null for default (English). An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.- Returns:
- connector instance with matching key
-
readByResource
@GET @Path("byResource/{resourceName}") @Produces({"application/json","application/yaml","application/xml"}) ConnInstanceTO readByResource(@NotNull @PathParam("resourceName") @NotNull String resourceName, @QueryParam("lang") String lang)
Returns connector instance for matching resource.- Parameters:
resourceName
- resource name to be used for connector lookuplang
- language to select property keys, null for default (English). An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.- Returns:
- connector instance for matching resource
-
list
@GET @Produces({"application/json","application/yaml","application/xml"}) List<ConnInstanceTO> list(@QueryParam("lang") String lang)
Returns a list of all connector instances with property keys in the matching language.- Parameters:
lang
- language to select property keys, null for default (English). An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.- Returns:
- list of all connector instances with property keys in the matching language
-
create
@POST @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) javax.ws.rs.core.Response create(@NotNull @NotNull ConnInstanceTO connInstanceTO)
Creates a new connector instance.- Parameters:
connInstanceTO
- connector instance to be created- Returns:
- Response object featuring Location header of created connector instance
-
update
@PUT @Path("{key}") @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) void update(@NotNull @NotNull ConnInstanceTO connInstanceTO)
Updates the connector instance matching the provided key.- Parameters:
connInstanceTO
- connector instance to be stored
-
delete
@DELETE @Path("{key}") @Produces({"application/json","application/yaml","application/xml"}) void delete(@NotNull @PathParam("key") @NotNull String key)
Deletes the connector instance matching the provided key.- Parameters:
key
- connector instance key to be deleted
-
check
@POST @Path("check") @Consumes({"application/json","application/yaml","application/xml"}) @Produces({"application/json","application/yaml","application/xml"}) void check(@NotNull @NotNull ConnInstanceTO connInstanceTO)
Checks whether the connection to resource could be established.- Parameters:
connInstanceTO
- connector instance to be used for connection check
-
reload
@POST @Path("reload") @Produces({"application/json","application/yaml","application/xml"}) void reload()
Reload all connector bundles and instances.
-
-