Class BusinessEntityManagerRestController

    • Constructor Detail

      • BusinessEntityManagerRestController

        public BusinessEntityManagerRestController()
    • Method Detail

      • createObject

        @RequestMapping(method=POST,
                        value="createObject/{className}/{parentClassName}/{parentId}/{templateId}/{sessionId}",
                        produces="application/json")
        public String createObject​(@PathVariable("className")
                                   String className,
                                   @PathVariable("parentClassName")
                                   String parentClassName,
                                   @PathVariable("parentId")
                                   String parentId,
                                   @RequestBody
                                   HashMap<String,​String> attributes,
                                   @PathVariable("templateId")
                                   String templateId,
                                   @PathVariable("sessionId")
                                   String sessionId)
        Creates a new inventory object.
        Specified by:
        createObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Name of the class which this object will be instantiated from.
        parentClassName - Parent object class name. If "null", the parent will be the DummyRoot node.
        parentId - Parent's oid. If "-1", the parent will be the DummyRoot node.
        attributes - Attributes to be set by default in the new object. It's a HashMap where the keys are the attribute names and the values, the values for such attributes. Note that binary type attributes can't be set here.
        templateId - Template id to be used to create the current object. Template values can be overridden if "attributeValues" is not empty. Use an empty string or "null" to not use a Template.
        sessionId - The session token id.
        Returns:
        The object's id.
      • createObjectWithCriteria

        @RequestMapping(method=POST,
                        value="createObjectWithCriteria/{className}/{parentClassName}/{templateId}/{criteria}/{sessionId}",
                        produces="application/json")
        public String createObjectWithCriteria​(@PathVariable("className")
                                               String className,
                                               @PathVariable("parentClassName")
                                               String parentClassName,
                                               @RequestBody
                                               HashMap<String,​String> attributes,
                                               @PathVariable("templateId")
                                               String templateId,
                                               @PathVariable("criteria")
                                               String criteria,
                                               @PathVariable("sessionId")
                                               String sessionId)
        Creates an object.
        Specified by:
        createObjectWithCriteria in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Class the object will be instance of.
        parentClassName - Class of the parent the object will be instance of. Use root for the navigation tree.
        criteria - Criteria to search for the parent. This is a string with two parts: One is the name of the attribute and the other its value, both separated by a fixed colon :. Example: name:Colombia.
        attributes - Dictionary with the names and the values of the attributes to be set.
        templateId - The id of the template to be used to create this object. This id was probably retrieved by {@link ApplicationEntityManager.getTemplatesForClass(String)} before. Use a "null" or empty string to not use a template.
        sessionId - The session token id.
        Returns:
        The id of the new object.
      • createSpecialObject

        @RequestMapping(method=POST,
                        value="createSpecialObject/{className}/{parentClassName}/{parentId}/{templateId}/{sessionId}",
                        produces="application/json")
        public String createSpecialObject​(@PathVariable("className")
                                          String className,
                                          @PathVariable("parentClassName")
                                          String parentClassName,
                                          @PathVariable("parentId")
                                          String parentId,
                                          @RequestBody
                                          HashMap<String,​String> attributes,
                                          @PathVariable("templateId")
                                          String templateId,
                                          @PathVariable("sessionId")
                                          String sessionId)
        Creates a new inventory object for a domain specific model (where the standard containment rules don't apply).
        Specified by:
        createSpecialObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Name of the class which this object will be instantiated from.
        parentClassName - Parent object class name.
        parentId - Parent's oid.
        attributes - Attributes to be set by default in the new object. It's a HashMap where the keys are the attribute names and the values, the values for such attributes. Note that binary type attributes can't be set here.
        templateId - The id of the template to be used to create this object. This id was probably retrieved by {@link ApplicationEntityManager.getTemplatesForClass(String)} before. Use a "null" or empty string to not use a template.
        sessionId - The session token id.
        Returns:
        The id of the new object.
      • createSpecialObjectUsingTemplate

        @RequestMapping(method=POST,
                        value="createSpecialObjectUsingTemplate/{className}/{parentClassName}/{parentId}/{templateId}/{sessionId}",
                        produces="application/json")
        public HashMap<String,​String> createSpecialObjectUsingTemplate​(@PathVariable("className")
                                                                             String className,
                                                                             @PathVariable("parentClassName")
                                                                             String parentClassName,
                                                                             @PathVariable("parentId")
                                                                             String parentId,
                                                                             @RequestBody
                                                                             HashMap<String,​String> attributes,
                                                                             @PathVariable("templateId")
                                                                             String templateId,
                                                                             @PathVariable("sessionId")
                                                                             String sessionId)
        Equal to BusinessEntityManager.createSpecialObject(java.lang.String, java.lang.String, java.lang.String, java.util.HashMap, java.lang.String) but the return is a map of ids.Creates a new inventory object for a domain specific model (where the standard containment rules don't apply).
        Specified by:
        createSpecialObjectUsingTemplate in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Name of the class which this object will be instantiated from.
        parentClassName - Parent object class name.
        parentId - Parent's oid.
        attributes - Attributes to be set by default in the new object. It's a HashMap where the keys are the attribute names and the values, the values for such attributes. Note that binary type attributes can't be set here.
        templateId - The id of the template to be used to create this object. This id was probably retrieved by {@link ApplicationEntityManager.getTemplatesForClass(String)} before. Use a null or empty string to not use a template.
        sessionId - The session token id.
        Returns:
        The id of the new object.
      • addParentToSpecialObject

        @RequestMapping(method=POST,
                        value="addParentToSpecialObject/{specialObjectClass}/{specialObjectId}/{parentClassName}/{parentId}/{sessionId}",
                        produces="application/json")
        public void addParentToSpecialObject​(@PathVariable("specialObjectClass")
                                             String specialObjectClass,
                                             @PathVariable("specialObjectId")
                                             String specialObjectId,
                                             @PathVariable("parentClassName")
                                             String parentClassName,
                                             @PathVariable("parentId")
                                             String parentId,
                                             @PathVariable("sessionId")
                                             String sessionId)
        Breaks the special hierarchy to enable special children to have more than one parent.
        Specified by:
        addParentToSpecialObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        specialObjectClass - Special object class name
        specialObjectId - Special Object Id.
        parentClassName - Parent Object class name.
        parentId - Parent Object id.
        sessionId - The session token id.
      • createHeadlessObject

        @RequestMapping(method=POST,
                        value="createHeadlessObject/{className}/{templateId}/{sessionId}",
                        produces="application/json")
        public String createHeadlessObject​(@PathVariable("className")
                                           String className,
                                           @RequestBody
                                           HashMap<String,​String> attributes,
                                           @PathVariable("templateId")
                                           String templateId,
                                           @PathVariable("sessionId")
                                           String sessionId)
        Creates an object without parent.This might be particularly useful for complex models. Use it carefully to avoid leaving orphan objects. Always provide custom methods to delete.
        Specified by:
        createHeadlessObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - The class name of the object to be created.
        attributes - The initial set of attributes (as pairs attribute name - value ) to be set. These values will override those in the template used (if any).
        templateId - The id of the template to be used to create the object. Use "null" or an empty string to not use any template.
        sessionId - The session token id.
        Returns:
        The id of the newly created object.
      • createBulkObjects

        @RequestMapping(method=POST,
                        value="createBulkObjects/{className}/{parentClassName}/{parentId}/{templateId}/{sessionId}",
                        produces="application/json")
        public String[] createBulkObjects​(@PathVariable("className")
                                          String className,
                                          @PathVariable("parentClassName")
                                          String parentClassName,
                                          @PathVariable("parentId")
                                          String parentId,
                                          @RequestBody
                                          String namePattern,
                                          @PathVariable("templateId")
                                          String templateId,
                                          @PathVariable("sessionId")
                                          String sessionId)
        Creates multiple objects using a given name pattern.
        Specified by:
        createBulkObjects in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - The class name for the new objects.
        parentClassName - The parent class name for the new objects.
        parentId - The object id of the parent.
        namePattern - A pattern to create the names for the new objects.
        templateId - A template id for the objects creation, it could be "null" if no template is required.
        sessionId - The session token id.
        Returns:
        An arrays of ids for the new objects.
      • createBulkSpecialObjects

        @RequestMapping(method=POST,
                        value="createBulkSpecialObjects/{className}/{parentClassName}/{parentId}/{templateId}/{sessionId}",
                        produces="application/json")
        public String[] createBulkSpecialObjects​(@PathVariable("className")
                                                 String className,
                                                 @PathVariable("parentClassName")
                                                 String parentClassName,
                                                 @PathVariable("parentId")
                                                 String parentId,
                                                 @RequestBody
                                                 String namePattern,
                                                 @PathVariable("templateId")
                                                 String templateId,
                                                 @PathVariable("sessionId")
                                                 String sessionId)
        Creates multiple special objects using a given name pattern.
        Specified by:
        createBulkSpecialObjects in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - The class name for the new special objects.
        parentClassName - The parent class name for the new special objects.
        parentId - The object id of the parent.
        namePattern - A pattern to create the names for the new special objects.
        templateId - The id of the template to be used for the set of objects to be created. Used "null" for none.
        sessionId - The session token id.
        Returns:
        An array of ids for the new special objects.
      • getObject

        @RequestMapping(method=GET,
                        value="getObject/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public BusinessObject getObject​(@PathVariable("className")
                                        String className,
                                        @PathVariable("objectId")
                                        String objectId,
                                        @PathVariable("sessionId")
                                        String sessionId)
        Gets the detailed information about an object.
        Specified by:
        getObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object class name.
        objectId - Object's oid.
        sessionId - The session token id.
        Returns:
        A detailed representation of the requested object.
      • getObjectLight

        @RequestMapping(method=GET,
                        value="getObjectLight/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public BusinessObjectLight getObjectLight​(@PathVariable("className")
                                                  String className,
                                                  @PathVariable("objectId")
                                                  String objectId,
                                                  @PathVariable("sessionId")
                                                  String sessionId)
        Gets the simplified information about an object.
        Specified by:
        getObjectLight in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object class name.
        objectId - Object's oid.
        sessionId - The session token id.
        Returns:
        A detailed representation of the requested object.
      • getObjectChildren

        @RequestMapping(method=GET,
                        value="getObjectChildren/{className}/{objectId}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectChildren​(@PathVariable("className")
                                                           String className,
                                                           @PathVariable("objectId")
                                                           String objectId,
                                                           @PathVariable("maxResults")
                                                           int maxResults,
                                                           @PathVariable("sessionId")
                                                           String sessionId)
        Gets the children of a given object.
        Specified by:
        getObjectChildren in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object's class name.
        objectId - Object's oid.
        maxResults - Max number of children to be returned, -1 to return all.
        sessionId - The session token id.
        Returns:
        The list of children.
      • getObjectChildrenForClassWithId

        @RequestMapping(method=GET,
                        value="getObjectChildrenForClassWithId/{classId}/{objectId}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectChildrenForClassWithId​(@PathVariable("classId")
                                                                         long classId,
                                                                         @PathVariable("objectId")
                                                                         String objectId,
                                                                         @PathVariable("maxResults")
                                                                         int maxResults,
                                                                         @PathVariable("sessionId")
                                                                         String sessionId)
        Gets the children of a given object, providing the class and object id.
        Specified by:
        getObjectChildrenForClassWithId in interface BusinessEntityManagerRestOpenApi
        Parameters:
        classId - The id of the class the object is instance of.
        objectId - The oid of the object.
        maxResults - The max number of results to be retrieved. Use 0 to retrieve all.
        sessionId - The session token id.
        Returns:
        The list of children.
      • getObjectSpecialChildren

        @RequestMapping(method=GET,
                        value="getObjectSpecialChildren/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectSpecialChildren​(@PathVariable("className")
                                                                  String className,
                                                                  @PathVariable("objectId")
                                                                  String objectId,
                                                                  @PathVariable("sessionId")
                                                                  String sessionId)
        Gets the special children of a given object.
        Specified by:
        getObjectSpecialChildren in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object class name.
        objectId - Object id.
        sessionId - The session token id.
        Returns:
        The list of special children.
      • getObjectSpecialChildrenWithFilters

        @RequestMapping(method=GET,
                        value="getObjectSpecialChildrenWithFilters/{className}/{objectId}/{childrenClassNamesToFilter}/{page}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectSpecialChildrenWithFilters​(@PathVariable("className")
                                                                             String className,
                                                                             @PathVariable("objectId")
                                                                             String objectId,
                                                                             @PathVariable("childrenClassNamesToFilter")
                                                                             List<String> childrenClassNamesToFilter,
                                                                             @PathVariable("page")
                                                                             int page,
                                                                             @PathVariable("limit")
                                                                             int limit,
                                                                             @PathVariable("sessionId")
                                                                             String sessionId)
        Gets the special children of a given object.
        Specified by:
        getObjectSpecialChildrenWithFilters in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object class name.
        objectId - Object id.
        childrenClassNamesToFilter - Class names values to filter the return.
        page - The number of results to skip or the page.
        limit - The limit of results per page.
        sessionId - The session token id.
        Returns:
        The list of special children.
      • getObjectSpecialChildrenCount

        @RequestMapping(method=GET,
                        value="getObjectSpecialChildrenCount/{className}/{objectId}/{childrenClassNamesToFilter}/{sessionId}",
                        produces="application/json")
        public long getObjectSpecialChildrenCount​(@PathVariable("className")
                                                  String className,
                                                  @PathVariable("objectId")
                                                  String objectId,
                                                  @PathVariable("childrenClassNamesToFilter")
                                                  String[] childrenClassNamesToFilter,
                                                  @PathVariable("sessionId")
                                                  String sessionId)
        Gets the special children count of a given object.
        Specified by:
        getObjectSpecialChildrenCount in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object class name.
        objectId - Object id.
        childrenClassNamesToFilter - Class names values to filter the return.
        sessionId - The session token id.
        Returns:
        The count of special children.
      • getObjectsWithFilterLight

        @RequestMapping(method=GET,
                        value="getObjectsWithFilterLight/{className}/{filterName}/{filterValue}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectsWithFilterLight​(@PathVariable("className")
                                                                   String className,
                                                                   @PathVariable("filterName")
                                                                   String filterName,
                                                                   @PathVariable("filterValue")
                                                                   String filterValue,
                                                                   @PathVariable("sessionId")
                                                                   String sessionId)
        Retrieves a list of light instances of a given class given a simple filter.This method will search for all objects with a string-based attribute (filterName) whose value matches a value provided (filterValue).
        Specified by:
        getObjectsWithFilterLight in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - The class of the objects to be searched. This method support abstract superclasses as well.
        filterName - The attribute to be used as filter. This will work only with String-type attributes. Example: serialNumber. To list type attributes the filter must be applied to the name. Example: filterName: model, filterValue: XYZ.
        filterValue - The value to be use to match the instances. Example "Serial-12345".
        sessionId - The session token id.
        Returns:
        The list of instances that matches the filterName/filterValue criteria.
      • getObjectsWithFilter

        @RequestMapping(method=GET,
                        value="getObjectsWithFilter/{className}/{filterName}/{filterValue}/{sessionId}",
                        produces="application/json")
        public List<BusinessObject> getObjectsWithFilter​(@PathVariable("className")
                                                         String className,
                                                         @PathVariable("filterName")
                                                         String filterName,
                                                         @PathVariable("filterValue")
                                                         String filterValue,
                                                         @PathVariable("sessionId")
                                                         String sessionId)
        Same as #getObjectsWithFilterLight(java.lang.String, java.lang.String, java.lang.String), but returns the full information about the objects involved.
        Specified by:
        getObjectsWithFilter in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - The class of the objects to be searched. This method support abstract superclasses as well.
        filterName - The attribute to be used as filter. This will work only with String-type attributes. Example: serialNumber. To list type attributes the filter must be applied to the name. Example: filterName: model, filterValue: XYZ.
        filterValue - The value to be use to match the instances. Example "Serial-12345".
        sessionId - The session token id.
        Returns:
        The list of instances that matches the filterName/filterValue criteria.
      • getSuggestedObjectsWithFilter

        @RequestMapping(method=GET,
                        value="getSuggestedObjectsWithFilter/{filterValue}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getSuggestedObjectsWithFilter​(@PathVariable("filterValue")
                                                                       String filterValue,
                                                                       @PathVariable("limit")
                                                                       int limit,
                                                                       @PathVariable("sessionId")
                                                                       String sessionId)
        Suggests a number of objects based on a search string.The search string is matched against the name of the object, its class name or its class display name.
        Specified by:
        getSuggestedObjectsWithFilter in interface BusinessEntityManagerRestOpenApi
        Parameters:
        filterValue - The string to use as search filter.
        limit - The limit of results. Use -1 to retrieve all.
        sessionId - The session token id.
        Returns:
        A list of up to #limit suggested objects matching the criteria, alphabetically sorted.
      • getSuggestedObjectsWithFilterAndSuperClass

        @RequestMapping(method=GET,
                        value="getSuggestedObjectsWithFilterAndSuperClass/{filterValue}/{superClassName}/{limit}/{sessionId}",
                        produces="application/json")
        @Deprecated
        public List<BusinessObjectLight> getSuggestedObjectsWithFilterAndSuperClass​(@PathVariable("filterValue")
                                                                                    String filterValue,
                                                                                    @PathVariable("superClassName")
                                                                                    String superClassName,
                                                                                    @PathVariable("limit")
                                                                                    int limit,
                                                                                    @PathVariable("sessionId")
                                                                                    String sessionId)
        Deprecated.
        In favor of #getSuggestedObjectsWithFilter(java.lang.String, int, int, java.lang.String...)
        Same as #getSuggestedObjectsWithFilter(java.lang.String, int), but the results will be instances of the super class provided or one of its subclasses. In reality, this method could do the same as #getSuggestedObjectsWithFilter(java.lang.String, int) with superClass set to InventoryObject, but the implementation of both methods may differ significantly in terms of performance and complexity.
        Specified by:
        getSuggestedObjectsWithFilterAndSuperClass in interface BusinessEntityManagerRestOpenApi
        Parameters:
        filterValue - The search string.
        superClassName - The results will be instances of this class or one of its subclasses.
        limit - The limit of results. Use -1 to retrieve all.
        sessionId - The session token id.
        Returns:
        A list of up to #limit suggested objects matching the criteria, alphabetically sorted.
      • getSuggestedObjectsWithFilterAndClasses

        @RequestMapping(method=GET,
                        value="getSuggestedObjectsWithFilterAndClasses/{filterValue}/{skip}/{limit}/{classNames}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getSuggestedObjectsWithFilterAndClasses​(@PathVariable("filterValue")
                                                                                 String filterValue,
                                                                                 @PathVariable("skip")
                                                                                 int skip,
                                                                                 @PathVariable("limit")
                                                                                 int limit,
                                                                                 @PathVariable("classNames")
                                                                                 String[] classNames,
                                                                                 @PathVariable("sessionId")
                                                                                 String sessionId)
        Gets a set of suggested objects with filter.
        Specified by:
        getSuggestedObjectsWithFilterAndClasses in interface BusinessEntityManagerRestOpenApi
        Parameters:
        filterValue - A possible part of the name of an object(s) or class(es).
        skip - The number of leading suggested objects to skip.
        limit - The number of suggested objects the result should be limited to.
        classNames - The suggested objects will be instance of this classes or subclasses. Used "null" for none.
        sessionId - The session token id.
        Returns:
        List of suggested objects.
      • getObjectsByNameAndClassName

        @RequestMapping(method=GET,
                        value="getObjectsByNameAndClassName/{names}/{skip}/{limit}/{classNames}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectsByNameAndClassName​(@PathVariable("names")
                                                                      List<String> names,
                                                                      @PathVariable("skip")
                                                                      int skip,
                                                                      @PathVariable("limit")
                                                                      int limit,
                                                                      @PathVariable("classNames")
                                                                      String[] classNames,
                                                                      @PathVariable("sessionId")
                                                                      String sessionId)
        Gets a set of objects by its exact names and class names, used to know if an object with the same its already created in the inventory e.g.an IP address or a subnet in the ipam module can not be repeated.
        Specified by:
        getObjectsByNameAndClassName in interface BusinessEntityManagerRestOpenApi
        Parameters:
        names - The exact names of the objects.
        skip - The page.
        limit - The limit per page.
        classNames - Class names of the objects.
        sessionId - The session token id.
        Returns:
        A list of objects.
      • getSuggestedChildrenWithFilter

        @RequestMapping(method=GET,
                        value="getSuggestedChildrenWithFilter/{parentClassName}/{parentId}/{filterValue}/{ignoreSpecialChildren}/{skip}/{limit}/{classNames}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getSuggestedChildrenWithFilter​(@PathVariable("parentClassName")
                                                                        String parentClassName,
                                                                        @PathVariable("parentId")
                                                                        String parentId,
                                                                        @PathVariable("filterValue")
                                                                        String filterValue,
                                                                        @PathVariable("ignoreSpecialChildren")
                                                                        boolean ignoreSpecialChildren,
                                                                        @PathVariable("skip")
                                                                        int skip,
                                                                        @PathVariable("limit")
                                                                        int limit,
                                                                        @PathVariable("classNames")
                                                                        String[] classNames,
                                                                        @PathVariable("sessionId")
                                                                        String sessionId)
        Gets a set of suggested children with filter (no recursive).
        Specified by:
        getSuggestedChildrenWithFilter in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentClassName - The parent class name.
        parentId - The parent id.
        filterValue - Filter children (no recursive) by name or class.
        ignoreSpecialChildren - True to ignore special children in the suggested children (no recursive).
        skip - The number of leading children to skip.
        limit - The number of children the result should be limited to.
        classNames - The suggested children will be instance of this classes or subclasses. If any, "null" otherwise.
        sessionId - The session token id.
        Returns:
        List of suggested children (no recursive).
      • getObjectsOfClassLight

        @RequestMapping(method=GET,
                        value="getObjectsOfClassLight/{className}/{page}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectsOfClassLight​(@PathVariable("className")
                                                                String className,
                                                                @PathVariable("page")
                                                                long page,
                                                                @PathVariable("limit")
                                                                long limit,
                                                                @PathVariable("sessionId")
                                                                String sessionId)
        Recursively gets all the light instances of given class, without filters.
        Specified by:
        getObjectsOfClassLight in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Class name. It must be a subclass of InventoryObject.
        page - Page or number of elements to skip.
        limit - Max count of child per page.
        sessionId - The session token id.
        Returns:
        A set of instances of the class.
      • getObjectsOfClassLightWithFilter

        @RequestMapping(method=POST,
                        value="getObjectsOfClassLightWithFilter/{className}/{page}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectsOfClassLightWithFilter​(@PathVariable("className")
                                                                          String className,
                                                                          @RequestBody(required=false)
                                                                          HashMap<String,​String> filters,
                                                                          @PathVariable("page")
                                                                          long page,
                                                                          @PathVariable("limit")
                                                                          long limit,
                                                                          @PathVariable("sessionId")
                                                                          String sessionId)
        Recursively gets all the light instances of given class.
        Specified by:
        getObjectsOfClassLightWithFilter in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Class name. It must be a subclass of InventoryObject.
        filters - Map of filters key: attribute name, value: attribute value.
        page - Page or number of elements to skip.
        limit - Max count of child per page.
        sessionId - The session token id.
        Returns:
        A set of instances of the class.
      • getObjectsOfClass

        @RequestMapping(method=GET,
                        value="getObjectsOfClass/{className}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObject> getObjectsOfClass​(@PathVariable("className")
                                                      String className,
                                                      @PathVariable("maxResults")
                                                      int maxResults,
                                                      @PathVariable("sessionId")
                                                      String sessionId)
        Recursively gets all the instances of given class.
        Specified by:
        getObjectsOfClass in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Class name. It mist be a subclass of InventoryObject.
        maxResults - Max number of results. 0 to get all.
        sessionId - The session token id.
        Returns:
        A list of instances.
      • getObjectChildrenCount

        @RequestMapping(method=POST,
                        value="getObjectChildrenCount/{parentClassName}/{parentId}/{sessionId}",
                        produces="application/json")
        public long getObjectChildrenCount​(@PathVariable("parentClassName")
                                           String parentClassName,
                                           @PathVariable("parentId")
                                           String parentId,
                                           @RequestBody(required=false)
                                           HashMap<String,​String> filters,
                                           @PathVariable("sessionId")
                                           String sessionId)
        Get the child count given the parent class name and id.
        Specified by:
        getObjectChildrenCount in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentClassName - Parent class name.
        parentId - Parent id.
        filters - Map of filters key: attribute name, value: attribute value.
        sessionId - The session token id.
        Returns:
        The count of child.
      • getObjectChildrenWithFilter

        @RequestMapping(method=POST,
                        value="getObjectChildrenWithFilter/{parentClassName}/{parentId}/{skip}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getObjectChildrenWithFilter​(@PathVariable("parentClassName")
                                                                     String parentClassName,
                                                                     @PathVariable("parentId")
                                                                     String parentId,
                                                                     @RequestBody(required=false)
                                                                     HashMap<String,​String> filters,
                                                                     @PathVariable("skip")
                                                                     long skip,
                                                                     @PathVariable("limit")
                                                                     long limit,
                                                                     @PathVariable("sessionId")
                                                                     String sessionId)
        Get a set of children to the given the parent class name and id.
        Specified by:
        getObjectChildrenWithFilter in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentClassName - Parent class name.
        parentId - Parent id.
        filters - Null for no filter, map of filters key: attribute name, value: attribute value.
        skip - Skip index.
        limit - Max count of child.
        sessionId - The session token id.
        Returns:
        Set of children.
      • getSuggestedObjectsWithFilterGroupedByClassName

        @RequestMapping(method=GET,
                        value="getSuggestedObjectsWithFilterGroupedByClassName/{classNames}/{filterValue}/{classesSkip}/{classesLimit}/{objectSkip}/{objectLimit}/{sessionId}",
                        produces="application/json")
        public HashMap<String,​List<BusinessObjectLight>> getSuggestedObjectsWithFilterGroupedByClassName​(@PathVariable("classNames")
                                                                                                               List<String> classNames,
                                                                                                               @PathVariable("filterValue")
                                                                                                               String filterValue,
                                                                                                               @PathVariable("classesSkip")
                                                                                                               long classesSkip,
                                                                                                               @PathVariable("classesLimit")
                                                                                                               long classesLimit,
                                                                                                               @PathVariable("objectSkip")
                                                                                                               long objectSkip,
                                                                                                               @PathVariable("objectLimit")
                                                                                                               long objectLimit,
                                                                                                               @PathVariable("sessionId")
                                                                                                               String sessionId)
        Suggests a number of objects based on a search string. This search string will be case-insensitive-matched against the name of the objects and classes in the inventory attributes to filter.
        Specified by:
        getSuggestedObjectsWithFilterGroupedByClassName in interface BusinessEntityManagerRestOpenApi
        Parameters:
        classNames - List classesToFilter a list of classes to limit the search. Used "null" for none.
        filterValue - Value to filter in the attribute name of every business object name or class name o class display name.
        classesSkip - Class skip index.
        classesLimit - Max count of child.
        objectSkip - Object skip index.
        objectLimit - Max count of objects.
        sessionId - The session token id.
        Returns:
        Set of children.
      • copyObjects

        @RequestMapping(method=PUT,
                        value="copyObjects/{targetObjectClassName}/{targetObjectId}/{recursive}/{sessionId}",
                        produces="application/json")
        public String[] copyObjects​(@PathVariable("targetObjectClassName")
                                    String targetObjectClassName,
                                    @PathVariable("targetObjectId")
                                    String targetObjectId,
                                    @RequestBody
                                    HashMap<String,​List<String>> objects,
                                    @PathVariable("recursive")
                                    boolean recursive,
                                    @PathVariable("sessionId")
                                    String sessionId)
        Copy a set of objects.
        Specified by:
        copyObjects in interface BusinessEntityManagerRestOpenApi
        Parameters:
        targetObjectClassName - Target parent's class name.
        targetObjectId - Target parent's oid.
        objects - Hashmap> with the objects class names as keys and their oids as values.
        recursive - If this operation should also copy the children objects recursively.
        sessionId - The session token id.
        Returns:
        A list containing the newly created object ids.
      • copySpecialObjects

        @RequestMapping(method=PUT,
                        value="copySpecialObjects/{targetObjectClassName}/{targetObjectId}/{recursive}/{sessionId}",
                        produces="application/json")
        public String[] copySpecialObjects​(@PathVariable("targetObjectClassName")
                                           String targetObjectClassName,
                                           @PathVariable("targetObjectId")
                                           String targetObjectId,
                                           @RequestBody
                                           HashMap<String,​List<String>> objects,
                                           @PathVariable("recursive")
                                           boolean recursive,
                                           @PathVariable("sessionId")
                                           String sessionId)
        Copy a set of special objects (this is used to copy objects when they are containment are set in the special containment hierarchy) use case: to move physical links into a wire Container.
        Specified by:
        copySpecialObjects in interface BusinessEntityManagerRestOpenApi
        Parameters:
        targetObjectClassName - Target parent's class name.
        targetObjectId - Target parent's oid.
        objects - Hashmap> with the objects class names as keys and their oids as values.
        recursive - If this operation should also copy the children objects recursively.
        sessionId - The session token id.
        Returns:
        A list containing the newly created object ids.
      • moveObjects

        @RequestMapping(method=PUT,
                        value="moveObjects/{targetObjectClassName}/{targetObjectId}/{sessionId}",
                        produces="application/json")
        public void moveObjects​(@PathVariable("targetObjectClassName")
                                String targetObjectClassName,
                                @PathVariable("targetObjectId")
                                String targetObjectId,
                                @RequestBody
                                HashMap<String,​String[]> objects,
                                @PathVariable("sessionId")
                                String sessionId)
        Move a list of objects to a new parent: this methods ignores those who can't be moved and raises an OperationNotPermittedException, however, it will move those which can be moved.
        Specified by:
        moveObjects in interface BusinessEntityManagerRestOpenApi
        Parameters:
        targetObjectClassName - Parent's class name.
        targetObjectId - Parent's oid.
        objects - Hashmap using the object class name as keys and the respective objects oids as values.
        sessionId - The session token id.
      • moveSpecialObjects

        @RequestMapping(method=PUT,
                        value="moveSpecialObjects/{targetObjectClassName}/{targetObjectId}/{sessionId}",
                        produces="application/json")
        public void moveSpecialObjects​(@PathVariable("targetObjectClassName")
                                       String targetObjectClassName,
                                       @PathVariable("targetObjectId")
                                       String targetObjectId,
                                       @RequestBody
                                       HashMap<String,​String[]> objects,
                                       @PathVariable("sessionId")
                                       String sessionId)
        Move a list of objects to a new parent(taking into account the special hierarchy containment): this methods ignores those who can't be moved and raises an OperationNotPermittedException, however, it will move those which can be moved.
        Specified by:
        moveSpecialObjects in interface BusinessEntityManagerRestOpenApi
        Parameters:
        targetObjectClassName - Parent's class name.
        targetObjectId - Parent's oid.
        objects - Hashmap using the object class name as keys and the respective objects oids as values.
        sessionId - The session token id.
      • canDeleteObject

        @RequestMapping(method=GET,
                        value="canDeleteObject/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public boolean canDeleteObject​(@PathVariable("className")
                                       String className,
                                       @PathVariable("objectId")
                                       String objectId,
                                       @PathVariable("sessionId")
                                       String sessionId)
        Checks recursively if it's safe to delete a single object.
        Specified by:
        canDeleteObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object's class name.
        objectId - Object's id.
        sessionId - The session token id.
        Returns:
        True if the object does not have relationships that keep it from being deleted. False otherwise.
      • deleteObjects

        @RequestMapping(method=DELETE,
                        value="deleteObjects/{releaseRelationships}/{sessionId}",
                        produces="application/json")
        public void deleteObjects​(@RequestBody
                                  HashMap<String,​List<String>> objects,
                                  @PathVariable("releaseRelationships")
                                  boolean releaseRelationships,
                                  @PathVariable("sessionId")
                                  String sessionId)
        Deletes a set of objects.
        Specified by:
        deleteObjects in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objects - A HashMap where the class name is the key and the value is a list of long containing the ids of the objects to be deleted that are instance of the key class.
        releaseRelationships - If all the relationships should be release upon deleting the objects. If false, an OperationNotPermittedException will be raised if the object has incoming relationships.
        sessionId - The session token id.
      • deleteObject

        @RequestMapping(method=DELETE,
                        value="deleteObject/{className}/{objectId}/{releaseRelationships}/{sessionId}",
                        produces="application/json")
        public void deleteObject​(@PathVariable("className")
                                 String className,
                                 @PathVariable("objectId")
                                 String objectId,
                                 @PathVariable("releaseRelationships")
                                 boolean releaseRelationships,
                                 @PathVariable("sessionId")
                                 String sessionId)
        Deletes a single object.
        Specified by:
        deleteObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object's class name.
        objectId - Object's id.
        releaseRelationships - Release relationships automatically. If set to false, it will fail if the object already has incoming relationships.
        sessionId - The session token id.
      • updateObject

        @RequestMapping(method=PUT,
                        value="updateObject/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public ChangeDescriptor updateObject​(@PathVariable("className")
                                             String className,
                                             @PathVariable("objectId")
                                             String objectId,
                                             @RequestBody
                                             HashMap<String,​String> attributes,
                                             @PathVariable("sessionId")
                                             String sessionId)
        Updates an object attributes. Note that you can't set binary attributes through this method. Use setBinaryAttributes instead.
        Specified by:
        updateObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - Object's class name.
        objectId - Object's id.
        attributes - The attributes to be updated (the key is the attribute name, the value is and array with the value -or values in case of MANY TO MANY list type attributes).
        sessionId - The session token id.
        Returns:
        The summary of the changes that were made.
      • moveObjectsToPool

        @RequestMapping(method=PUT,
                        value="moveObjectsToPool/{targetObjectClassName}/{targetObjectId}/{sessionId}",
                        produces="application/json")
        public void moveObjectsToPool​(@PathVariable("targetObjectClassName")
                                      String targetObjectClassName,
                                      @PathVariable("targetObjectId")
                                      String targetObjectId,
                                      @RequestBody
                                      HashMap<String,​String[]> objects,
                                      @PathVariable("sessionId")
                                      String sessionId)
        Move a list of objects to a new parent: this methods ignores those who can't be moved and raises an OperationNotPermittedException, however, it will move those which can be moved.
        Specified by:
        moveObjectsToPool in interface BusinessEntityManagerRestOpenApi
        Parameters:
        targetObjectClassName - Parent's class name.
        targetObjectId - Parent's id.
        objects - Map using the object class name as keys and the respective objects ids as values.
        sessionId - The session token id.
      • createPoolItem

        @RequestMapping(method=POST,
                        value="createPoolItem/{poolId}/{className}/{templateId}/{sessionId}",
                        produces="application/json")
        public String createPoolItem​(@PathVariable("poolId")
                                     String poolId,
                                     @PathVariable("className")
                                     String className,
                                     @RequestBody
                                     HashMap<String,​String> attributes,
                                     @PathVariable("templateId")
                                     String templateId,
                                     @PathVariable("sessionId")
                                     String sessionId)
        Creates an object inside a pool.
        Specified by:
        createPoolItem in interface BusinessEntityManagerRestOpenApi
        Parameters:
        poolId - Parent pool id.
        className - Class this object is going to be instance of.
        attributes - The list of attributes to be set initially. The values are serialized objects.
        templateId - The id of the template to be used to create this object. This id was probably retrieved by {@link ApplicationEntityManager.getTemplatesForClass(String)} before. Use a "null" or empty string to not use a template.
        sessionId - The session token id.
        Returns:
        The id of the newly created object.
      • copyPoolItem

        @RequestMapping(method=PUT,
                        value="copyPoolItem/{poolId}/{poolItemClassName}/{poolItemId}/{recursive}/{sessionId}",
                        produces="application/json")
        public String copyPoolItem​(@PathVariable("poolId")
                                   String poolId,
                                   @PathVariable("poolItemClassName")
                                   String poolItemClassName,
                                   @PathVariable("poolItemId")
                                   String poolItemId,
                                   @PathVariable("recursive")
                                   boolean recursive,
                                   @PathVariable("sessionId")
                                   String sessionId)
        Copy a pool item from a pool to another pool.
        Specified by:
        copyPoolItem in interface BusinessEntityManagerRestOpenApi
        Parameters:
        poolId - The id of the pool node.
        poolItemClassName - The class name for the pool item.
        poolItemId - The id for the pool item.
        recursive - If this operation should also copy the children objects recursively.
        sessionId - The session token id.
        Returns:
        The newly created object id.
      • movePoolItem

        @RequestMapping(method=PUT,
                        value="movePoolItem/{poolId}/{poolItemClassName}/{poolItemId}/{sessionId}",
                        produces="application/json")
        public void movePoolItem​(@PathVariable("poolId")
                                 String poolId,
                                 @PathVariable("poolItemClassName")
                                 String poolItemClassName,
                                 @PathVariable("poolItemId")
                                 String poolItemId,
                                 @PathVariable("sessionId")
                                 String sessionId)
        Move a pool item from a pool to another pool.
        Specified by:
        movePoolItem in interface BusinessEntityManagerRestOpenApi
        Parameters:
        poolId - The id of the pool node.
        poolItemClassName - The class name for the pool item.
        poolItemId - The id for the pool item.
        sessionId - The session token id.
      • getPoolItems

        @RequestMapping(method=GET,
                        value="getPoolItems/{poolId}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getPoolItems​(@PathVariable("poolId")
                                                      String poolId,
                                                      @PathVariable("limit")
                                                      int limit,
                                                      @PathVariable("sessionId")
                                                      String sessionId)
        Retrieves the list of objects from a pool.
        Specified by:
        getPoolItems in interface BusinessEntityManagerRestOpenApi
        Parameters:
        poolId - Parent pool id.
        limit - The results limit. Per page 0 to avoid the limit.
        sessionId - The session token id.
        Returns:
        The list of items inside the pool.
      • getPoolItemsByClassName

        @RequestMapping(method=GET,
                        value="getPoolItemsByClassName/{poolId}/{className}/{page}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getPoolItemsByClassName​(@PathVariable("poolId")
                                                                 String poolId,
                                                                 @PathVariable("className")
                                                                 String className,
                                                                 @PathVariable("page")
                                                                 int page,
                                                                 @PathVariable("limit")
                                                                 int limit,
                                                                 @PathVariable("sessionId")
                                                                 String sessionId)
        Retrieves the list of objects from a pool.
        Specified by:
        getPoolItemsByClassName in interface BusinessEntityManagerRestOpenApi
        Parameters:
        poolId - Parent pool id.
        className - A given className to retrieve a set of objects of that className form the pool used when the pool is a Generic class and could have objects of different class.
        page - The number of values of the result to skip or the page 0 to avoid.
        limit - The results limit. per page 0 to avoid the limit.
        sessionId - The session token id.
        Returns:
        The list of items inside the pool.
      • getPoolItemsCount

        @RequestMapping(method=GET,
                        value="getPoolItemsCount/{poolId}/{className}/{sessionId}",
                        produces="application/json")
        public long getPoolItemsCount​(@PathVariable("poolId")
                                      String poolId,
                                      @PathVariable("className")
                                      String className,
                                      @PathVariable("sessionId")
                                      String sessionId)
        Count the total of objects in a pool.
        Specified by:
        getPoolItemsCount in interface BusinessEntityManagerRestOpenApi
        Parameters:
        poolId - Parent pool id.
        className - A given className to retrieve a set of objects of that className form the pool used when the pool is a Generic class and could have objects of different class.
        sessionId - The session token id.
        Returns:
        The count of items inside the pool.
      • getAttributeValueAsString

        @RequestMapping(method=GET,
                        value="getAttributeValueAsString/{objectClassName}/{objectId}/{attributeName}/{sessionId}",
                        produces="application/json")
        public String getAttributeValueAsString​(@PathVariable("objectClassName")
                                                String objectClassName,
                                                @PathVariable("objectId")
                                                String objectId,
                                                @PathVariable("attributeName")
                                                String attributeName,
                                                @PathVariable("sessionId")
                                                String sessionId)
        Utility method that returns the value of an attribute of a given object as a string. In date-type attributes, it will return the formatted dated, while in list types, it will return the name of the linked element.
        Specified by:
        getAttributeValueAsString in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - The class of the object.
        objectId - The id of the object.
        attributeName - The attribute whose value will be retrieved.
        sessionId - The session token id.
        Returns:
        The value of the requested attribute. Null values are possible.
      • getAttributeValuesAsString

        @RequestMapping(method=GET,
                        value="getAttributeValuesAsString/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public HashMap<String,​String> getAttributeValuesAsString​(@PathVariable("objectClassName")
                                                                       String objectClassName,
                                                                       @PathVariable("objectId")
                                                                       String objectId,
                                                                       @PathVariable("sessionId")
                                                                       String sessionId)
        Fetches the attributes of an inventory object (and their values) and returns them as strings. This is useful mainly to display property sheets and reports, so it's not necessary to always check if an attribute is a list type and retrieve its string representation.
        Specified by:
        getAttributeValuesAsString in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - The class of the object.
        objectId - The id of the object.
        sessionId - The session token id.
        Returns:
        A dictionary with the name of the attributes and their values represented as strings.
      • getSpecialAttribute

        @RequestMapping(method=GET,
                        value="getSpecialAttribute/{objectClassName}/{objectId}/{specialAttributeName}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getSpecialAttribute​(@PathVariable("objectClassName")
                                                             String objectClassName,
                                                             @PathVariable("objectId")
                                                             String objectId,
                                                             @PathVariable("specialAttributeName")
                                                             String specialAttributeName,
                                                             @PathVariable("sessionId")
                                                             String sessionId)
        Gets the value of a special attribute.A special attribute is one belonging to a business domain specific attribute (usually a model. Domain specific attribute information is not filed under the standard metadata but a special one. Implementations may vary).
        Specified by:
        getSpecialAttribute in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object's class name.
        objectId - Object's id.
        specialAttributeName - Special attribute name.
        sessionId - The session token id.
        Returns:
        A list of objects related to the object through a special relationship. An empty array if the object provided is not related to others using that relationship.
      • getSpecialAttributes

        @RequestMapping(method=GET,
                        value="getSpecialAttributes/{objectClassName}/{objectId}/{attributeNames}/{sessionId}",
                        produces="application/json")
        public HashMap<String,​List<BusinessObjectLight>> getSpecialAttributes​(@PathVariable("objectClassName")
                                                                                    String objectClassName,
                                                                                    @PathVariable("objectId")
                                                                                    String objectId,
                                                                                    @PathVariable("attributeNames")
                                                                                    String[] attributeNames,
                                                                                    @PathVariable("sessionId")
                                                                                    String sessionId)
        Returns the specified special relationships of a given object as a hashmap whose keys are the names of the relationships and the values the list of related objects. If no filter (attributeNames) is provided, all special attributes (relationships) will be returned.
        Specified by:
        getSpecialAttributes in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object class name.
        objectId - Object Id.
        attributeNames - The list of special attributes (relationships) to be fetched. if none provided, the method will return all of them.
        sessionId - The session token id.
        Returns:
        The hash map with the existing special relationships and the associated objects.
      • getAnnotatedSpecialAttribute

        @RequestMapping(method=GET,
                        value="getAnnotatedSpecialAttribute/{objectClassName}/{objectId}/{specialAttributeName}/{sessionId}",
                        produces="application/json")
        public List<AnnotatedBusinessObjectLight> getAnnotatedSpecialAttribute​(@PathVariable("objectClassName")
                                                                               String objectClassName,
                                                                               @PathVariable("objectId")
                                                                               String objectId,
                                                                               @PathVariable("specialAttributeName")
                                                                               String specialAttributeName,
                                                                               @PathVariable("sessionId")
                                                                               String sessionId)
        This method will extract the object at the other side of the special relationship and all the properties of the relationship itself.
        Specified by:
        getAnnotatedSpecialAttribute in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - The class of the object whose special attribute will be retrieved from.
        objectId - The object's id.
        specialAttributeName - The name of the special attribute.
        sessionId - The session token id.
        Returns:
        The list of elements related with such relationship plus the properties of theirs relationships.
      • hasSpecialAttribute

        @RequestMapping(method=GET,
                        value="hasSpecialAttribute/{objectClassName}/{objectId}/{attributeName}/{sessionId}",
                        produces="application/json")
        public boolean hasSpecialAttribute​(@PathVariable("objectClassName")
                                           String objectClassName,
                                           @PathVariable("objectId")
                                           String objectId,
                                           @PathVariable("attributeName")
                                           String attributeName,
                                           @PathVariable("sessionId")
                                           String sessionId)
        Check if an object has a given special attribute.
        Specified by:
        hasSpecialAttribute in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object class name.
        objectId - Object id.
        attributeName - Attribute name.
        sessionId - The session token id.
        Returns:
        True if the object has special attributes.
      • getCommonParent

        @RequestMapping(method=GET,
                        value="getCommonParent/{aObjectClassName}/{aObjectId}/{bObjectClassName}/{bObjectId}/{sessionId}",
                        produces="application/json")
        public BusinessObjectLight getCommonParent​(@PathVariable("aObjectClassName")
                                                   String aObjectClassName,
                                                   @PathVariable("aObjectId")
                                                   String aObjectId,
                                                   @PathVariable("bObjectClassName")
                                                   String bObjectClassName,
                                                   @PathVariable("bObjectId")
                                                   String bObjectId,
                                                   @PathVariable("sessionId")
                                                   String sessionId)
        Finds the common parent between two objects.
        Specified by:
        getCommonParent in interface BusinessEntityManagerRestOpenApi
        Parameters:
        aObjectClassName - Object A class name.
        aObjectId - Object A id.
        bObjectClassName - Object B class name.
        bObjectId - Object B id.
        sessionId - The session token id.
        Returns:
        The common parent or null if none.
      • getParent

        @RequestMapping(method=GET,
                        value="getParent/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public BusinessObjectLight getParent​(@PathVariable("objectClassName")
                                             String objectClassName,
                                             @PathVariable("objectId")
                                             String objectId,
                                             @PathVariable("sessionId")
                                             String sessionId)
        Gets the parent of a given object in the containment hierarchy.
        Specified by:
        getParent in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object class name.
        objectId - Object id.
        sessionId - The session token id.
        Returns:
        The immediate parent. Null if the parent is null. A dummy object with id -1 if the parent is DummyRoot.
      • getParents

        @RequestMapping(method=GET,
                        value="getParents/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getParents​(@PathVariable("objectClassName")
                                                    String objectClassName,
                                                    @PathVariable("objectId")
                                                    String objectId,
                                                    @PathVariable("sessionId")
                                                    String sessionId)
        Retrieves recursively the list of parents of an object in the containment hierarchy.
        Specified by:
        getParents in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object class name.
        objectId - Object id.
        sessionId - The session token id.
        Returns:
        The list of parents.
      • getParentsUntilFirstOfClass

        @RequestMapping(method=GET,
                        value="getParentsUntilFirstOfClass/{objectClassName}/{objectId}/{objectToMatchClassNames}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getParentsUntilFirstOfClass​(@PathVariable("objectClassName")
                                                                     String objectClassName,
                                                                     @PathVariable("objectId")
                                                                     String objectId,
                                                                     @PathVariable("objectToMatchClassNames")
                                                                     String[] objectToMatchClassNames,
                                                                     @PathVariable("sessionId")
                                                                     String sessionId)
        Gets the list of parents (according to the special and standard containment hierarchy) until it finds an instance of class objectToMatchClassName (for example "give me the parents of this port until you find the nearest rack").
        Specified by:
        getParentsUntilFirstOfClass in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Class of the object to get the parents from.
        objectId - Id of the object to get the parents from.
        objectToMatchClassNames - Classes of the objects that will limit the search. It can be a superclass, if you want to match many classes at once.
        sessionId - The session token id.
        Returns:
        The list of parents until an instance of objectToMatchClassName is found. If no instance of that class is found, all parents until the Dummy Root will be returned.
      • getFirstParentOfClass

        @RequestMapping(method=GET,
                        value="getFirstParentOfClass/{objectClassName}/{objectId}/{objectToMatchClassName}/{sessionId}",
                        produces="application/json")
        public BusinessObject getFirstParentOfClass​(@PathVariable("objectClassName")
                                                    String objectClassName,
                                                    @PathVariable("objectId")
                                                    String objectId,
                                                    @PathVariable("objectToMatchClassName")
                                                    String objectToMatchClassName,
                                                    @PathVariable("sessionId")
                                                    String sessionId)
        Gets the first occurrence of a parent with a given class (according to the special and standard containment hierarchy) (for example "give me the parent of this port until you find the nearest rack").
        Specified by:
        getFirstParentOfClass in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Class of the object to get the parent from.
        objectId - Id of the object to get the parent from.
        objectToMatchClassName - Class of the object that will limit the search. It can be a superclass, if you want to match many classes at once.
        sessionId - The session token id.
        Returns:
        The the first occurrence of a parent with a given class. If no instance of that class is found, the child of Dummy Root related in this hierarchy will be returned.
      • getMultipleParents

        @RequestMapping(method=GET,
                        value="getMultipleParents/{objectId}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getMultipleParents​(@PathVariable("objectId")
                                                            String objectId,
                                                            @PathVariable("sessionId")
                                                            String sessionId)
        Gets the parents of an object that breaks the containment rule of having only one parent. For example the links and containers in the Outside Plant Module.
        Specified by:
        getMultipleParents in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectId - Object Id.
        sessionId - The session token id.
        Returns:
        The set of parents.
      • isParent

        @RequestMapping(method=GET,
                        value="isParent/{parentClassName}/{parentId}/{childClassName}/{childId}/{sessionId}",
                        produces="application/json")
        public boolean isParent​(@PathVariable("parentClassName")
                                String parentClassName,
                                @PathVariable("parentId")
                                String parentId,
                                @PathVariable("childClassName")
                                String childClassName,
                                @PathVariable("childId")
                                String childId,
                                @PathVariable("sessionId")
                                String sessionId)
        Checks if a given object is parent to another, according to the standard or special containment hierarchy.
        Specified by:
        isParent in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentClassName - Alleged parent Class Name.
        parentId - Alleged parent id.
        childClassName - Child Class Name.
        childId - Child Id.
        sessionId - The session token id.
        Returns:
        True if the given parent has the given child (according to the special and standard containment hierarchy).
      • getRootPools

        @RequestMapping(method=GET,
                        value="getRootPools/{className}/{type}/{includeSubclasses}/{sessionId}",
                        produces="application/json")
        public List<InventoryObjectPool> getRootPools​(@PathVariable("className")
                                                      String className,
                                                      @PathVariable("type")
                                                      int type,
                                                      @PathVariable("includeSubclasses")
                                                      boolean includeSubclasses,
                                                      @PathVariable("sessionId")
                                                      String sessionId)
        Retrieves the pools that don't have any parent and are normally intended to be managed by the Pool Manager.
        Specified by:
        getRootPools in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - The class name used to filter the results. Only the pools with a className attribute matching the provided value will be returned. Use "null" if you want to get all.
        type - The type of pools that should be retrieved. Root pools can be for general purpose, or as roots in models.
        includeSubclasses - Use true if you want to get only the pools whose className property matches exactly the one provided, and false if you want to also include the subclasses.
        sessionId - The session token id.
        Returns:
        A set of pools.
      • getPoolsInObject

        @RequestMapping(method=GET,
                        value="getPoolsInObject/{objectClassName}/{objectId}/{poolClassName}/{sessionId}",
                        produces="application/json")
        public List<InventoryObjectPool> getPoolsInObject​(@PathVariable("objectClassName")
                                                          String objectClassName,
                                                          @PathVariable("objectId")
                                                          String objectId,
                                                          @PathVariable("poolClassName")
                                                          String poolClassName,
                                                          @PathVariable("sessionId")
                                                          String sessionId)
        Retrieves the pools associated to a particular object.
        Specified by:
        getPoolsInObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - The parent object class name.
        objectId - The parent object id.
        poolClassName - The class name used to filter the results. Only the pools with a className attribute matching the provided value will be returned. Use "null" if you want to get all.
        sessionId - The session token id.
        Returns:
        A set of pools.
      • getPoolsInPool

        @RequestMapping(method=GET,
                        value="getPoolsInPool/{parentPoolId}/{poolClassName}/{sessionId}",
                        produces="application/json")
        public List<InventoryObjectPool> getPoolsInPool​(@PathVariable("parentPoolId")
                                                        String parentPoolId,
                                                        @PathVariable("poolClassName")
                                                        String poolClassName,
                                                        @PathVariable("sessionId")
                                                        String sessionId)
        Retrieves the pools associated to a particular pool.
        Specified by:
        getPoolsInPool in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentPoolId - The parent pool id.
        poolClassName - The class name used to filter the results. Only the pools with a className attribute matching the provided value will be returned.
        sessionId - The session token id.
        Returns:
        A set of pools.
      • getSuggestedPoolsByName

        @RequestMapping(method=GET,
                        value="getSuggestedPoolsByName/{classNames}/{filterValue}/{poolSkip}/{poolLimit}/{objectSkip}/{objectLimit}/{sessionId}",
                        produces="application/json")
        public HashMap<String,​List<InventoryObjectPool>> getSuggestedPoolsByName​(@PathVariable("classNames")
                                                                                       List<String> classNames,
                                                                                       @PathVariable("filterValue")
                                                                                       String filterValue,
                                                                                       @PathVariable("poolSkip")
                                                                                       long poolSkip,
                                                                                       @PathVariable("poolLimit")
                                                                                       long poolLimit,
                                                                                       @PathVariable("objectSkip")
                                                                                       long objectSkip,
                                                                                       @PathVariable("objectLimit")
                                                                                       long objectLimit,
                                                                                       @PathVariable("sessionId")
                                                                                       String sessionId)
        Suggests a number of pools based on a search string (the pool name).This search string will be case-insensitive-matched against the name of the objects and classes in the inventory attributes to filter.
        Specified by:
        getSuggestedPoolsByName in interface BusinessEntityManagerRestOpenApi
        Parameters:
        classNames - List classesToFilter a list of classes to limit the search. Used "null" for none.
        filterValue - Value to filter in the attribute name of every business object name or class name o class display name.
        poolSkip - Skip index.
        poolLimit - Max count of child.
        objectSkip - Object skip index.
        objectLimit - Max count of objects.
        sessionId - The session token id.
        Returns:
        Set of pools.
      • getPoolsInPoolCount

        @RequestMapping(method=GET,
                        value="getPoolsInPoolCount/{parentPoolId}/{poolClassName}/{sessionId}",
                        produces="application/json")
        public long getPoolsInPoolCount​(@PathVariable("parentPoolId")
                                        String parentPoolId,
                                        @PathVariable("poolClassName")
                                        String poolClassName,
                                        @PathVariable("sessionId")
                                        String sessionId)
        Retrieves the total count of pools associated to a particular pool.
        Specified by:
        getPoolsInPoolCount in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentPoolId - The parent pool id.
        poolClassName - The class name used to filter the results. Only the pools with a className attribute matching the provided value will be returned.
        sessionId - The session token id.
        Returns:
        The total count of the pools.
      • getPool

        @RequestMapping(method=GET,
                        value="getPool/{poolId}/{sessionId}",
                        produces="application/json")
        public InventoryObjectPool getPool​(@PathVariable("poolId")
                                           String poolId,
                                           @PathVariable("sessionId")
                                           String sessionId)
        Gets a pool by its id.
        Specified by:
        getPool in interface BusinessEntityManagerRestOpenApi
        Parameters:
        poolId - The pool's id.
        sessionId - The session token id.
        Returns:
        The pool as a Pool object.
      • getWarehousesInObject

        @RequestMapping(method=GET,
                        value="getWarehousesInObject/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getWarehousesInObject​(@PathVariable("objectClassName")
                                                               String objectClassName,
                                                               @PathVariable("objectId")
                                                               String objectId,
                                                               @PathVariable("sessionId")
                                                               String sessionId)
        Gets the warehouses in a object.
        Specified by:
        getWarehousesInObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - The class of the object.
        objectId - The id of the object.
        sessionId - The session token id.
        Returns:
        Gets the warehouses in a object.
      • getPhysicalNodeToObjectInWarehouse

        @RequestMapping(method=GET,
                        value="getPhysicalNodeToObjectInWarehouse/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public BusinessObjectLight getPhysicalNodeToObjectInWarehouse​(@PathVariable("objectClassName")
                                                                      String objectClassName,
                                                                      @PathVariable("objectId")
                                                                      String objectId,
                                                                      @PathVariable("sessionId")
                                                                      String sessionId)
        Gets the physical node of a warehouse item.
        Specified by:
        getPhysicalNodeToObjectInWarehouse in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - The class of the object.
        objectId - The id of the object.
        sessionId - The session token id.
        Returns:
        Gets the physical node of a warehouse item.
      • getWarehouseToObject

        @RequestMapping(method=GET,
                        value="getWarehouseToObject/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public BusinessObjectLight getWarehouseToObject​(@PathVariable("objectClassName")
                                                        String objectClassName,
                                                        @PathVariable("objectId")
                                                        String objectId,
                                                        @PathVariable("sessionId")
                                                        String sessionId)
        Gets warehouse related to object.
        Specified by:
        getWarehouseToObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - The class of the object.
        objectId - The id of the object.
        sessionId - The session token id.
        Returns:
        Gets warehouse related to object.
      • getChildrenOfClass

        @RequestMapping(method=GET,
                        value="getChildrenOfClass/{parentId}/{parentClassName}/{classNameToFilter}/{page}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObject> getChildrenOfClass​(@PathVariable("parentId")
                                                       String parentId,
                                                       @PathVariable("parentClassName")
                                                       String parentClassName,
                                                       @PathVariable("classNameToFilter")
                                                       String classNameToFilter,
                                                       @PathVariable("page")
                                                       int page,
                                                       @PathVariable("maxResults")
                                                       int maxResults,
                                                       @PathVariable("sessionId")
                                                       String sessionId)
        Gets the direct children of a given object of a given class.
        Specified by:
        getChildrenOfClass in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentId - Parent id.
        parentClassName - Parent class name.
        classNameToFilter - Class name to be match against.
        page - The number of page of the number of elements to skip.
        maxResults - Max number of results. 0 to get all.
        sessionId - The session token id.
        Returns:
        A list of children of parentid/parentClass instance that are instances of classNameToFilter.
      • getSpecialChildrenOfClassLight

        @RequestMapping(method=GET,
                        value="getSpecialChildrenOfClassLight/{parentId}/{parentClassName}/{classNameToFilter}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getSpecialChildrenOfClassLight​(@PathVariable("parentId")
                                                                        String parentId,
                                                                        @PathVariable("parentClassName")
                                                                        String parentClassName,
                                                                        @PathVariable("classNameToFilter")
                                                                        String classNameToFilter,
                                                                        @PathVariable("maxResults")
                                                                        int maxResults,
                                                                        @PathVariable("sessionId")
                                                                        String sessionId)
        Returns the special children of a given object as RemoteBusinessObjectLight instances.This method is not recursive.
        Specified by:
        getSpecialChildrenOfClassLight in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentId - The id of the parent object.
        parentClassName - The class name of the parent object.
        classNameToFilter - The superclass/class to be used to filter the results. You can also use abstract superclasses.
        maxResults - The max number of results to fetch. Use -1 to retrieve all.
        sessionId - The session token id.
        Returns:
        The list of special children of the given object, filtered using classNameToFilter.
      • getChildrenOfClassLightRecursive

        @RequestMapping(method=POST,
                        value="getChildrenOfClassLightRecursive/{parentId}/{parentClassName}/{classNameToFilter}/{page}/{limit}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getChildrenOfClassLightRecursive​(@PathVariable("parentId")
                                                                          String parentId,
                                                                          @PathVariable("parentClassName")
                                                                          String parentClassName,
                                                                          @PathVariable("classNameToFilter")
                                                                          String classNameToFilter,
                                                                          @RequestBody(required=false)
                                                                          HashMap<String,​String> attributes,
                                                                          @PathVariable("page")
                                                                          int page,
                                                                          @PathVariable("limit")
                                                                          int limit,
                                                                          @PathVariable("sessionId")
                                                                          String sessionId)
        Gets all class and abstract class children of a given class to filter in a hierarchy with root in the given parent.i.e.: all the ports in Router, all the Routers in a City.
        Specified by:
        getChildrenOfClassLightRecursive in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentId - Object id of the root parent of the hierarchy.
        parentClassName - Class name of the root parent of the hierarchy.
        classNameToFilter - Class name of the expected children.
        attributes - If filtering by the attributes of the retrieved objects.
        page - The page or the number of elements to skip, no pagination -1.
        limit - Maximum number of results, -1 no limit.
        sessionId - The session token id.
        Returns:
        The list of object instance of the given class to filter.
      • getSpecialChildrenOfClassLightRecursive

        @RequestMapping(method=GET,
                        value="getSpecialChildrenOfClassLightRecursive/{parentId}/{parentClassName}/{classNameToFilter}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getSpecialChildrenOfClassLightRecursive​(@PathVariable("parentId")
                                                                                 String parentId,
                                                                                 @PathVariable("parentClassName")
                                                                                 String parentClassName,
                                                                                 @PathVariable("classNameToFilter")
                                                                                 String classNameToFilter,
                                                                                 @PathVariable("maxResults")
                                                                                 int maxResults,
                                                                                 @PathVariable("sessionId")
                                                                                 String sessionId)
        Gets all class and abstract class special children of a given class to filter in a hierarchy with root in the given parent.Use case: used in some class level and inventory level reports script.
        Specified by:
        getSpecialChildrenOfClassLightRecursive in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentId - Object id of the root parent of the hierarchy.
        parentClassName - Class name of the root parent of the hierarchy.
        classNameToFilter - Class name of the expected children.
        maxResults - Maximum number of results, -1 no limit.
        sessionId - The session token id.
        Returns:
        The list of object instance of the given class to filter.
      • getChildrenOfClassLight

        @RequestMapping(method=GET,
                        value="getChildrenOfClassLight/{parentId}/{parentClassName}/{classNameToFilter}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getChildrenOfClassLight​(@PathVariable("parentId")
                                                                 String parentId,
                                                                 @PathVariable("parentClassName")
                                                                 String parentClassName,
                                                                 @PathVariable("classNameToFilter")
                                                                 String classNameToFilter,
                                                                 @PathVariable("maxResults")
                                                                 int maxResults,
                                                                 @PathVariable("sessionId")
                                                                 String sessionId)
        Same as getChildrenOfClass, but returns only the light version of the objects.
        Specified by:
        getChildrenOfClassLight in interface BusinessEntityManagerRestOpenApi
        Parameters:
        parentId - Parent id.
        parentClassName - Parent class name.
        classNameToFilter - Class name to be match against.
        maxResults - Max number of results. 0 to get all.
        sessionId - The session token id.
        Returns:
        A list of children of parentid/parentClass instance, instances of classToFilter.
      • countChildren

        @RequestMapping(method=GET,
                        value="countChildren/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public long countChildren​(@PathVariable("objectClassName")
                                  String objectClassName,
                                  @PathVariable("objectId")
                                  String objectId,
                                  @PathVariable("sessionId")
                                  String sessionId)
        Counts if an object has children.
        Specified by:
        countChildren in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object class name.
        objectId - Object id.
        sessionId - The session token id.
        Returns:
        Number of children.
      • countSpecialChildren

        @RequestMapping(method=GET,
                        value="countSpecialChildren/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public long countSpecialChildren​(@PathVariable("objectClassName")
                                         String objectClassName,
                                         @PathVariable("objectId")
                                         String objectId,
                                         @PathVariable("sessionId")
                                         String sessionId)
        Counts if an object has special children.
        Specified by:
        countSpecialChildren in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object class name.
        objectId - Object id.
        sessionId - The session token id.
        Returns:
        Number of special children.
      • getSiblings

        @RequestMapping(method=GET,
                        value="getSiblings/{objectClassName}/{objectId}/{maxResults}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getSiblings​(@PathVariable("objectClassName")
                                                     String objectClassName,
                                                     @PathVariable("objectId")
                                                     String objectId,
                                                     @PathVariable("maxResults")
                                                     int maxResults,
                                                     @PathVariable("sessionId")
                                                     String sessionId)
        Gets the siblings of a given object in the containment hierarchy.
        Specified by:
        getSiblings in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectClassName - Object class name.
        objectId - Object id.
        maxResults - Max number of results to be returned.
        sessionId - The session token id.
        Returns:
        List of siblings.
      • attachFileToObject

        @RequestMapping(method=POST,
                        value="attachFileToObject/{name}/{tags}/{file}/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public long attachFileToObject​(@PathVariable("name")
                                       String name,
                                       @PathVariable("tags")
                                       String tags,
                                       @PathVariable("file")
                                       String file,
                                       @PathVariable("className")
                                       String className,
                                       @PathVariable("objectId")
                                       String objectId,
                                       @PathVariable("sessionId")
                                       String sessionId)
        Relates a file to an inventory object.
        Specified by:
        attachFileToObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        name - The name of the file.
        tags - The tags that describe the contents of the file.
        file - The file itself as string Base64.
        className - The class of the object the file will be attached to.
        objectId - The id of the object the file will be attached to.
        sessionId - The session token id.
        Returns:
        The id of the resulting file object.
      • getFilesForObject

        @RequestMapping(method=GET,
                        value="getFilesForObject/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public List<FileObjectLight> getFilesForObject​(@PathVariable("className")
                                                       String className,
                                                       @PathVariable("objectId")
                                                       String objectId,
                                                       @PathVariable("sessionId")
                                                       String sessionId)
        Fetches the files associated to an inventory object. Note that this call won't retrieve the actual files, but only references to them.
        Specified by:
        getFilesForObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        className - The class of the object whose files will be fetched from.
        objectId - The id of the object whose files will be fetched from.
        sessionId - The session token id.
        Returns:
        The list of files.
      • getFile

        @RequestMapping(method=GET,
                        value="getFile/{fileObjectId}/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public FileObject getFile​(@PathVariable("fileObjectId")
                                  long fileObjectId,
                                  @PathVariable("className")
                                  String className,
                                  @PathVariable("objectId")
                                  String objectId,
                                  @PathVariable("sessionId")
                                  String sessionId)
        Retrieves a particular file associated to an inventory object.This call returns the actual file.
        Specified by:
        getFile in interface BusinessEntityManagerRestOpenApi
        Parameters:
        fileObjectId - The id of the file object.
        className - The class of the object the file is associated to.
        objectId - The id of the object the file is associated to.
        sessionId - The session token id.
        Returns:
        The file.
      • detachFileFromObject

        @RequestMapping(method=DELETE,
                        value="detachFileFromObject/{fileObjectId}/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public void detachFileFromObject​(@PathVariable("fileObjectId")
                                         long fileObjectId,
                                         @PathVariable("className")
                                         String className,
                                         @PathVariable("objectId")
                                         String objectId,
                                         @PathVariable("sessionId")
                                         String sessionId)
        Releases (and deletes) a file associated to an inventory object.
        Specified by:
        detachFileFromObject in interface BusinessEntityManagerRestOpenApi
        Parameters:
        fileObjectId - The id of the file object.
        className - The class of the object the file is associated to.
        objectId - The id of the object the file is associated to.
        sessionId - The session token id.
      • updateFileProperties

        @RequestMapping(method=PUT,
                        value="updateFileProperties/{fileObjectId}/{className}/{objectId}/{sessionId}",
                        produces="application/json")
        public void updateFileProperties​(@PathVariable("fileObjectId")
                                         long fileObjectId,
                                         @RequestBody
                                         List<StringPair> properties,
                                         @PathVariable("className")
                                         String className,
                                         @PathVariable("objectId")
                                         String objectId,
                                         @PathVariable("sessionId")
                                         String sessionId)
        Updates the properties of a file object (name or tags).
        Specified by:
        updateFileProperties in interface BusinessEntityManagerRestOpenApi
        Parameters:
        fileObjectId - The id of the file object.
        properties - The set of properties as a dictionary key-value. Valid keys are "name" and "tags".
        className - The class of the object the file is attached to.
        objectId - The id of the object the file is attached to.
        sessionId - The session token id.
      • getFilesFromRelatedListTypeItems

        @RequestMapping(method=GET,
                        value="getFilesFromRelatedListTypeItems/{objectId}/{sessionId}",
                        produces="application/json")
        public Map<BusinessObjectLight,​List<FileObjectLight>> getFilesFromRelatedListTypeItems​(@PathVariable("objectId")
                                                                                                     String objectId,
                                                                                                     @PathVariable("sessionId")
                                                                                                     String sessionId)
        Retrieves a map with the files related to the list type item attributes of the given object.
        Specified by:
        getFilesFromRelatedListTypeItems in interface BusinessEntityManagerRestOpenApi
        Parameters:
        objectId - The object id.
        sessionId - The session token id.
        Returns:
        The map with the files. The key is the list type item and the value a list with the related files.