Class ResourceRegistryQueryTemplateClientImpl

  • All Implemented Interfaces:
    org.gcube.informationsystem.resourceregistry.api.request.RequestInfo, ResourceRegistryQueryTemplateClient

    public class ResourceRegistryQueryTemplateClientImpl
    extends org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
    implements ResourceRegistryQueryTemplateClient
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String address  
      protected Map<String,​String> headers  
      • Fields inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo

        allMeta, DEFAULT_LIMIT, DEFAULT_OFFSET, hierarchicalMode, includeContexts, includeMeta, limit, offset, UNBOUNDED_LIMIT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHeader​(String name, String value)  
      List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> all()  
      String create​(String queryTemplate)  
      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate create​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      boolean delete​(String queryTemplateName)  
      boolean delete​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      boolean exist​(String queryTemplateName)  
      boolean exist​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      protected org.gcube.common.gxhttp.request.GXHTTPStringRequest getGXHTTPStringRequest()  
      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate read​(String queryTemplateName)  
      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate read​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      String readAsString​(String queryTemplateName)  
      <E extends org.gcube.informationsystem.model.reference.ERElement>
      List<E>
      run​(String name)  
      String run​(String name, String params)  
      <E extends org.gcube.informationsystem.model.reference.ERElement>
      List<E>
      run​(String name, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)  
      <E extends org.gcube.informationsystem.model.reference.ERElement>
      List<E>
      run​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      <E extends org.gcube.informationsystem.model.reference.ERElement>
      List<E>
      run​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate, org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)  
      String runGetString​(String name)  
      String update​(String queryTemplate)  
      org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate update​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)  
      • Methods inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo

        allMeta, getLimit, getOffset, includeContexts, includeMeta, isHierarchicalMode, setAllMeta, setHierarchicalMode, setIncludeContexts, setIncludeMeta, setLimit, setOffset
      • Methods inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

        allMeta, getLimit, getOffset, includeContexts, includeMeta, isHierarchicalMode, setAllMeta, setHierarchicalMode, setIncludeContexts, setIncludeMeta, setLimit, setOffset
    • Constructor Detail

      • ResourceRegistryQueryTemplateClientImpl

        public ResourceRegistryQueryTemplateClientImpl​(String address)
    • Method Detail

      • getGXHTTPStringRequest

        protected org.gcube.common.gxhttp.request.GXHTTPStringRequest getGXHTTPStringRequest()
      • all

        public List<org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate> all()
                                                                                                 throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        all in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • create

        public org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate create​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
                                                                                              throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateAlreadyPresentException,
                                                                                                     org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        create in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateAlreadyPresentException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • create

        public String create​(String queryTemplate)
                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateAlreadyPresentException,
                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        create in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateAlreadyPresentException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • exist

        public boolean exist​(String queryTemplateName)
                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        exist in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • exist

        public boolean exist​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        exist in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • read

        public org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate read​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
                                                                                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                                                                                   org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        read in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • read

        public org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate read​(String queryTemplateName)
                                                                                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                                                                                   org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        read in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • readAsString

        public String readAsString​(String queryTemplateName)
                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                   org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        readAsString in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • update

        public org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate update​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
                                                                                              throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                                                                                     org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        update in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • update

        public String update​(String queryTemplate)
                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        update in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • runGetString

        public String runGetString​(String name)
                            throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                   org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        runGetString in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • run

        public <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run​(String name)
                                                                                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                                                                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        run in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • run

        public <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
                                                                                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                                                                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        run in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • run

        public String run​(String name,
                          String params)
                   throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                          org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        run in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • run

        public <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run​(String name,
                                                                                             org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
                                                                                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                                                                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        run in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • run

        public <E extends org.gcube.informationsystem.model.reference.ERElement> List<E> run​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate,
                                                                                             org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode)
                                                                                      throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                                                                                             org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        run in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • delete

        public boolean delete​(org.gcube.informationsystem.queries.templates.reference.entities.QueryTemplate queryTemplate)
                       throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                              org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        delete in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • delete

        public boolean delete​(String queryTemplateName)
                       throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException,
                              org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Specified by:
        delete in interface ResourceRegistryQueryTemplateClient
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException