Interface ResourceService

    • 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 from
        anyTypeKey - any object type
        anyKey - 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 from
        anyTypeKey - any object type
        value - 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 from
        anyTypeKey - any object type
        connObjectTOQuery - 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 - resource
        anyTypeKey - 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 - resource
        anyTypeKey - 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