Interface PackageResource


  • @Path("/devtools")
    public interface PackageResource
    • Method Detail

      • list

        @GET
        @Path("/packages")
        PackageListResponse list​(@BeanParam
                                 FilterParameterBean filter,
                                 @BeanParam
                                 SortParameterBean sorting,
                                 @BeanParam
                                 PagingParameterBean paging)
                          throws Exception
        List available packages.
        The result can be filtered by
        • name
        and sorted by
        • name
        • constructs
        • datasources
        • templates
        • objectProperties
        • crFragments
        • contentRepositories
        Parameters:
        filter - filter parameters
        sorting - sorting parameters
        paging - paging parameters
        Returns:
        List of packages
        Throws:
        Exception
      • get

        @GET
        @Path("/packages/{name}")
        Package get​(@PathParam("name")
                    String name)
             throws Exception
        Get the package with given name
        Parameters:
        name - Package name
        Returns:
        package
        Throws:
        Exception
      • add

        @PUT
        @Path("/packages/{name}")
        javax.ws.rs.core.Response add​(@PathParam("name")
                                      String name)
                               throws Exception
        Add the package with given name
        Parameters:
        name - Package name
        Returns:
        response
        Throws:
        Exception
      • delete

        @DELETE
        @Path("/packages/{name}")
        javax.ws.rs.core.Response delete​(@PathParam("name")
                                         String name)
                                  throws Exception
        Delete the package with given name
        Parameters:
        name - Package name
        Returns:
        response
        Throws:
        Exception
      • synchronizeToFS

        @PUT
        @Path("/packages/{name}/cms2fs")
        GenericResponse synchronizeToFS​(@PathParam("name")
                                        String name,
                                        @QueryParam("wait") @DefaultValue("0")
                                        long waitMs)
                                 throws Exception
        Trigger synchronization of all objects in the given package to the filesystem
        Parameters:
        name - name of the package
        waitMs - wait timeout in ms. When set to 0, response will be sent, when the action completes
        Returns:
        response
        Throws:
        Exception
      • synchronizeFromFS

        @PUT
        @Path("/packages/{name}/fs2cms")
        GenericResponse synchronizeFromFS​(@PathParam("name")
                                          String name,
                                          @QueryParam("wait") @DefaultValue("0")
                                          long waitMs)
                                   throws Exception
        Trigger synchronization of all objects in the given package to the cms
        Parameters:
        name - name of the package
        waitMs - wait timeout in ms. When set to 0, response will be sent, when the action completes
        Returns:
        response
        Throws:
        Exception
      • listConstructs

        @GET
        @Path("/packages/{name}/constructs")
        PagedConstructInPackageListResponse listConstructs​(@PathParam("name")
                                                           String name,
                                                           @BeanParam
                                                           FilterParameterBean filter,
                                                           @BeanParam
                                                           SortParameterBean sorting,
                                                           @BeanParam
                                                           PagingParameterBean paging,
                                                           @BeanParam
                                                           PermsParameterBean perms,
                                                           @BeanParam
                                                           EmbedParameterBean embed)
                                                    throws Exception
        Get the list of constructs assigned to the package.
        The result can be filtered by
        • keyword
        • name
        • description
        and sorted by
        • keyword
        • name
        • description
        Parameters:
        name - Package name
        filter - filter parameters
        sorting - sorting parameters
        paging - paging parameters
        perms - permissions parameters
        embed - optionally embed the referenced objects (category)
        Returns:
        List of constructs
        Throws:
        Exception
      • getConstruct

        @GET
        @Path("/packages/{name}/constructs/{construct}")
        ConstructLoadResponse getConstruct​(@PathParam("name")
                                           String name,
                                           @PathParam("construct")
                                           String construct)
                                    throws Exception
        Get the construct from the package
        Parameters:
        name - Package name
        construct - construct ID (internal or global) or keyword
        Returns:
        construct response
        Throws:
        Exception
      • addConstruct

        @PUT
        @Path("/packages/{name}/constructs/{construct}")
        javax.ws.rs.core.Response addConstruct​(@PathParam("name")
                                               String name,
                                               @PathParam("construct")
                                               String construct)
                                        throws Exception
        Add a construct to a package
        Parameters:
        name - Package name
        construct - construct ID (internal or global) or keyword
        Returns:
        response
        Throws:
        Exception
      • removeConstruct

        @DELETE
        @Path("/packages/{name}/constructs/{construct}")
        javax.ws.rs.core.Response removeConstruct​(@PathParam("name")
                                                  String name,
                                                  @PathParam("construct")
                                                  String construct)
                                           throws Exception
        Remove a construct from a package
        Parameters:
        name - Package name
        construct - construct ID (internal or global) or keyword
        Returns:
        response
        Throws:
        Exception
      • getTemplate

        @GET
        @Path("/packages/{name}/templates/{template}")
        TemplateLoadResponse getTemplate​(@PathParam("name")
                                         String name,
                                         @PathParam("template")
                                         String template)
                                  throws Exception
        Get the template in the package
        Parameters:
        name - Package name
        template - global template ID (uuid)
        Returns:
        template response
        Throws:
        Exception
      • addTemplate

        @PUT
        @Path("/packages/{name}/templates/{template}")
        javax.ws.rs.core.Response addTemplate​(@PathParam("name")
                                              String name,
                                              @PathParam("template")
                                              String template)
                                       throws Exception
        Add a template to a package
        Parameters:
        name - Package name
        template - global template ID (uuid)
        Returns:
        response
        Throws:
        Exception
      • removeTemplate

        @DELETE
        @Path("/packages/{name}/templates/{template}")
        javax.ws.rs.core.Response removeTemplate​(@PathParam("name")
                                                 String name,
                                                 @PathParam("template")
                                                 String template)
                                          throws Exception
        Remove a template from a package
        Parameters:
        name - Package name
        template - global template ID (uuid)
        Returns:
        response
        Throws:
        Exception
      • getDatasource

        @GET
        @Path("/packages/{name}/datasources/{datasource}")
        DatasourceLoadResponse getDatasource​(@PathParam("name")
                                             String name,
                                             @PathParam("datasource")
                                             String datasource)
                                      throws Exception
        Get the datasource in a package
        Parameters:
        name - Package name
        datasource - datasource name
        Returns:
        datasource response
        Throws:
        Exception
      • addDatasource

        @PUT
        @Path("/packages/{name}/datasources/{datasource}")
        javax.ws.rs.core.Response addDatasource​(@PathParam("name")
                                                String name,
                                                @PathParam("datasource")
                                                String datasource)
                                         throws Exception
        Add a datasource to a package
        Parameters:
        name - Package name
        datasource - datasource name
        Returns:
        response
        Throws:
        Exception
      • removeDatasource

        @DELETE
        @Path("/packages/{name}/datasources/{datasource}")
        javax.ws.rs.core.Response removeDatasource​(@PathParam("name")
                                                   String name,
                                                   @PathParam("datasource")
                                                   String datasource)
                                            throws Exception
        Remove a datasource from a package
        Parameters:
        name - Package name
        datasource - datasource name
        Returns:
        response
        Throws:
        Exception
      • listObjectProperties

        @GET
        @Path("/packages/{name}/objectproperties")
        PagedObjectPropertyInPackageListResponse listObjectProperties​(@PathParam("name")
                                                                      String name,
                                                                      @BeanParam
                                                                      FilterParameterBean filter,
                                                                      @BeanParam
                                                                      SortParameterBean sorting,
                                                                      @BeanParam
                                                                      PagingParameterBean paging,
                                                                      @BeanParam
                                                                      EmbedParameterBean embed,
                                                                      @BeanParam
                                                                      PermsParameterBean perms)
                                                               throws Exception
        Get the object properties in a package.
        The result can be filtered by
        • name
        • description
        • keyword
        and sorted by
        • name
        • description
        • keyword
        • type
        • required
        • inheritable
        • construct.name
        Parameters:
        name - Package name
        filter - filter parameters
        sorting - sorting parameters
        paging - paging parameters
        embed - embed parameters
        perms - permissions parameters
        Returns:
        List of object properties
        Throws:
        Exception
      • getObjectProperty

        @GET
        @Path("/packages/{name}/objectproperties/{objectproperty}")
        ObjectPropertyLoadResponse getObjectProperty​(@PathParam("name")
                                                     String name,
                                                     @PathParam("objectproperty")
                                                     String objectproperty)
                                              throws Exception
        Get the object property in a package
        Parameters:
        name - Package name
        objectproperty - object property keyword
        Returns:
        object property response
        Throws:
        Exception
      • addObjectProperty

        @PUT
        @Path("/packages/{name}/objectproperties/{objectproperty}")
        javax.ws.rs.core.Response addObjectProperty​(@PathParam("name")
                                                    String name,
                                                    @PathParam("objectproperty")
                                                    String objectproperty)
                                             throws Exception
        Add an object property to a package
        Parameters:
        name - Package name
        objectproperty - object property keyword
        Returns:
        response
        Throws:
        Exception
      • removeObjectProperty

        @DELETE
        @Path("/packages/{name}/objectproperties/{objectproperty}")
        javax.ws.rs.core.Response removeObjectProperty​(@PathParam("name")
                                                       String name,
                                                       @PathParam("objectproperty")
                                                       String objectproperty)
                                                throws Exception
        Remove an object property from a package
        Parameters:
        name - Package name
        objectproperty - object property keyword
        Returns:
        response
        Throws:
        Exception
      • getCrFragment

        @GET
        @Path("/packages/{name}/cr_fragments/{cr_fragment}")
        ContentRepositoryFragmentResponse getCrFragment​(@PathParam("name")
                                                        String name,
                                                        @PathParam("cr_fragment")
                                                        String crFragment)
                                                 throws Exception
        Get the ContentRepository Fragment in a package
        Parameters:
        name - Package name
        crFragment - ContentRepository Fragment name, local ID or global ID
        Returns:
        ContentRepository Fragment response
        Throws:
        Exception
      • addCrFragment

        @PUT
        @Path("/packages/{name}/cr_fragments/{cr_fragment}")
        javax.ws.rs.core.Response addCrFragment​(@PathParam("name")
                                                String name,
                                                @PathParam("cr_fragment")
                                                String crFragment)
                                         throws Exception
        Add a ContentRepository Fragment to a package
        Parameters:
        name - Package name
        crFragment - ContentRepository Fragment name, local ID or global ID
        Returns:
        response
        Throws:
        Exception
      • removeCrFragment

        @DELETE
        @Path("/packages/{name}/cr_fragments/{cr_fragment}")
        javax.ws.rs.core.Response removeCrFragment​(@PathParam("name")
                                                   String name,
                                                   @PathParam("cr_fragment")
                                                   String crFragment)
                                            throws Exception
        Remove a ContentRepository Fragment from a package
        Parameters:
        name - Package name
        crFragment - ContentRepository Fragment name, local ID or global ID
        Returns:
        response
        Throws:
        Exception
      • getContentRepository

        @GET
        @Path("/packages/{name}/contentrepositories/{contentrepository}")
        ContentRepositoryResponse getContentRepository​(@PathParam("name")
                                                       String name,
                                                       @PathParam("contentrepository")
                                                       String contentrepository)
                                                throws Exception
        Get the ContentRepository in a package
        Parameters:
        name - Package name
        contentrepository - ContentRepository name, local ID or global ID
        Returns:
        ContentRepository response
        Throws:
        Exception
      • addContentRepository

        @PUT
        @Path("/packages/{name}/contentrepositories/{contentrepository}")
        javax.ws.rs.core.Response addContentRepository​(@PathParam("name")
                                                       String name,
                                                       @PathParam("contentrepository")
                                                       String contentrepository)
                                                throws Exception
        Add a ContentRepository to a package
        Parameters:
        name - Package name
        contentrepository - ContentRepository name, local ID or global ID
        Returns:
        response
        Throws:
        Exception
      • removeContentRepository

        @DELETE
        @Path("/packages/{name}/contentrepositories/{contentrepository}")
        javax.ws.rs.core.Response removeContentRepository​(@PathParam("name")
                                                          String name,
                                                          @PathParam("contentrepository")
                                                          String contentrepository)
                                                   throws Exception
        Remove a ContentRepository from a package
        Parameters:
        name - Package name
        contentrepository - ContentRepository name, local ID or global ID
        Returns:
        response
        Throws:
        Exception
      • listNodePackages

        @GET
        @Path("/nodes/{nodeId}/packages")
        PackageListResponse listNodePackages​(@PathParam("nodeId")
                                             String nodeId,
                                             @BeanParam
                                             FilterParameterBean filter,
                                             @BeanParam
                                             SortParameterBean sorting,
                                             @BeanParam
                                             PagingParameterBean paging)
                                      throws Exception
        List packages assigned to a node. It is not possible to get packages to channels.
        The result can be filtered by
        • name
        and sorted by
        • name
        • constructs
        • datasources
        • templates
        • objectProperties
        • crFragments
        • contentRepositories
        Parameters:
        nodeId - Node ID (either global or local)
        filter - filter parameters
        sorting - sorting parameters
        paging - paging parameters
        Returns:
        List of packages in the node
        Throws:
        Exception
      • removePackage

        @DELETE
        @Path("/nodes/{nodeId}/packages/{packageName}")
        javax.ws.rs.core.Response removePackage​(@PathParam("nodeId")
                                                String nodeId,
                                                @PathParam("packageName")
                                                String packageName)
                                         throws Exception
        Remove the package from the node. It is not possible to remove packages from channels
        Parameters:
        nodeId - node ID (either global or local)
        packageName - Package name
        Returns:
        generic response
        Throws:
        Exception
      • addPackage

        @PUT
        @Path("/nodes/{nodeId}/packages/{packageName}")
        javax.ws.rs.core.Response addPackage​(@PathParam("nodeId")
                                             String nodeId,
                                             @PathParam("packageName")
                                             String packageName)
                                      throws Exception
        Add the package to the node. It is not possible to add packages to channels
        Parameters:
        nodeId - node ID (either global or local)
        packageName - Package name
        Returns:
        generic response
        Throws:
        Exception
      • addPackage

        @PUT
        @Path("/nodes/{nodeId}/packages")
        javax.ws.rs.core.Response addPackage​(@PathParam("nodeId")
                                             String nodeId,
                                             Package addedPackage)
                                      throws Exception
        Add the package to the node. It is not possible to add packages to channels
        Parameters:
        nodeId - node ID (either global or local)
        addedPackage - Package to add
        Returns:
        generic response
        Throws:
        Exception
      • renderPage

        @GET
        @Path("/preview/page/{id}")
        @Produces("text/html")
        String renderPage​(@PathParam("id")
                          String id,
                          @QueryParam("nodeId")
                          String nodeId)
                   throws Exception
        Get self refreshing live preview of the given page
        Parameters:
        id - page ID
        nodeId - node ID
        Returns:
        HTML page that contains the live preview of the page was iframe.
        Throws:
        Exception
      • listenPageChange

        @GET
        @Path("/listen/{uuid}")
        @Produces("text/event-stream")
        org.glassfish.jersey.media.sse.EventOutput listenPageChange​(@PathParam("uuid")
                                                                    String uuid)
                                                             throws Exception
        Listen on changes on dependencies with the given UUID
        Parameters:
        uuid - UUID of the registration
        Returns:
        Events that are emitted, when a dependency changes.
        Throws:
        Exception
      • removeListener

        @POST
        @Path("/stoplisten/{uuid}")
        javax.ws.rs.core.Response removeListener​(@PathParam("uuid")
                                                 String uuid)
                                          throws Exception
        Remove the listener with given UUID
        Parameters:
        uuid - UUID of the registration
        Returns:
        empty response
        Throws:
        Exception
      • preview

        @GET
        @Path("/preview/{uuid}")
        @Produces("text/html")
        String preview​(@PathParam("uuid")
                       String uuid)
                throws Exception
        Render the live preview of the page, which was registered before
        Parameters:
        uuid - UUID of the registration
        Returns:
        Rendered page
        Throws:
        Exception
      • autocompleteConstructs

        @GET
        @Path("/autocomplete/constructs")
        List<AutocompleteItem> autocompleteConstructs​(@QueryParam("term")
                                                      String term)
                                               throws Exception
        Endpoint for autocomplete UI components for constructs. Returns at most 10 constructs matching the given term
        Parameters:
        term - term to match
        Returns:
        list of at most 10 constructs
        Throws:
        Exception
      • autocompleteTemplates

        @GET
        @Path("/autocomplete/templates")
        List<AutocompleteItem> autocompleteTemplates​(@QueryParam("term")
                                                     String term)
                                              throws Exception
        Endpoint for autocomplete UI components for templates. Returns at most 10 templates matching the given term
        Parameters:
        term - term to match
        Returns:
        list of at most 10 templates
        Throws:
        Exception
      • autocompleteDatasources

        @GET
        @Path("/autocomplete/datasources")
        List<AutocompleteItem> autocompleteDatasources​(@QueryParam("term")
                                                       String term)
                                                throws Exception
        Endpoint for autocomplete UI components for datasources. Returns at most 10 datasources matching the given term
        Parameters:
        term - term to match
        Returns:
        list of at most 10 datasources
        Throws:
        Exception
      • autocompleteObjectProperties

        @GET
        @Path("/autocomplete/objectproperties")
        List<AutocompleteItem> autocompleteObjectProperties​(@QueryParam("term")
                                                            String term)
                                                     throws Exception
        Endpoint for autocomplete UI components for object properties. Returns at most 10 object properties matching the given term
        Parameters:
        term - term to match
        Returns:
        list of at most 10 object properties
        Throws:
        Exception
      • autocompleteCrFragments

        @GET
        @Path("/autocomplete/cr_fragments")
        List<AutocompleteItem> autocompleteCrFragments​(@QueryParam("term")
                                                       String term)
                                                throws Exception
        Endpoint for autocomplete UI components for cr fragments. Returns at most 10 cr fragments matching the given term
        Parameters:
        term - term to match
        Returns:
        list of at most 10 cr fragments
        Throws:
        Exception
      • autocompleteContentRepositories

        @GET
        @Path("/autocomplete/contentrepositories")
        List<AutocompleteItem> autocompleteContentRepositories​(@QueryParam("term")
                                                               String term)
                                                        throws Exception
        Endpoint for autocomplete UI components for contentrepositories. Returns at most 10 contentrepositories matching the given term
        Parameters:
        term - term to match
        Returns:
        list of at most 10 contentrepositories
        Throws:
        Exception
      • getSyncInfo

        @GET
        @Path("/sync")
        SyncInfo getSyncInfo()
                      throws Exception
        Get the current status information for the automatic synchronization.
        Returns:
        Sync information
        Throws:
        Exception
      • startSync

        @PUT
        @Path("/sync")
        SyncInfo startSync()
                    throws Exception
        Start the sync for the current user (if not started before)
        Returns:
        sync info
        Throws:
        Exception
      • stopSync

        @DELETE
        @Path("/sync")
        javax.ws.rs.core.Response stopSync()
                                    throws Exception
        Stop the sync, if it was started by the current user
        Returns:
        response
        Throws:
        Exception