Class KuwaibaSoapWebServiceImpl

  • All Implemented Interfaces:
    KuwaibaSoapWebService

    @Service
    public class KuwaibaSoapWebServiceImpl
    extends Object
    implements KuwaibaSoapWebService
    SOAP-based web service implementation.
    Author:
    Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
    • Constructor Detail

      • KuwaibaSoapWebServiceImpl

        public KuwaibaSoapWebServiceImpl()
    • Method Detail

      • createSession

        public RemoteSession createSession​(String username,
                                           String password,
                                           int sessionType)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a session. Only one session per type is allowed. If a new session is created and there was already one of the same type, the old one will be discarded. See RemoteSession.TYPE_XXX for possible session types. System users can not create sessions.
        Specified by:
        createSession in interface KuwaibaSoapWebService
        Parameters:
        username - user login name
        password - user password
        sessionType - The type of session to be created. This type depends on what kind of client is trying to access (a desktop client, a web client, a web service user, etc. See RemoteSession.TYPE_XXX for possible session types
        Returns:
        A session object, including the session token
        Throws:
        ServerSideException - If the user does not exist If the password is incorrect or if the user is not enabled.
      • createUser

        public long createUser​(String userName,
                               String password,
                               String firstName,
                               String lastName,
                               boolean enabled,
                               int type,
                               String email,
                               List<PrivilegeInfo> privileges,
                               long defaultGroupId,
                               String sessionId)
                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a user. System users can be created but not deleted or modified. Create system users only if you are a developer, as they can only be modified or deleted by accessing directly to the database.
        Specified by:
        createUser in interface KuwaibaSoapWebService
        Parameters:
        userName - User name. Can't be null, empty or have non standard characters.
        password - A password (in plain text, it'll be encrypted later). Can't be null nor an empty string
        firstName - User's first name
        lastName - User's last name
        enabled - Is this user enable by default?
        type - The type of the user. See UserProfileLight.USER_TYPE* for possible values
        email - User's email
        privileges - A list privileges that will be granted to this user.
        defaultGroupId - Default group this user will be associated to. Users always belong to at least one group. Other groups can be added later.
        sessionId - Session token
        Returns:
        The new user Id
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the username is null or empty or the username already exists, if the user type is invalid or if the password is an empty string, or if it is attempted to change the user name of the admin user name, or if this operation is attempted on a system user. Also, if the new user type is invalid.
      • setUserProperties

        public void setUserProperties​(long oid,
                                      String username,
                                      String firstName,
                                      String lastName,
                                      String password,
                                      int enabled,
                                      int type,
                                      String email,
                                      String sessionId)
                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Sets the properties of a given user using the id to search for it
        Specified by:
        setUserProperties in interface KuwaibaSoapWebService
        Parameters:
        oid - User id
        username - New user's name. Use null to leave it unchanged.
        firstName - New user's first name. Use null to leave it unchanged
        lastName - New user's last name. Use null to leave it unchanged
        password - New user's password. Use null to leave it unchanged
        enabled - 0 for false, 1 for true, -1 to leave it unchanged
        type - User type. See UserProfile.USER_TYPE* for possible values. Use -1 to leave it unchanged
        email - New user's email
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the username is null or empty or the username already exists, if the user type is invalid or if the password is an empty string, or if it is attempted to change the user name of the admin user name, or if this operation is attempted on a system user. Also, if the new user type is invalid.
      • addUserToGroup

        public void addUserToGroup​(long userId,
                                   long groupId,
                                   String sessionId)
                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds a user to a group
        Specified by:
        addUserToGroup in interface KuwaibaSoapWebService
        Parameters:
        userId - The id of the user to be added to the group
        groupId - Id of the group which the user will be added to
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the user is already related to that group or if the user or group can not be found.
      • removeUserFromGroup

        public void removeUserFromGroup​(long userId,
                                        long groupId,
                                        String sessionId)
                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Removes a user from a group
        Specified by:
        removeUserFromGroup in interface KuwaibaSoapWebService
        Parameters:
        userId - The id of the user to be added to the group
        groupId - Id of the group which the user will be added to
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the user is not related to that group or if the user or the group could not be found
      • setPrivilegeToUser

        public void setPrivilegeToUser​(long userId,
                                       String featureToken,
                                       int accessLevel,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Sets a privilege to a user. If the privilege already exists, the access level is updated, otherwise, the new privilege is added to the user.
        Specified by:
        setPrivilegeToUser in interface KuwaibaSoapWebService
        Parameters:
        userId - The user Id
        featureToken - The feature token. See class Privilege for details. Note that this token must match to the one expected by the client application. That's the only way the correct features will be enabled.
        accessLevel - The feature token. See class Privilege.ACCESS_LEVEL* for details.
        sessionId - Session token
        Throws:
        ServerSideException - If the access level is invalid, if the featureToken has a wrong format or if the user already has that privilege or if the user could not be found.
      • setPrivilegeToGroup

        public void setPrivilegeToGroup​(long groupId,
                                        String featureToken,
                                        int accessLevel,
                                        String sessionId)
                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Sets a privilege to a group. If the privilege already exists, the access level is updated, otherwise, the new privilege is added to the group.
        Specified by:
        setPrivilegeToGroup in interface KuwaibaSoapWebService
        Parameters:
        groupId - The user Id
        featureToken - The feature token. See class Privilege for details. Note that this token must match to the one expected by the client application. That's the only way the correct features will be enabled.
        accessLevel - The feature token. See class Privilege.ACCESS_LEVEL* for details.
        sessionId - Session token
        Throws:
        ServerSideException - If the access level is invalid, if the featureToken has a wrong format or if the group already has that privilege or if the group could not be found
      • setGroupProperties

        public void setGroupProperties​(long oid,
                                       String groupName,
                                       String description,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Sets the properties for an existing group
        Specified by:
        setGroupProperties in interface KuwaibaSoapWebService
        Parameters:
        oid - Group id
        groupName - New group name (null if unchanged)
        description - New group description (null if unchanged)
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the privileges ids is invalid. If the group could not be found.
      • deleteUsers

        public void deleteUsers​(List<Long> oids,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a list of users
        Specified by:
        deleteUsers in interface KuwaibaSoapWebService
        Parameters:
        oids - List of user ids to be deleted
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the users is the default administrator, which can't be deleted Generic exception encapsulating any possible error raised at runtime
      • deleteGroups

        public void deleteGroups​(List<Long> oids,
                                 String sessionId)
                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a list of groups
        Specified by:
        deleteGroups in interface KuwaibaSoapWebService
        Parameters:
        oids - list of group ids to be deleted
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the group you are trying to delete contains the default administrator Generic exception encapsulating any possible error raised at runtime
      • getObjectRelatedView

        public RemoteViewObject getObjectRelatedView​(String oid,
                                                     String objectClass,
                                                     long viewId,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets a particular view related to an object
        Specified by:
        getObjectRelatedView in interface KuwaibaSoapWebService
        Parameters:
        oid - Object id
        objectClass - Object class
        viewId - The view id
        sessionId - Session token
        Returns:
        The View object (which is basically an XML document)
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object or the view can not be found If the corresponding class metadata can not be found If the provided view type is not supported
      • getObjectRelatedViews

        public List<RemoteViewObjectLight> getObjectRelatedViews​(String oid,
                                                                 String objectClass,
                                                                 int viewType,
                                                                 int limit,
                                                                 String sessionId)
                                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Returns list of views associated to an object
        Specified by:
        getObjectRelatedViews in interface KuwaibaSoapWebService
        Parameters:
        oid - Object id
        objectClass - Object class
        viewType - View type
        limit - Max number of results
        sessionId - Session token
        Returns:
        List of objects related to the object
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object can not be found If the corresponding class metadata can not be found If the provided view type is not supported
      • createListTypeItemRelatedView

        public long createListTypeItemRelatedView​(String listTypeItemId,
                                                  String listTypeItemClassName,
                                                  String viewClassName,
                                                  String name,
                                                  String description,
                                                  byte[] structure,
                                                  byte[] background,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a view for a given list type item. If there's already a view of the provided view type, it will be overwritten
        Specified by:
        createListTypeItemRelatedView in interface KuwaibaSoapWebService
        Parameters:
        listTypeItemId - list type item id
        listTypeItemClassName - list type item class name
        viewClassName - view class name
        name - view name
        description - view description
        structure - XML document with the view structure
        background - background image
        sessionId - Session token
        Returns:
        The id of the new view.
        Throws:
        ServerSideException - If the list type item class can not be found If the view type is not supported
      • updateListTypeItemRelatedView

        public void updateListTypeItemRelatedView​(String listTypeItemId,
                                                  String listTypeItemClass,
                                                  long viewId,
                                                  String name,
                                                  String description,
                                                  byte[] structure,
                                                  byte[] background,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a view for a given list type item. If there's already a view of the provided view type, it will be overwritten
        Specified by:
        updateListTypeItemRelatedView in interface KuwaibaSoapWebService
        Parameters:
        listTypeItemId - list type item id
        listTypeItemClass - list type item class
        viewId - viewId
        name - view name
        description - view description
        structure - XML document with the view structure
        background - Background image. If null, the previous will be removed, if 0-sized array, it will remain unchanged
        sessionId - Session token
        Throws:
        ServerSideException - If the list type item can not be found If the list type item class can not be found If the view type is not supported
      • getListTypeItemRelatedView

        public RemoteViewObject getListTypeItemRelatedView​(String listTypeItemId,
                                                           String listTypeItemClass,
                                                           long viewId,
                                                           String sessionId)
                                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets a view related to a list type item, given its id. An example of these views is a layout associated to a particular device model
        Specified by:
        getListTypeItemRelatedView in interface KuwaibaSoapWebService
        Parameters:
        listTypeItemId - list type item id
        listTypeItemClass - list type item class
        viewId - view id
        sessionId - Session token
        Returns:
        The associated view (there should be only one of each type). Null if there's none yet
        Throws:
        ServerSideException - If the list type item or the view can not be found. If the corresponding class metadata can not be found. If the provided view type is not supported.
      • getListTypeItemRelatedViews

        public RemoteViewObjectLight[] getListTypeItemRelatedViews​(String listTypeItemId,
                                                                   String listTypeItemClass,
                                                                   int limit,
                                                                   String sessionId)
                                                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets all the views related to a list type item. An example of these views is a layout associated to a particular device model
        Specified by:
        getListTypeItemRelatedViews in interface KuwaibaSoapWebService
        Parameters:
        listTypeItemId - list type item id
        listTypeItemClass - list type class name
        limit - max number of results
        sessionId - Session token
        Returns:
        The associated views
        Throws:
        ServerSideException - If the corresponding class metadata can not be found If the provided view type is not supported
      • deleteListTypeItemRelatedView

        public void deleteListTypeItemRelatedView​(String listTypeItemId,
                                                  String listTypeItemClass,
                                                  long viewId,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a view related to a list type item
        Specified by:
        deleteListTypeItemRelatedView in interface KuwaibaSoapWebService
        Parameters:
        listTypeItemId - list type item id
        listTypeItemClass - list type class name
        viewId - related view id
        sessionId - Session token
        Throws:
        ServerSideException - If the list type item class can not be found If the list type item can no be found using the id If the view can not be found
      • createObjectRelatedView

        public long createObjectRelatedView​(String objectId,
                                            String objectClass,
                                            String name,
                                            String description,
                                            String viewClassName,
                                            byte[] structure,
                                            byte[] background,
                                            String sessionId)
                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a view an relates it to an existing object
        Specified by:
        createObjectRelatedView in interface KuwaibaSoapWebService
        Parameters:
        objectId - Object id
        objectClass - Object class
        name - View name
        description - View description
        viewClassName - View class name
        structure - Structure (as an XML document)
        background - Background
        sessionId - Session id
        Returns:
        The id of the newly created view
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object can not be found If the object class can not be found If the view type is not supported
      • createGeneralView

        public long createGeneralView​(String viewClass,
                                      String name,
                                      String description,
                                      byte[] structure,
                                      byte[] background,
                                      String sessionId)
                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a general view (a view that is not associated to any object)
        Specified by:
        createGeneralView in interface KuwaibaSoapWebService
        Parameters:
        viewClass - View class
        name - View name
        description - Description
        structure - Structure
        background - background
        sessionId - Session id
        Returns:
        The id of the newly created view
        Throws:
        ServerSideException - If the user is not allowed to invoke the method InvalidArgumentException if the view type is invalid
      • updateObjectRelatedView

        public void updateObjectRelatedView​(String objectOid,
                                            String objectClass,
                                            long viewId,
                                            String viewName,
                                            String viewDescription,
                                            byte[] structure,
                                            byte[] background,
                                            String sessionId)
                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates an object view (a view that is linked to a particular object)
        Specified by:
        updateObjectRelatedView in interface KuwaibaSoapWebService
        Parameters:
        objectOid - Object id
        objectClass - Object class
        viewId - View id
        viewName - View name. Null to leave unchanged
        viewDescription - View description. Null to leave unchanged
        structure - View structure. Null to leave unchanged
        background - Background. Null to leave unchanged
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the view type is not supported
      • updateGeneralView

        public void updateGeneralView​(long viewId,
                                      String viewName,
                                      String viewDescription,
                                      byte[] structure,
                                      byte[] background,
                                      String sessionId)
                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a general view (a view that is not linked to any particular object)
        Specified by:
        updateGeneralView in interface KuwaibaSoapWebService
        Parameters:
        viewId - View id
        viewName - View name. Null to leave unchanged
        viewDescription - View Description. Null to leave unchanged
        structure - View structure. Null to leave unchanged
        background - Background. Null to leave unchanged
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the view type is invalid or if the background could not be saved. If the view couldn't be found
      • updateListTypeItem

        public void updateListTypeItem​(String className,
                                       String oid,
                                       List<StringPair> attributesToBeUpdated,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a list type item. Formerly this functionality was provided by updateObject, but the implementation was split in two methods.
        Specified by:
        updateListTypeItem in interface KuwaibaSoapWebService
        Parameters:
        className - The class of the LTI to be updated. it must be a subclass of GenericObjectList
        oid - The id of the LTI to be updated.
        attributesToBeUpdated - The attributes to be changed.
        sessionId - The session token.
        Throws:
        ServerSideException - If the LTI does not exist or if the class provided is not a subclass of GenericObjectList.
      • deleteListTypeItem

        public void deleteListTypeItem​(String className,
                                       String oid,
                                       boolean releaseRelationships,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a list type item
        Specified by:
        deleteListTypeItem in interface KuwaibaSoapWebService
        Parameters:
        className - list type item class name
        oid - list type item id
        releaseRelationships - should the deletion process release the relationships attached to this object
        sessionId - Session token
        Throws:
        ServerSideException - If the class provided is not a list type If the user can't delete a list type item
      • executeQuery

        public RemoteResultRecord[] executeQuery​(TransientQuery query,
                                                 String sessionId)
                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Executes a complex query generated using the Graphical Query Builder. Please note that the first record is reserved for the column headers, so and empty result set will have at least one record.
        Specified by:
        executeQuery in interface KuwaibaSoapWebService
        Parameters:
        query - The TransientQuery object (a code friendly version of the graphical query designed at client side).
        sessionId - session id to check permissions
        Returns:
        An array of records (the first raw is used to put the headers)
        Throws:
        ServerSideException - If the class to be search is cannot be found If the user is not allowed to invoke the method
      • createQuery

        public long createQuery​(String queryName,
                                long ownerOid,
                                byte[] queryStructure,
                                String description,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a query using the Graphical Query Builder
        Specified by:
        createQuery in interface KuwaibaSoapWebService
        Parameters:
        queryName - Query name
        ownerOid - OwnerOid. Null if public
        queryStructure - XML document as a byte array
        description - a short descriptions for the query
        sessionId - session id to check permissions
        Returns:
        a RemoteObjectLight wrapping the newly created query
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the owner could not be found.
      • saveQuery

        public void saveQuery​(long queryOid,
                              String queryName,
                              long ownerOid,
                              byte[] queryStructure,
                              String description,
                              String sessionId)
                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Save the query made in the graphical Query builder
        Specified by:
        saveQuery in interface KuwaibaSoapWebService
        Parameters:
        queryOid - query oid to be updated
        queryName - query name (the same if unchanged)
        ownerOid - owneroid (if unchanged)
        queryStructure - XML document if unchanged. Null otherwise
        description - Query description. Null if unchanged
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the query can not be found
      • getQueries

        public RemoteQueryLight[] getQueries​(boolean showPublic,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrieves all saved queries
        Specified by:
        getQueries in interface KuwaibaSoapWebService
        Parameters:
        showPublic - should this method return the public queries along with the private to this user?
        sessionId - Session token
        Returns:
        A list with the available queries
        Throws:
        ServerSideException - If the user is not allowed to invoke the method Generic exception encapsulating any possible error raised at runtime
      • getClassHierarchy

        public byte[] getClassHierarchy​(boolean showAll,
                                        String sessionId)
                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an XML document describing the class hierarchy
        Specified by:
        getClassHierarchy in interface KuwaibaSoapWebService
        Parameters:
        showAll - should this method return all entity classes or only InventoryObject subclasses
        sessionId - session identifier
        Returns:
        A byte array containing the class hierarchy as an XML document.
        Throws:
        ServerSideException - If one of the core classes could not be found
      • createRootPool

        public String createRootPool​(String name,
                                     String description,
                                     String instancesOfClass,
                                     int type,
                                     String sessionId)
                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a pool without a parent. They're used as general purpose place to put inventory objects, or as root for particular models
        Specified by:
        createRootPool in interface KuwaibaSoapWebService
        Parameters:
        name - Pool name
        description - Pool description
        instancesOfClass - What kind of objects can this pool contain?
        type - Type of pool. For possible values see ApplicationManager.POOL_TYPE_XXX
        sessionId - The session token
        Returns:
        The id of the new pool
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the log root node could not be found
      • createPoolInObject

        public String createPoolInObject​(String parentClassname,
                                         String parentId,
                                         String name,
                                         String description,
                                         String instancesOfClass,
                                         int type,
                                         String sessionId)
                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a pool that will have as parent an inventory object. This special containment structure can be used to provide support for new models
        Specified by:
        createPoolInObject in interface KuwaibaSoapWebService
        Parameters:
        parentClassname - Class name of the parent object
        parentId - Id of the parent object
        name - Pool name
        description - Pool descriptionCreates a pool that will have as parent an inventory object. This special containment structure can be used to provide support for new models
        instancesOfClass - What kind of objects can this pool contain?
        type - Type of pool. For possible values see ApplicationManager.POOL_TYPE_XXX
        sessionId - The session token
        Returns:
        The id of the new pool
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If instancesOfClass is not a valid subclass of InventoryObject If the parent object can not be found
      • createPoolInPool

        public String createPoolInPool​(String parentId,
                                       String name,
                                       String description,
                                       String instancesOfClass,
                                       int type,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a pool that will have as parent another pool. This special containment structure can be used to provide support for new models
        Specified by:
        createPoolInPool in interface KuwaibaSoapWebService
        Parameters:
        parentId - Id of the parent pool
        name - Pool name
        description - Pool description
        instancesOfClass - What kind of objects can this pool contain?
        type - Type of pool. Not used so far, but it will be in the future. It will probably be used to help organize the existing pools
        sessionId - The session token
        Returns:
        The id of the new pool
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If instancesOfClass is not a valid subclass of InventoryObject If the parent object can not be found
      • createPoolItem

        public String createPoolItem​(String poolId,
                                     String className,
                                     String[] attributeNames,
                                     String[] attributeValues,
                                     String templateId,
                                     String sessionId)
                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an object within a pool
        Specified by:
        createPoolItem in interface KuwaibaSoapWebService
        Parameters:
        poolId - Id of the pool under which the object will be created
        className - Class this object is going to be instance of
        attributeNames - Attributes to be set in the new object. Null or empty array for none
        attributeValues - Attributes to be set in the new object (values). Null for none. The size of this array must match attributeNames size
        templateId - Template to be used. Use -1 to not use any template
        sessionId - Session identifier
        Returns:
        The id of the newly created object
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If attributeNames and attributeValues have different sizes If the class name could not be found
      • deletePools

        public void deletePools​(String[] ids,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a set of pools
        Specified by:
        deletePools in interface KuwaibaSoapWebService
        Parameters:
        ids - Pools to be deleted
        sessionId - Session identifier
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the pools to be deleted couldn't be found If any of the objects in the pool can not be deleted because it's not a business related instance (it's more a security restriction)
      • getRootPools

        public List<RemotePool> getRootPools​(String className,
                                             int type,
                                             boolean includeSubclasses,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        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 KuwaibaSoapWebService
        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 - Session token
        Returns:
        A set of pools
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or in case something goes wrong
      • getPoolsInObject

        public List<RemotePool> getPoolsInObject​(String objectClassName,
                                                 String objectId,
                                                 String poolClass,
                                                 String sessionId)
                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrieves all the pools that are children of a particular object.
        Specified by:
        getPoolsInObject in interface KuwaibaSoapWebService
        Parameters:
        objectClassName - Object class.
        objectId - Object id.
        poolClass - Type of the pools that are to be retrieved (that is, the class of the objects contained within the pool)
        sessionId - Session id.
        Returns:
        A list of children pools.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or if the parent object can not be found or if the argument poolClass is not a valid class.
      • createTask

        public long createTask​(String name,
                               String description,
                               boolean enabled,
                               boolean commitOnExecute,
                               String script,
                               List<StringPair> parameters,
                               RemoteTaskScheduleDescriptor schedule,
                               RemoteTaskNotificationDescriptor notificationType,
                               String sessionId)
                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates and schedule a task. A task is an application entity that allows to run jobs that will be executed depending on certain schedule
        Specified by:
        createTask in interface KuwaibaSoapWebService
        Parameters:
        name - Task name
        description - Task description
        enabled - Is the task enabled?
        commitOnExecute - Should this task commit the changes (if any) after its execution? Handle with extreme care, you are basically running arbitrary code and affecting the db
        script - The script to be executed
        parameters - The parameters for the script
        schedule - When the task should be executed
        notificationType - How the result of the task should be notified to the associated users
        sessionId - The session token
        Returns:
        The id of the newly created task
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the task is disabled If something goes wrong
      • updateTaskProperties

        public void updateTaskProperties​(long taskId,
                                         String propertyName,
                                         String propertyValue,
                                         String sessionId)
                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates any of these properties from a task: name, description, enabled and script
        Specified by:
        updateTaskProperties in interface KuwaibaSoapWebService
        Parameters:
        taskId - Task id
        propertyName - Property name. Possible values: "name", "description", "enabled" and "script"
        propertyValue - The value of the property. For the property "enabled", the allowed values are "true" and "false"
        sessionId - The session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the task could not be found If the property name has an invalid value
      • updateTaskParameters

        public void updateTaskParameters​(long taskId,
                                         List<StringPair> parameters,
                                         String sessionId)
                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates the parameters of a task. If any of the values is null, that parameter will be deleted, if the parameter does not exist, it will be created
        Specified by:
        updateTaskParameters in interface KuwaibaSoapWebService
        Parameters:
        taskId - Task id
        parameters - The parameters to be modified as pairs paramName/paramValue. A null value means that that parameter should be deleted
        sessionId - The session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the task could not be found
      • subscribeUserToTask

        public void subscribeUserToTask​(long userId,
                                        long taskId,
                                        String sessionId)
                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Subscribes a user to a task, so it will be notified of the result of its execution
        Specified by:
        subscribeUserToTask in interface KuwaibaSoapWebService
        Parameters:
        userId - Id of the user
        taskId - Id of the task
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the user is already subscribed to the task
      • unsubscribeUserFromTask

        public void unsubscribeUserFromTask​(long userId,
                                            long taskId,
                                            String sessionId)
                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Unsubscribes a user from a task, so it will no longer be notified about the result of its execution
        Specified by:
        unsubscribeUserFromTask in interface KuwaibaSoapWebService
        Parameters:
        userId - Id of the user
        taskId - Id of the task
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the task or the user could not be found
      • createContact

        public String createContact​(String contactClass,
                                    List<StringPair> properties,
                                    String customerClassName,
                                    String customerId,
                                    String sessionId)
                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a contact
        Specified by:
        createContact in interface KuwaibaSoapWebService
        Parameters:
        contactClass - The class of the new contact. It must be a subclass of GenericContact
        properties - A dictionary (key-value list) with the set of string-type attributes to be set. No string-type attributes are not currently supported. Attribute name is mandatory.
        customerClassName - The class of the customer this contact will be associated to
        customerId - The id of the customer this contact will be associated to
        sessionId - The session token
        Returns:
        The id of the newly created contact
        Throws:
        ServerSideException - If the contact class provided is not a valid GenericCustomer, or if the customer does not exist or if any of the properties does not exist or its type is invalid (not a string)
      • updateContact

        public void updateContact​(String contactClass,
                                  String contactId,
                                  List<StringPair> properties,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a set of properties of a contact
        Specified by:
        updateContact in interface KuwaibaSoapWebService
        Parameters:
        contactClass - The class of the contact to be updated
        contactId - The id of the contact to be updated
        properties - A set of pairs key-value with the properties to be updated
        sessionId - The session token
        Throws:
        ServerSideException - If the contact could not be found or if any of the attributes to be set could not be found or has an invalid value
      • searchForContacts

        public List<RemoteContact> searchForContacts​(String searchString,
                                                     int maxResults,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Searches for contacts given a search string, This string will be searched in the attribute values of all contacts
        Specified by:
        searchForContacts in interface KuwaibaSoapWebService
        Parameters:
        searchString - The string to be searched. Use null or an empty string to retrieve all the contacts
        maxResults - Maximum number of results. Use -1 to retrieve all results at once
        sessionId - The session token
        Returns:
        The list of contacts for whom at least one of their attributes matches
        Throws:
        ServerSideException
      • createConfigurationVariable

        public long createConfigurationVariable​(String configVariablesPoolId,
                                                String name,
                                                String description,
                                                int type,
                                                boolean masked,
                                                String valueDefinition,
                                                String sessionId)
                                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a configuration variable inside a pool. A configuration variable is a place where a value will be stored so it can retrieved by whomever need it. These variables are typically used to store values that help other modules to work, such as URLs, user names, dimensions, etc
        Specified by:
        createConfigurationVariable in interface KuwaibaSoapWebService
        Parameters:
        configVariablesPoolId - The id of the pool where the config variable will be put
        name - The name of the pool. This value can not be null or empty. Duplicate variable names are not allowed
        description - The description of the what the variable does
        type - The type of the variable. Use 1 for number, 2 for strings, 3 for booleans, 4 for unidimensional arrays and 5 for matrixes.
        masked - If the value should be masked when rendered (for security reasons, for example)
        valueDefinition - In most cases (primitive types like numbers, strings or booleans) will be the actual value of the variable as a string (for example "5" or "admin" or "true"). For arrays and matrixes use the following notation:
        Arrays: (value1,value2,value3,valueN), matrix: [(row1col1, row1col2,... row1colN), (row2col1, row2col2,... row2colN), (rowNcol1, rowNcol2,... rowNcolN)]. The values will be interpreted as strings
        sessionId - The session token
        Returns:
        The id of the newly created variable
        Throws:
        ServerSideException - If the parent pool could not be found or if the name is empty, the type is invalid, the value definition is empty
      • updateConfigurationVariable

        public void updateConfigurationVariable​(String name,
                                                String propertyToUpdate,
                                                String newValue,
                                                String sessionId)
                                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates the value of a configuration variable. See ##createConfigurationVariable(long, java.lang.String, java.lang.String, int, boolean, java.lang.String, java.lang.String) for value definition syntax
        Specified by:
        updateConfigurationVariable in interface KuwaibaSoapWebService
        Parameters:
        name - The current name of the variable that will be modified
        propertyToUpdate - The name of the property to be updated. Possible values are: "name", "description", "type", "masked" and "value"
        newValue - The new value as string
        sessionId - The session token
        Throws:
        ServerSideException - If the property to be updated can not be recognized or if the config variable can not be found
      • updateConfigurationVariablesPool

        public void updateConfigurationVariablesPool​(String poolId,
                                                     String propertyToUpdate,
                                                     String value,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates an attribute of a given configuration variables pool.
        Specified by:
        updateConfigurationVariablesPool in interface KuwaibaSoapWebService
        Parameters:
        poolId - The id of the pool to update.
        propertyToUpdate - The property to update. The valid values are "name" and "description".
        value - The value of the property to be updated.
        sessionId - The session token.
        Throws:
        ServerSideException - If the pool could not be found or If the property provided is not valid.
      • createProxy

        public String createProxy​(String proxyPoolId,
                                  String proxyClass,
                                  List<StringPair> attributes,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an inventory proxy. Inventory proxies are used to integrate third party-applications with Kuwaiba. Sometimes these applications must refer to assets managed by Kuwaiba from another perspective (financial, for example). In these applications, multiple Kuwaiba inventory assets might be represented by a single entity (e.g. a router with slots, boards and ports might just be something like "standard network device"). Proxies are used to map multiple inventory elements into a single entity. It's a sort of "impedance matching" between systems that refer to the same real world object from different perspectives.
        Specified by:
        createProxy in interface KuwaibaSoapWebService
        Parameters:
        proxyPoolId - The parent pool id.
        proxyClass - The proxy class. Must be subclass of GenericProxy.
        attributes - The set of initial attributes. If no attribute name is specified, an empty string will be used.
        sessionId - Session token.
        Returns:
        The id of the newly created proxy.
        Throws:
        ServerSideException - If the parent pool could not be found or if any of the initial attributes could not be mapped or if the proxy class could not be found.
      • deleteProxy

        public void deleteProxy​(String proxyClass,
                                String proxyId,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a proxy and delete its association with the related inventory objects. These objects will remain untouched.
        Specified by:
        deleteProxy in interface KuwaibaSoapWebService
        Parameters:
        proxyClass - The class of the proxy.
        proxyId - The id of the proxy
        sessionId - Session token.
        Throws:
        ServerSideException - If the proxy could not be found or if the proxy class could not be found.
      • updateProxy

        public void updateProxy​(String proxyClass,
                                String proxyId,
                                List<StringPair> attributes,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates one or many proxy attributes.
        Specified by:
        updateProxy in interface KuwaibaSoapWebService
        Parameters:
        proxyClass - The class of the proxy.
        proxyId - The parent pool id,
        attributes - The set of initial attributes. If no attribute name is specified, an empty string will be used.
        sessionId - Session token.
        Throws:
        ServerSideException - If the parent pool could not be found or if any of the initial attributes could not be mapped or if the proxy class could not be found.
      • updateProxyPool

        public void updateProxyPool​(String proxyPoolId,
                                    String attributeName,
                                    String attributeValue,
                                    String sessionId)
                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates an attribute of a proxy pool.
        Specified by:
        updateProxyPool in interface KuwaibaSoapWebService
        Parameters:
        proxyPoolId - The id of the pool to be updated.
        attributeName - The name of the pool attribute to be updated. Valid values are "name" and "description"
        attributeValue - The value of the attribute. Null values will be ignored.
        sessionId - Session token.
        Throws:
        ServerSideException - If the pool could not be found or if an unknown attribute name is provided.
      • associateObjectToProxy

        public void associateObjectToProxy​(String objectClass,
                                           String objectId,
                                           String proxyClass,
                                           String proxyId,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates an inventory object to an inventory proxy.
        Specified by:
        associateObjectToProxy in interface KuwaibaSoapWebService
        Parameters:
        objectClass - The class of the object.
        objectId - The id of the object.
        proxyClass - The class of the proxy.
        proxyId - The id of the proxy.
        sessionId - Session token.
        Throws:
        ServerSideException - If the inventory object could not be found or if the proxy could not be found or if the two entities are already related.
      • releaseObjectFromProxy

        public void releaseObjectFromProxy​(String objectClass,
                                           String objectId,
                                           String proxyClass,
                                           String proxyId,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Releases an inventory previously related to an inventory proxy.
        Specified by:
        releaseObjectFromProxy in interface KuwaibaSoapWebService
        Parameters:
        objectClass - The class of the object.
        objectId - The id of the object.
        proxyClass - The class of the proxy.
        proxyId - The id of the proxy.
        sessionId - Session token.
        Throws:
        ServerSideException - If the inventory object could not be found or if the proxy could not be found.
      • createValidatorDefinition

        public long createValidatorDefinition​(String name,
                                              String description,
                                              String classToBeApplied,
                                              String script,
                                              boolean enabled,
                                              String sessionId)
                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a validator definition.
        Specified by:
        createValidatorDefinition in interface KuwaibaSoapWebService
        Parameters:
        name - The name of the validator. It's recommended to use camel case notation (for example thisIsAName). This field is mandatory
        description - The optional description of the validator
        classToBeApplied - The class or super class of the classes whose instances will be checked against this validator
        script - The groovy script containing the logic of the validator , that is, the
        enabled - If this validador should be applied or not
        sessionId - The session token
        Returns:
        The id of the newly created validator definition
        Throws:
        ServerSideException - If the name is null or empty or if the classToBeApplied argument could not be found
      • updateValidatorDefinition

        public void updateValidatorDefinition​(long validatorDefinitionId,
                                              String name,
                                              String description,
                                              String classToBeApplied,
                                              String script,
                                              Boolean enabled,
                                              String sessionId)
                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates the properties of a validator. The null values will be ignored
        Specified by:
        updateValidatorDefinition in interface KuwaibaSoapWebService
        Parameters:
        validatorDefinitionId - The id of teh validator definition to be updated
        name - The new name, if any, null otherwise
        description - The new description, if any, null otherwise
        classToBeApplied - The new class to be associated to this validator, if any, null otherwise
        script - The new script, if any, null otherwise
        enabled - If the validator should be enabled or not, if any, null otherwise
        sessionId - The session token
        Throws:
        ServerSideException - If the validator definition could not be found or if the classToBeApplied parameter is not valid or if the name is not null, but it is empty
      • getObjectChildrenForClassWithId

        public List<RemoteObjectLight> getObjectChildrenForClassWithId​(String oid,
                                                                       long objectClassId,
                                                                       int maxResults,
                                                                       String sessionId)
                                                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the children of a given object given his class id and object id
        Specified by:
        getObjectChildrenForClassWithId in interface KuwaibaSoapWebService
        Parameters:
        oid - object's id
        objectClassId - object's class id
        maxResults - Max number of children to be returned. O for all
        sessionId - Session token
        Returns:
        An array of all the direct children of the provided object according with the current container hierarchy
        Throws:
        ServerSideException - If the class could not be found
      • getObjectChildren

        public List<RemoteObjectLight> getObjectChildren​(String objectClassName,
                                                         String oid,
                                                         int maxResults,
                                                         String sessionId)
                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the children of a given object given his class name and object id
        Specified by:
        getObjectChildren in interface KuwaibaSoapWebService
        Parameters:
        objectClassName - object's class name
        oid - Object's oid
        maxResults - Max number of children to be returned. O for all
        sessionId - Session token
        Returns:
        An array of all the direct children of the provided object according with the current container hierarchy
        Throws:
        ServerSideException - If the class could not be found.
      • getChildrenOfClass

        public List<RemoteObject> getChildrenOfClass​(String parentOid,
                                                     String parentClass,
                                                     String childrenClass,
                                                     int page,
                                                     int maxResults,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets all children of an object of a given class
        Specified by:
        getChildrenOfClass in interface KuwaibaSoapWebService
        Parameters:
        parentOid - Parent whose children are requested
        parentClass - Class name of the element we want the children from
        childrenClass - The type of children we want to retrieve
        page - the number of elements to skip in the query
        maxResults - Max number of children to be returned. O for all
        sessionId - Session token
        Returns:
        An array with the children objects
        Throws:
        ServerSideException - If any of the classes can not be found If parent object can not be found If the database objects can not be correctly mapped into serializable Java objects.
      • getChildrenOfClassLightRecursive

        public List<RemoteObjectLight> getChildrenOfClassLightRecursive​(String parentOid,
                                                                        String parentClass,
                                                                        String childrenClass,
                                                                        int maxResults,
                                                                        String sessionId)
                                                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets recursively all children of an object of a given class
        Specified by:
        getChildrenOfClassLightRecursive in interface KuwaibaSoapWebService
        Parameters:
        parentOid - Parent whose children are requested
        parentClass - Class name of the element we want the children from
        childrenClass - The type of children we want to retrieve
        maxResults - Max number of children to be returned. O for all
        sessionId - Session token
        Returns:
        An array with the children objects
        Throws:
        ServerSideException - If any of the classes can not be found If parent object can not be found If the database objects can not be correctly mapped into serializable Java objects.
      • getSpecialChildrenOfClassLight

        public List<RemoteObjectLight> getSpecialChildrenOfClassLight​(String parentOid,
                                                                      String parentClass,
                                                                      String classToFilter,
                                                                      int maxResults,
                                                                      String sessionId)
                                                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Returns the special children of a given object as RemoteObjectLight instances. This method is not recursive.
        Specified by:
        getSpecialChildrenOfClassLight in interface KuwaibaSoapWebService
        Parameters:
        parentOid - The id of the parent object.
        parentClass - The class name of the parent object.
        classToFilter - 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.
        Returns:
        The list of special children of the given object, filtered using classToFilter.
        Throws:
        ServerSideException - If the parent class name provided could not be found or if the parent object could not be found.
      • getSpecialChildrenOfClassLightRecursive

        public List<RemoteObjectLight> getSpecialChildrenOfClassLightRecursive​(String parentOid,
                                                                               String parentClass,
                                                                               String classToFilter,
                                                                               int maxResults,
                                                                               String sessionId)
                                                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Returns the special children of a given object as RemoteObjectLight instances in a recursive fashion.
        Specified by:
        getSpecialChildrenOfClassLightRecursive in interface KuwaibaSoapWebService
        Parameters:
        parentOid - The id of the parent object.
        parentClass - The class name of the parent object.
        classToFilter - 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.
        Returns:
        The recursive list of special children of the given object, filtered using classToFilter.
        Throws:
        ServerSideException - If the parent class name provided could not be found or if the parent object could not be found.
      • getObject

        public RemoteObject getObject​(String objectClass,
                                      String oid,
                                      String sessionId)
                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the complete information about a given object (all its attributes)
        Specified by:
        getObject in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        oid - Object id
        sessionId - Session token
        Returns:
        a representation of the entity as a RemoteObject. The list of attribute values is a hashmap of strings (should be mapped to actual types by the consumer of the service). Single list types are represented by the id of the list type item (a numeric value), while multiple list types are strings wit the ids of the related list type items separated by semicolons (e.g. 123;786576;92332)
        Throws:
        ServerSideException - If the className class could not be found If the requested object could not be found If the object id could not be found
      • getObjectsWithFilterLight

        public List<RemoteObjectLight> getObjectsWithFilterLight​(String className,
                                                                 String filterName,
                                                                 String filterValue,
                                                                 String sessionId)
                                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        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 KuwaibaSoapWebService
        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
        filterValue - The value to be use to match the instances. Example "Serial-12345"
        sessionId - The session token
        Returns:
        The list of instances that matches the filterName/filterValue criteria
        Throws:
        ServerSideException - if the class provided could not be found
      • getCommonParent

        public RemoteObjectLight getCommonParent​(String aObjectClass,
                                                 String aOid,
                                                 String bObjectClass,
                                                 String bOid,
                                                 String sessionId)
                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the common parent between an a object and b object
        Specified by:
        getCommonParent in interface KuwaibaSoapWebService
        Parameters:
        aObjectClass - Object a class name
        aOid - Object a id
        bObjectClass - Object b class name
        bOid - Object a id
        sessionId - Session Id token
        Returns:
        The common parent
        Throws:
        ServerSideException - If the requested object can't be found If any of the class nodes involved is malformed If the database object could not be properly mapped into a serializable java object.
      • getParent

        public RemoteObjectLight getParent​(String objectClass,
                                           String oid,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the parent of a given object in the standard and special containment hierarchy
        Specified by:
        getParent in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class of child
        oid - Object id for the child
        sessionId - Session id
        Returns:
        The parent object
        Throws:
        ServerSideException - If the requested object can't be found If any of the class nodes involved is malformed If the database object could not be properly mapped into a serializable java object.
      • getParentsUntilFirstOfClass

        public List<RemoteObjectLight> getParentsUntilFirstOfClass​(String objectClass,
                                                                   String oid,
                                                                   String objectToMatchClassName,
                                                                   String sessionId)
                                                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        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 KuwaibaSoapWebService
        Parameters:
        objectClass - Class of the object to get the parents from
        oid - Id of the object to get the parents 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 - Session token
        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
        Throws:
        ServerSideException - If the object to evaluate can not be found or if any of the classes provided could not be found.
      • getFirstParentOfClass

        public RemoteObjectLight getFirstParentOfClass​(String objectClass,
                                                       String oid,
                                                       String objectToMatchClassName,
                                                       String sessionId)
                                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        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 KuwaibaSoapWebService
        Parameters:
        objectClass - Class of the object to get the parent from
        oid - 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 id token
        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
        Throws:
        ServerSideException - If the object to evaluate can not be found If any of the classes provided could not be found If the object provided is not in the standard containment hierarchy
      • getSpecialAttribute

        public List<RemoteObjectLight> getSpecialAttribute​(String objectClass,
                                                           String oid,
                                                           String attributeName,
                                                           String sessionId)
                                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the value of a special attribute, this is, those related to a model, such as cables connected to ports
        Specified by:
        getSpecialAttribute in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object's class
        oid - object oid
        attributeName - attribute's name
        sessionId - Session token
        Returns:
        A list of the values related to the given object through attributeName. Note that this is a string array on purpose, so the values used not necessarily are not longs
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • getObjectSpecialChildren

        public List<RemoteObjectLight> getObjectSpecialChildren​(String objectClass,
                                                                String objectId,
                                                                String sessionId)
                                                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the special children of a given object. This relationship depends on the model. The relationship between a container and the links in the physical layer model is an example of this kind of relationships.
        Specified by:
        getObjectSpecialChildren in interface KuwaibaSoapWebService
        Parameters:
        objectClass - The class of the object to be searched.
        objectId - The id of the object to be searched.
        sessionId - Session token.
        Returns:
        A list of special children.
        Throws:
        ServerSideException - If the class could not be found If the object could not be found
      • updateObject

        public void updateObject​(String className,
                                 String oid,
                                 List<StringPair> attributesToBeUpdated,
                                 String sessionId)
                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates attributes of a given object
        Specified by:
        updateObject in interface KuwaibaSoapWebService
        Parameters:
        className - object's class name
        oid - Object id
        attributesToBeUpdated - A dictionary with pairs key-value, being key, the attribute name, and value, the serialized version of the attribute value. Single list types are represented by the id of the list type item (a numeric value), while multiple list types are strings wit the ids of the related list type items separated by semicolons (e.g. 123;786576;92332)
        sessionId - Session token
        Throws:
        ServerSideException - If the object class can't be found If the object can't be found If the update can't be performed due a business rule or because the object is blocked If any of the names provided does not exist or can't be set using this method or of the value of any of the attributes can not be mapped correctly.
      • createObject

        public String createObject​(String className,
                                   String parentObjectClassName,
                                   String parentOid,
                                   String[] attributeNames,
                                   String[] attributeValues,
                                   String templateId,
                                   String sessionId)
                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a business object
        Specified by:
        createObject in interface KuwaibaSoapWebService
        Parameters:
        className - New object class name
        parentObjectClassName - New object parent's class name
        parentOid - New object parent's id
        attributeNames - Names of the attributes to be set at creation time
        attributeValues - Values for those attributes
        templateId - Template id. Use -1 to not use any template
        sessionId - Session token
        Returns:
        the id of the new object
        Throws:
        ServerSideException - If the object's class can't be found If the parent id is not found If there's a business constraint that doesn't allow to create the object. If any of the attribute values has an invalid value or format. If the specified template could not be found
      • createSpecialObject

        public String createSpecialObject​(String className,
                                          String parentObjectClassName,
                                          String parentOid,
                                          String[] attributeNames,
                                          String[] attributeValues,
                                          String templateId,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a special business object. It's a generic method to create objects proper to special models. Parent object won't be linked to the new object through a conventional containment relationship
        Specified by:
        createSpecialObject in interface KuwaibaSoapWebService
        Parameters:
        className - New object class name
        parentObjectClassName - New object parent's class name
        parentOid - New object parent's id
        attributeNames - Names of the attributes to be set at creation time
        attributeValues - Values for those attributes
        templateId - Template id. Use -1 to not use any template
        sessionId - Session token
        Returns:
        the id of the new object
        Throws:
        ServerSideException - If the object's class can't be found If the parent id is not found If the update can't be performed due to a format issue If any of the attribute values has an invalid value or format. If the specified template could not be found.
      • deleteObject

        public void deleteObject​(String className,
                                 String oid,
                                 boolean releaseRelationships,
                                 String sessionId)
                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a set of objects. Note that this method must be used only for business objects (not metadata or application ones)
        Specified by:
        deleteObject in interface KuwaibaSoapWebService
        Parameters:
        className - Objects class names
        oid - object id from the objects to be deleted
        releaseRelationships - Should the deletion be forced, deleting all the relationships?
        sessionId - Session token
        Throws:
        ServerSideException - If the object couldn't be found If the class could not be found If the object could not be deleted because there's some business rules that avoids it or it has incoming relationships.
      • deleteObjects

        public void deleteObjects​(String[] classNames,
                                  String[] oids,
                                  boolean releaseRelationships,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a set of objects. Note that this method must be used only for business objects (not metadata or application ones)
        Specified by:
        deleteObjects in interface KuwaibaSoapWebService
        Parameters:
        classNames - Objects class names
        oids - object id from the objects to be deleted
        releaseRelationships - Should the deletion be forced, deleting all the relationships?
        sessionId - Session token
        Throws:
        ServerSideException - If the requested object can't be found If the requested object class can't be found If the update can't be performed due a business rule or because the object is blocked or it has relationships and releaseRelationships is false If it was not possible to release the possible unique attributes
      • moveObjectsToPool

        public void moveObjectsToPool​(String targetClass,
                                      String targetOid,
                                      String[] objectClasses,
                                      String[] objectOids,
                                      String sessionId)
                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Moves objects from their current parent to a pool target object.
        Specified by:
        moveObjectsToPool in interface KuwaibaSoapWebService
        Parameters:
        targetClass - New parent object id
        targetOid - The new parent's oid
        objectClasses - Class names of the objects to be moved
        objectOids - Oids of the objects to be moved
        sessionId - Session token
        Throws:
        ServerSideException - If the object's or new parent's class can't be found If the object or its new parent can't be found If the update can't be performed due to a business rule
      • moveObjects

        public void moveObjects​(String targetClass,
                                String targetOid,
                                String[] objectClasses,
                                String[] objectOids,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Moves objects from their current parent to a target object.
        Specified by:
        moveObjects in interface KuwaibaSoapWebService
        Parameters:
        targetClass - New parent object id
        targetOid - The new parent's oid
        objectClasses - Class names of the objects to be moved
        objectOids - Oids of the objects to be moved
        sessionId - Session token
        Throws:
        ServerSideException - If the object's or new parent's class can't be found If the object or its new parent can't be found If the update can't be performed due to a business rule
      • moveSpecialObjects

        public void moveSpecialObjects​(String targetClass,
                                       String targetOid,
                                       String[] objectClasses,
                                       String[] objectOids,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Moves special objects from their current parent to a target object.
        Specified by:
        moveSpecialObjects in interface KuwaibaSoapWebService
        Parameters:
        targetClass - New parent object id
        targetOid - The new parent's oid
        objectClasses - Class names of the objects to be moved
        objectOids - Oids of the objects to be moved
        sessionId - Session token
        Throws:
        ServerSideException - If the object's or new parent's class can't be found If the object or its new parent can't be found If the update can't be performed due to a business rule
      • movePoolItemToPool

        public void movePoolItemToPool​(String poolId,
                                       String poolItemClassName,
                                       String poolItemId,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Move a pool item from a pool to another pool
        Specified by:
        movePoolItemToPool in interface KuwaibaSoapWebService
        Parameters:
        poolId - The id of the pool node
        poolItemClassName - The class name for the pool item
        poolItemId - The id for the pool item
        sessionId - Session token
        Throws:
        ServerSideException - If the pool node can not be found If the pool item can not be move to the selected pool If the pool item can not be found If the pool item class name can no be found
      • copyObjects

        public String[] copyObjects​(String targetClass,
                                    String targetOid,
                                    String[] objectClasses,
                                    String[] objectOids,
                                    boolean recursive,
                                    String sessionId)
                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Copy objects from its current parent to a target. This is not a deep copy. Only the selected object will be copied, not the children
        Specified by:
        copyObjects in interface KuwaibaSoapWebService
        Parameters:
        targetClass - The new parent class name
        targetOid - The new parent oid
        objectClasses - Class names of the objects to be copied
        objectOids - Oids of the objects to be copied
        recursive - should the objects be copied recursively? (themselves plus their children)
        sessionId - Session token
        Returns:
        An array with the ids of the new objects
        Throws:
        ServerSideException - If any of the provided classes couldn't be found If any of the template objects couldn't be found If the target parent can't contain any of the new instances
      • copySpecialObjects

        public String[] copySpecialObjects​(String targetClass,
                                           String targetOid,
                                           String[] objectClasses,
                                           String[] objectOids,
                                           boolean recursive,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Copy special objects from its current parent to a target. This is not a deep copy. Only the selected object will be copied, not the children
        Specified by:
        copySpecialObjects in interface KuwaibaSoapWebService
        Parameters:
        targetClass - The new parent class name
        targetOid - The new parent oid
        objectClasses - Class names of the objects to be copied
        objectOids - Oids of the objects to be copied
        recursive - should the objects be copied recursively? (themselves plus their children)
        sessionId - Session token
        Returns:
        An array with the ids of the new objects
        Throws:
        ServerSideException - If any of the provided classes couldn't be found If any of the template objects couldn't be found If the target parent can't contain any of the new instances
      • copyPoolItemToPool

        public void copyPoolItemToPool​(String poolId,
                                       String poolItemClassName,
                                       String poolItemId,
                                       boolean recursive,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Copy a pool item from a pool to another pool
        Specified by:
        copyPoolItemToPool in interface KuwaibaSoapWebService
        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 - Session token
        Throws:
        ServerSideException - If the pool node can not be found If the pool item can not be move to the selected pool If the pool item can not be found If the pool item class name can no be found
      • createBulkObjects

        public String[] createBulkObjects​(String className,
                                          String parentClassName,
                                          String parentOid,
                                          String namePattern,
                                          String templateId,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates multiple objects using a given name pattern
        Specified by:
        createBulkObjects in interface KuwaibaSoapWebService
        Parameters:
        className - The class name for the new objects
        parentClassName - The parent class name for the new objects
        parentOid - The object id of the parent
        namePattern - A pattern to create the names for the new objects
        templateId - the id template to create the object, it can be null if not a template is going to be used
        sessionId - Session id token
        Returns:
        A list of ids for the new objects
        Throws:
        ServerSideException - If the className or the parentClassName can not be found. If the className is not a possible children of parentClassName. If the className is not in design or are abstract. If the className is not an InventoryObject. If the parent node can not be found. If the given name pattern not match with the regular expression to build the new object name.
      • createBulkSpecialObjects

        public String[] createBulkSpecialObjects​(String className,
                                                 String parentClassName,
                                                 String parentId,
                                                 int numberOfSpecialObjects,
                                                 String namePattern,
                                                 String sessionId)
                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates multiple special objects using a given naming pattern
        Specified by:
        createBulkSpecialObjects in interface KuwaibaSoapWebService
        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
        numberOfSpecialObjects - Number of special objects to be created
        namePattern - A pattern to create the names for the new special objects
        sessionId - Session id token
        Returns:
        A list of ids for the new special objects
        Throws:
        ServerSideException - If the className or the parentClassName can not be found. If the parent node can not be found. If the given name pattern not match with the regular expression to build the new object name. If the className is not a possible special children of parentClassName. If the className is not in design or are abstract. If the className is not an InventoryObject.
      • connectMirrorPort

        public void connectMirrorPort​(String[] aObjectClass,
                                      String[] aObjectId,
                                      String[] bObjectClass,
                                      String[] bObjectId,
                                      String sessionId)
                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Connect two ports using a mirror relationship
        Specified by:
        connectMirrorPort in interface KuwaibaSoapWebService
        Parameters:
        aObjectClass - Port A class
        aObjectId - Port A id
        bObjectClass - Port B class
        bObjectId - Port B id
        sessionId - Session token
        Throws:
        ServerSideException - If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found
      • createPhysicalConnection

        public String createPhysicalConnection​(String aObjectClass,
                                               String aObjectId,
                                               String bObjectClass,
                                               String bObjectId,
                                               String name,
                                               String connectionClass,
                                               String templateId,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a physical connection (a container or a link). The validations are made at server side (this is, if the connection can be established between the two endpoints, if they're not already connected, etc)
        Specified by:
        createPhysicalConnection in interface KuwaibaSoapWebService
        Parameters:
        aObjectClass - "a" endpoint object class
        aObjectId - "a" endpoint object id
        bObjectClass - "b" endpoint object class
        bObjectId - "b" endpoint object id
        name - COnnection name. Leave empty if you want to use the one in the template
        connectionClass - Class used to create the connection. See Constants class for supported values
        templateId - Id of the template for class connectionClass. Use -1 if you want to create a connection without template
        sessionId - Session token
        Returns:
        The new connection id
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object's class can't be found If the parent id is not found If the update can't be performed due to a format issue If any of the attribute values has an invalid value or format. If the specified template could not be found. If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found
      • createPhysicalConnections

        public String[] createPhysicalConnections​(String[] aObjectClasses,
                                                  String[] aObjectIds,
                                                  String[] bObjectClasses,
                                                  String[] bObjectIds,
                                                  String name,
                                                  String connectionClass,
                                                  String templateId,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a physical connection (a container or a link). The validations are made at server side (this is, if the connection can be established between the two endpoints, if they're not already connected, etc)
        Specified by:
        createPhysicalConnections in interface KuwaibaSoapWebService
        Parameters:
        aObjectClasses - "a" endpoints object class
        aObjectIds - "a" endpoints object id
        bObjectClasses - "b" endpoints object class
        bObjectIds - "b" endpoints object id
        name - COnnection name. Leave empty if you want to use the one in the template
        connectionClass - Class used to create the connection. See Constants class for supported values
        templateId - Id of the template for class connectionClass. Use -1 if you want to create a connection without template
        sessionId - Session token
        Returns:
        The new connection id
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object's class can't be found If the parent id is not found If the update can't be performed due to a format issue If any of the attribute values has an invalid value or format. If the specified template could not be found. If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found
      • getPhysicalConnectionEndpoints

        public RemoteObjectLight[] getPhysicalConnectionEndpoints​(String connectionClass,
                                                                  String connectionId,
                                                                  String sessionId)
                                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Returns the endpoints of a physical connection
        Specified by:
        getPhysicalConnectionEndpoints in interface KuwaibaSoapWebService
        Parameters:
        connectionClass - Connection class
        connectionId - Connection id
        sessionId - Session token
        Returns:
        An array of two positions: the first is the A endpoint and the second is the B endpoint
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object can not be found If either the object class or the attribute can not be found
      • getLogicalLinkDetails

        public RemoteLogicalConnectionDetails getLogicalLinkDetails​(String linkClass,
                                                                    String linkId,
                                                                    String sessionId)
                                                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Returns the structure of a logical connection. The current implementation is quite simple and the return object simply provides the endpoints and the next ports connected to such endpoints using a physical connection
        Specified by:
        getLogicalLinkDetails in interface KuwaibaSoapWebService
        Parameters:
        linkClass - The class of the connection to be evaluated
        linkId - The id of the connection to be evaluated
        sessionId - Session token
        Returns:
        An object with the details of the connection and the physical resources associated to it
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the provided connection could not be found
      • validateSavedE2EView

        public RemoteViewObject validateSavedE2EView​(List<String> linkClasses,
                                                     List<String> linkIds,
                                                     RemoteViewObject savedView,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Validates a saved structure of a end to end view. The current implementation provides the endpoints and the next ports connected to such endpoints using a physical connection also adds continuity if a VLAN or a BridgeDomain is found
        Specified by:
        validateSavedE2EView in interface KuwaibaSoapWebService
        Parameters:
        linkClasses - The class of the connection to be evaluated
        linkIds - The id of the connection to be evaluated
        savedView - a given saved view to validate
        sessionId - Session token
        Returns:
        An object with the details of the connection and the physical resources associated to it
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the provided connection could not be found
      • getE2View

        public RemoteViewObject getE2View​(List<String> linkClasses,
                                          List<String> linkIds,
                                          boolean includeVlans,
                                          boolean includeBDIs,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Returns the structure of a logical connection. The current implementation is quite simple and the return object simply provides the endpoints and the next ports connected to such endpoints using a physical connection
        Specified by:
        getE2View in interface KuwaibaSoapWebService
        Parameters:
        linkClasses - The class of the connection to be evaluated
        linkIds - The id of the connection to be evaluated
        includeVlans - true to include the bridge domains continuity
        includeBDIs - true to include the bridge domains continuity
        sessionId - Session token
        Returns:
        An object with the details of the connection and the physical resources associated to it
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the provided connection could not be found
      • getContainersBetweenObjects

        public List<RemoteObjectLight> getContainersBetweenObjects​(String objectAClass,
                                                                   String objectAId,
                                                                   String objectBClass,
                                                                   String objectBId,
                                                                   String containerClass,
                                                                   String sessionId)
                                                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrieves the existing containers between two given nodes.
        Specified by:
        getContainersBetweenObjects in interface KuwaibaSoapWebService
        Parameters:
        objectAClass - The class of the object A.
        objectAId - The id of the object A.
        objectBClass - The class of the object B. (end point B class)
        objectBId - The id of the object B (end point B id).
        containerClass - The class of the containers to be return.
        sessionId - Session token
        Returns:
        A list with the common wire containers between the two objects
        Throws:
        ServerSideException - if an objects doesn't exist or if a given class doesn't exist
      • getPhysicalConnectionsInObject

        public List<RemoteObjectLightList> getPhysicalConnectionsInObject​(String objectClass,
                                                                          String objectId,
                                                                          String sessionId)
                                                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Loops through all instances of GenericCommunicationsPort at any level inside the given object and gets the physical path. Only the ports with connections (physicalPath.size > 1) are returned
        Specified by:
        getPhysicalConnectionsInObject in interface KuwaibaSoapWebService
        Parameters:
        objectClass - The class of the object.
        objectId - The id of the object.
        sessionId - Session token
        Returns:
        A list of physical paths from all the ports with connections inside the given object. See getPhysicalPath for details about the structure of each entry
        Throws:
        ServerSideException - In the same cases as getChildrenOfClassLightRecursive and getPhysicalPath
      • getPhysicalPath

        public List<RemoteObjectLight> getPhysicalPath​(String objectClass,
                                                       String objectId,
                                                       String sessionId)
                                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the physical trace of connections and ports from a given port.
        Specified by:
        getPhysicalPath in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        objectId - Object id
        sessionId - Session token
        Returns:
        An array containing the sorted elements in the physical path of the given port. The first element is the port from which the trace is generated, while the last is the destination port until which there is physical continuity. If the source port does not have any connection, the physical path will have only one element (that port).
        Throws:
        ServerSideException - If the user is not allowed to invoke the method
      • getPhysicalTree

        public RemoteObjectRelatedObjects getPhysicalTree​(String objectClass,
                                                          String objectId,
                                                          String sessionId)
                                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the tree representation of all physical paths.
        Specified by:
        getPhysicalTree in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Port object class
        objectId - Port object id
        sessionId - Session token
        Returns:
        A tree representation of all physical paths.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the objects involved in the path cannot be found If any of the object classes involved in the path cannot be found If any of the objects involved in the path has a malformed list type attribute If any of the objects involved in the path has an invalid objectId or className
      • connectPhysicalLinks

        public void connectPhysicalLinks​(String[] sideAClassNames,
                                         String[] sideAIds,
                                         String[] linksClassNames,
                                         String[] linksIds,
                                         String[] sideBClassNames,
                                         String[] sideBIds,
                                         String sessionId)
                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Connects pairs of ports (if they are not connected already) using physical link
        Specified by:
        connectPhysicalLinks in interface KuwaibaSoapWebService
        Parameters:
        sideAClassNames - The list of classes of one of the sides of the connection
        sideAIds - The list of ids the objects on one side of the connection
        linksClassNames - the classes of the links that will connect the two sides
        linksIds - The ids of these links
        sideBClassNames - The list of classes of the other side of the connection
        sideBIds - The list of ids the objects on the other side of the connection
        sessionId - Session token
        Throws:
        ServerSideException - If the object can not be found If either the object class or the attribute can not be found If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found If the object activity log could no be found
      • connectPhysicalContainers

        public void connectPhysicalContainers​(String[] sideAClassNames,
                                              String[] sideAIds,
                                              String[] containersClassNames,
                                              String[] containersIds,
                                              String[] sideBClassNames,
                                              String[] sideBIds,
                                              String sessionId)
                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Connects pairs of elements (of any class except subclasses of GenericPort) using containers (subclasses of GenericPhysicalContainer)
        Specified by:
        connectPhysicalContainers in interface KuwaibaSoapWebService
        Parameters:
        sideAClassNames - The list of classes of one of the sides of the connection
        sideAIds - The list of ids the objects on one side of the connection
        containersClassNames - the classes of the containers that will connect the two sides
        containersIds - The ids of these containers
        sideBClassNames - The list of classes of the other side of the connection
        sideBIds - The list of ids the objects on the other side of the connection
        sessionId - Session token
        Throws:
        ServerSideException - If any of the provided objects can not be found, if the endpoints are already connected, or if one of the endpoints is a port
      • disconnectPhysicalConnection

        public void disconnectPhysicalConnection​(String connectionClass,
                                                 String connectionId,
                                                 int sideToDisconnect,
                                                 String sessionId)
                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Disconnects a side or both sides of a physical connection (a link or a container)
        Specified by:
        disconnectPhysicalConnection in interface KuwaibaSoapWebService
        Parameters:
        connectionClass - Class of the connection to be edited
        connectionId - Id of the connection to be edited
        sideToDisconnect - Side to disconnect. Use 1 to disconnect only the side a, 2 to disconnect only side b and 3 to disconnect both sides at once
        sessionId - Session token
        Throws:
        ServerSideException - If the object can not be found If either the object class or the attribute can not be found If the class provided does not exist If any of the relationships is now allowed according to the defined data model If the object activity log could no be found
      • reconnectPhysicalConnection

        public void reconnectPhysicalConnection​(String connectionClass,
                                                String connectionId,
                                                String newASideClass,
                                                String newASideId,
                                                String newBSideClass,
                                                String newBSideId,
                                                String sessionId)
                                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Changes one or both sides (endpoints) of a physical connection (link or container). Use this method carefully in containers, as it does not check if the endpoints of the links inside the container that was reconnected are consistent with its new endpoints. Also note that when used in physical links, the link will NOT be moved (as in the special containment hierarchy) to the nearest common parent of both endpoints. This method can not be used to disconnect connections, to do that use #disconnectPhysicalConnection(java.lang.String, long, int, java.lang.String).
        Specified by:
        reconnectPhysicalConnection in interface KuwaibaSoapWebService
        Parameters:
        connectionClass - The class of the connection to be modified
        connectionId - The id of the connection to be modified
        newASideClass - The class of the new side A of the connection. Use null if this side is not to be changed.
        newASideId - The id of the new side A of the connection. Use -1 if this side is not to be changed.
        newBSideClass - The class of the new side B of the connection. Use null if this side is not to be changed.
        newBSideId - The id of the new side B of the connection. Use -1 if this side is not to be changed.
        sessionId - The session token
        Throws:
        ServerSideException - If any of the objects provided could not be found or if the new endpoint is not a port (if reconnecting a link) or if it is a port (if reconnecting a container)
      • deletePhysicalConnection

        public void deletePhysicalConnection​(String objectClass,
                                             String objectId,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a physical connection
        Specified by:
        deletePhysicalConnection in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        objectId - Object id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object couldn't be found If the class could not be found If the object could not be deleted because there's some business rules that avoids it or it has incoming relationships. If the log root node could not be found
      • associateObjectToService

        public void associateObjectToService​(String objectClass,
                                             String objectId,
                                             String serviceClass,
                                             String serviceId,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates an object (a resource) to an existing service
        Specified by:
        associateObjectToService in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        objectId - Object id
        serviceClass - service class
        serviceId - service id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found
      • associateObjectsToService

        public void associateObjectsToService​(String[] objectClass,
                                              String[] objectId,
                                              String serviceClass,
                                              String serviceId,
                                              String sessionId)
                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates a list of objects (resources) to an existing service
        Specified by:
        associateObjectsToService in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        objectId - Object id
        serviceClass - service class
        serviceId - service id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found
      • releaseObjectFromService

        public void releaseObjectFromService​(String serviceClass,
                                             String serviceId,
                                             String targetId,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Releases an object from a service that is using it
        Specified by:
        releaseObjectFromService in interface KuwaibaSoapWebService
        Parameters:
        serviceClass - Service class
        serviceId - Service id
        targetId - target object id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object can not be found If the class can not be found If the object activity log could no be found
      • attachFileToObject

        public long attachFileToObject​(String name,
                                       String tags,
                                       byte[] file,
                                       String className,
                                       String objectId,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Attaches a file to an inventory object
        Specified by:
        attachFileToObject in interface KuwaibaSoapWebService
        Parameters:
        name - The name of the file. It's more like its title, instead of the file name
        tags - A semicolon (";") separated string with the tags associated to this document. These tags can be used to help find documents in a search
        file - The actual file
        className - The class name of the inventory object the file will be attached to
        objectId - The id of the inventory object the file will be attached to
        sessionId - Session token
        Returns:
        The id of the file object that was created
        Throws:
        ServerSideException - If the file can not be saved or if there's already a file with that name related to the object or if the file exceeds the max size configured
      • detachFileFromObject

        public void detachFileFromObject​(long fileObjectId,
                                         String className,
                                         String objectId,
                                         String sessionId)
                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Detaches a file from an inventory object. Note that the file will also be deleted.
        Specified by:
        detachFileFromObject in interface KuwaibaSoapWebService
        Parameters:
        fileObjectId - The id of the file object
        className - The class of the object the file will be detached from
        objectId - The id of the object the file will be detached from
        sessionId - The session token
        Throws:
        ServerSideException - If the object or its class could not be found, or if the file object could not be found or if there was a problem physically deleting the file from disk
      • getFile

        public RemoteFileObject getFile​(long fileObjectId,
                                        String className,
                                        String objectId,
                                        String sessionId)
                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrieves a particular file from those attached to an inventory object. The returned object contains the contents of the file
        Specified by:
        getFile in interface KuwaibaSoapWebService
        Parameters:
        fileObjectId - The id of the file object
        className - The class of the object the file will be detached from
        objectId - The id of the object the file will be detached from
        sessionId - The session token
        Returns:
        The object file encapsulating the contents of the file.
        Throws:
        ServerSideException - If the object or its class could not be found, or if the file object could not be found or if there was a problem physically deleting the file from disk
      • updateFileProperties

        public void updateFileProperties​(long fileObjectId,
                                         List<StringPair> properties,
                                         String className,
                                         String objectId,
                                         String sessionId)
                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates the properties of a file object (name or tags)
        Specified by:
        updateFileProperties in interface KuwaibaSoapWebService
        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
        Throws:
        ServerSideException - If the object file is attached to could not be found or if the file object could not be found or if any of the properties has an invalid name or if the file name is empty or if the class of the object file is attached to could not be found
      • createClass

        public long createClass​(String className,
                                String displayName,
                                String description,
                                boolean isAbstract,
                                boolean isCustom,
                                boolean isCountable,
                                boolean isInDesign,
                                String parentClassName,
                                byte[] icon,
                                byte[] smallIcon,
                                int color,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a class metadata object. This method is still under testing and might be buggy
        Specified by:
        createClass in interface KuwaibaSoapWebService
        Parameters:
        className - Class name
        displayName - Class display name
        description - Class description
        isAbstract - is this class abstract?
        isCustom - Is this class part of the core of the application (can not be deleted) or if it's an extension to the default data model. In most cases, this should be "true".
        isCountable - NOt used so far. It's intended to be used to mark the classes that are created to make consistent the model, but that are not actual inventory elements, such as Slots
        isInDesign - Says if a class can be instantiated or not. This is useful if you are creating many classes and want to avoid the users to create objects from those classes until you have finished the data model roll-out.
        parentClassName - Parent class name
        icon - Icon for views. The size is limited by the value in Constants.MAX_ICON_SIZE and it's typically 32x32 pixels
        smallIcon - Icon for trees. The size is limited by the value in Constants.MAX_ICON_SIZE
        color - The color to be used to display the instances of this class (depends on the client used)
        sessionId - Session token
        Returns:
        the id of the new class metadata object
        Throws:
        ServerSideException - If the specified parent class doesn't exist If the reference node doesn't exist If any of the fields of the class definition has an invalid value
      • setClassProperties

        public void setClassProperties​(long classId,
                                       String className,
                                       String displayName,
                                       String description,
                                       byte[] smallIcon,
                                       byte[] icon,
                                       int color,
                                       Boolean isAbstract,
                                       Boolean isInDesign,
                                       Boolean isCustom,
                                       Boolean isCountable,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a class metadata properties. Use null values for those properties that shouldn't be touched
        Specified by:
        setClassProperties in interface KuwaibaSoapWebService
        className - metadata name. Null if unchanged
        displayName - New class metadata display name. Null if unchanged
        description - New class metadata description. Null if unchanged
        smallIcon - New icon for trees. Null if unchanged. The size is limited by the value in Constants.MAX_ICON_SIZE
        icon - New icon for views. Null if unchanged. The size is limited by the value in Constants.MAX_ICON_SIZE
        color - The color of the instances of this class.
        isAbstract - is this class abstract?
        isInDesign - If the class is in design stage (see createClass).
        isCustom - If the class is custom (see createClass).
        isCountable - If the class is countable (see createClass).
        sessionId - Session token
        Throws:
        ServerSideException - If there is any problem retrieving an object, while checking if every created object of the class with an attributes marked as mandatory has value.
      • createAttribute

        public void createAttribute​(String className,
                                    String name,
                                    String displayName,
                                    String type,
                                    String description,
                                    boolean administrative,
                                    boolean visible,
                                    boolean isReadOnly,
                                    boolean noCopy,
                                    boolean unique,
                                    boolean mandatory,
                                    boolean multiple,
                                    int order,
                                    String sessionId)
                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds an attribute to a class using its name as key to find it. If value of a given attribute is null, a default value will be set (except for the name, which is mandatory)
        Specified by:
        createAttribute in interface KuwaibaSoapWebService
        Parameters:
        className - Class name where the attribute will be attached
        name - attribute name
        displayName - attribute display name
        type - attribute type
        description - attribute description
        administrative - is the attribute administrative?
        visible - is the attribute visible?
        isReadOnly - is the attribute read only?
        noCopy - Marks an attribute as not to be copied during a copy operation.
        unique - should this attribute be unique?
        mandatory - is the attribute mandatory when an object is created
        multiple - Indicates if the attribute is a multiple selection list type. This flag has no effect in primitive types, such as strings or numbers
        order - Tells the system how to sort the attributes. A call to any method that returns the attributes of a class will return them sorted by order. This is useful to show the attributes in property sheets in order of importance, for example. The default value is 1000
        sessionId - session token
        Throws:
        ServerSideException - If there is no a class with such className If any of the parameters to create the attribute has a wrong value
      • createAttributeForClassWithId

        public void createAttributeForClassWithId​(long ClassId,
                                                  String name,
                                                  String displayName,
                                                  String type,
                                                  String description,
                                                  boolean administrative,
                                                  boolean visible,
                                                  boolean readOnly,
                                                  boolean noCopy,
                                                  boolean unique,
                                                  boolean mandatory,
                                                  boolean multiple,
                                                  int order,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds an attribute to a class using its id as key to find it. If value of a given attribute is null, a default value will be put in place (except for the name, which is mandatory)
        Specified by:
        createAttributeForClassWithId in interface KuwaibaSoapWebService
        Parameters:
        ClassId - Class id where the attribute will be attached
        name - attribute name
        displayName - attribute display name
        type - attribute type
        description - attribute description
        administrative - is the attribute administrative?
        visible - is the attribute visible?
        readOnly - is the attribute read only?
        noCopy - Marks an attribute as not to be copied during a copy operation.
        unique - should this attribute be unique?
        mandatory - is the attribute mandatory when an object is created
        multiple - Indicates if the attribute is a multiple selection list type. This flag has no effect in primitive types, such as strings or numbers
        order - Tells the system how to sort the attributes. A call to any method that returns the attributes of a class will return them sorted by order. This is useful to show the attributes in property sheets in order of importance, for example. The default value is 1000
        sessionId - session token
        Throws:
        ServerSideException - If any of the parameters to create the attribute has a wrong value
      • setAttributeProperties

        public void setAttributeProperties​(String className,
                                           long attributeId,
                                           String name,
                                           String displayName,
                                           String description,
                                           String type,
                                           Boolean administrative,
                                           Boolean mandatory,
                                           Boolean multiple,
                                           Boolean noCopy,
                                           Boolean readOnly,
                                           Boolean unique,
                                           Boolean visible,
                                           Integer order,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a class attribute taking its name as key to find it. If value of a given attribute is null, the old value will remain unchanged.
        Specified by:
        setAttributeProperties in interface KuwaibaSoapWebService
        Parameters:
        className - Class the attribute belongs to
        attributeId - attribute id
        name - attribute name
        displayName - attribute display name
        description - attribute description
        type - attribute type
        administrative - is the attribute administrative?
        mandatory - is the attribute mandatory when an object is created
        multiple - Indicates if the attribute is a multiple selection list type. This flag has no effect in primitive types, such as strings or numbers
        noCopy - can this attribute be copy in copy/paste operation?
        readOnly - is the attribute read only?
        unique - should this attribute be unique?
        visible - is the attribute visible?
        order - Tells the system how to sort the attributes. A call to any method that returns the attributes of a class will return them sorted by order. This is useful to show the attributes in property sheets in order of importance, for example. The default value is 1000
        sessionId - session token
        Throws:
        ServerSideException - If an object can't be find, while it is checking if every object of the class (or subclasses) has a value in an attribute marked as mandatory
      • setAttributePropertiesForClassWithId

        public void setAttributePropertiesForClassWithId​(long classId,
                                                         long attributeId,
                                                         String name,
                                                         String displayName,
                                                         String description,
                                                         String type,
                                                         Boolean administrative,
                                                         Boolean mandatory,
                                                         Boolean multiple,
                                                         Boolean noCopy,
                                                         Boolean readOnly,
                                                         Boolean unique,
                                                         Boolean visible,
                                                         Integer order,
                                                         String sessionId)
                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a class attribute taking its id as key to find it. If value of a given attribute is null, the old value will remain unchanged.
        Specified by:
        setAttributePropertiesForClassWithId in interface KuwaibaSoapWebService
        Parameters:
        classId - Class the attribute belongs to
        attributeId - attribute id
        name - attribute name
        displayName - attribute display name
        description - attribute description
        type - attribute type
        administrative - is the attribute administrative?
        mandatory - is the attribute mandatory when an object is created
        multiple - Indicates if the attribute is a multiple selection list type. This flag has no effect in primitive types, such as strings or numbers
        noCopy - can this attribute be copy in copy/paste operation?
        readOnly - is the attribute read only?
        unique - should this attribute be unique?
        visible - is the attribute visible?
        order - Tells the system how to sort the attributes. A call to any method that returns the attributes of a class will return them sorted by order. This is useful to show the attributes in property sheets in order of importance, for example. The default value is 1000
        sessionId - session token
        Throws:
        ServerSideException - If an object can't be find, while it is checking if every object of the class (or subclasses) has a value in an attribute marked as mandatory
      • getSubClassesLight

        public List<RemoteClassMetadataLight> getSubClassesLight​(String className,
                                                                 boolean includeAbstractClasses,
                                                                 boolean includeSelf,
                                                                 String sessionId)
                                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the subclasses of a given class
        Specified by:
        getSubClassesLight in interface KuwaibaSoapWebService
        Parameters:
        className - Class name
        includeAbstractClasses - should the result include the abstract classes?
        includeSelf - Should the list include the subclasses and the parent class?
        sessionId - Session token
        Returns:
        The list of subclasses
        Throws:
        ServerSideException - If the provided class is not a subclass of InventoryObject
      • getAllClasses

        public List<RemoteClassMetadata> getAllClasses​(boolean includeListTypes,
                                                       String sessionId)
                                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrieves the metadata for the entire class hierarchy as ClassInfo instances
        Specified by:
        getAllClasses in interface KuwaibaSoapWebService
        Parameters:
        includeListTypes - boolean to indicate if the list should include the subclasses of GenericObjectList
        sessionId - Session token
        Returns:
        An array with the metadata for the entire class hierarchy as ClassInfo instances
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • getAllClassesLight

        public List<RemoteClassMetadataLight> getAllClassesLight​(boolean includeListTypes,
                                                                 String sessionId)
                                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrieves the metadata for the entire class hierarchy as ClassInfoLight instances
        Specified by:
        getAllClassesLight in interface KuwaibaSoapWebService
        Parameters:
        includeListTypes - boolean to indicate if the list should include the subclasses of GenericObjectList
        sessionId - Session token
        Returns:
        An array with the metadata for the entire class hierarchy as ClassInfoLight instances
        Throws:
        ServerSideException - If GenericListType class does not exist.
      • deleteClass

        public void deleteClass​(String className,
                                String sessionId)
                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a class from the data model using its name as key to find it
        Specified by:
        deleteClass in interface KuwaibaSoapWebService
        Parameters:
        className - Class name
        sessionId - Session token
        Throws:
        ServerSideException - If there is not a class with de ClassName If the class is a core class, has instances, has incoming relationships or is a list type that is used by another class.
      • deleteClassWithId

        public void deleteClassWithId​(long classId,
                                      String sessionId)
                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a class from the data model using its id as key to find it
        Specified by:
        deleteClassWithId in interface KuwaibaSoapWebService
        Parameters:
        classId - Class id
        sessionId - Session token
        Throws:
        ServerSideException - If the class is a core class, has instances, has incoming relationships or is a list type that is used by another class.
      • getPossibleChildren

        public List<RemoteClassMetadataLight> getPossibleChildren​(String parentClassName,
                                                                  String sessionId)
                                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the possible children of a class according to the containment hierarchy. This method is recursive, and if a possible child is an abstract class, it gets its non-abstract subclasses
        Specified by:
        getPossibleChildren in interface KuwaibaSoapWebService
        Parameters:
        parentClassName - Class to retrieve its possible children
        sessionId - Session token
        Returns:
        A list of possible children as ClassInfoLight instances An array with the metadata for the entire class hierarchy as ClassInfoLight instances
        Throws:
        ServerSideException - If the class can not be found
      • getPossibleSpecialChildren

        public List<RemoteClassMetadataLight> getPossibleSpecialChildren​(String parentClassName,
                                                                         String sessionId)
                                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the possible special children of a class according to the containment hierarchy. This method is recursive, and if a possible special child is an abstract class, it gets its non-abstract subclasses
        Specified by:
        getPossibleSpecialChildren in interface KuwaibaSoapWebService
        Parameters:
        parentClassName - Class to retrieve its possible special children
        sessionId - Session token
        Returns:
        A list of possible special children as ClassInfoLight instances
        Throws:
        ServerSideException - If the class can not be found
      • getPossibleChildrenNoRecursive

        public List<RemoteClassMetadataLight> getPossibleChildrenNoRecursive​(String parentClassName,
                                                                             String sessionId)
                                                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the possible children of a class according to the containment hierarchy. This method is not recursive, and only returns the direct possible children, even if they're abstract
        Specified by:
        getPossibleChildrenNoRecursive in interface KuwaibaSoapWebService
        Parameters:
        parentClassName - Class to retrieve its possible children
        sessionId - Session token
        Returns:
        An array with the metadata for the entire class hierarchy as ClassInfoLight instances
        Throws:
        ServerSideException - If the class could not be found
      • getPossibleSpecialChildrenNoRecursive

        public List<RemoteClassMetadataLight> getPossibleSpecialChildrenNoRecursive​(String parentClassName,
                                                                                    String sessionId)
                                                                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the possible special children of a class according to the containment hierarchy. This method is not recursive, and only returns the direct possible special children, even if they're abstract
        Specified by:
        getPossibleSpecialChildrenNoRecursive in interface KuwaibaSoapWebService
        Parameters:
        parentClassName - Class to retrieve its possible special children
        sessionId - Session token
        Returns:
        A List with the metadata for the entire class hierarchy as ClassInfoLight instances
        Throws:
        ServerSideException - If the class could not be found
      • addPossibleChildrenForClassWithId

        public void addPossibleChildrenForClassWithId​(long parentClassId,
                                                      long[] newPossibleChildren,
                                                      String sessionId)
                                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds possible children to a given class using its id as argument. If any of the arguments provided are already added, it will abort the operation and rise an exception
        Specified by:
        addPossibleChildrenForClassWithId in interface KuwaibaSoapWebService
        Parameters:
        parentClassId - Class to attach the new possible children
        newPossibleChildren - List of new possible children. Abstract classes are de-aggregated
        sessionId - Session token
        Throws:
        ServerSideException - If any of the possible children or the parent doesn't exist If any of the possible children classes already are possible children.
      • addPossibleSpecialChildrenWithId

        public void addPossibleSpecialChildrenWithId​(long parentClassId,
                                                     long[] possibleSpecialChildren,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds possible special children to a given class using its id as argument. If any of the arguments provided are already added, it will abort the operation and rise an exception
        Specified by:
        addPossibleSpecialChildrenWithId in interface KuwaibaSoapWebService
        Parameters:
        parentClassId - Class to attach the new possible special children
        possibleSpecialChildren - List of new possible children. Abstract classes are de-aggregated
        sessionId - Session token
        Throws:
        ServerSideException - If any of the possible children or the parent doesn't exist If any of the possible children classes already are possible special children.
      • addPossibleChildren

        public void addPossibleChildren​(String parentClassName,
                                        String[] childrenToBeAdded,
                                        String sessionId)
                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds possible children to a given class using its name as argument. If any of the arguments provided are already added, it will abort the operation and rise an exception
        Specified by:
        addPossibleChildren in interface KuwaibaSoapWebService
        Parameters:
        parentClassName - Class to attach the new possible children
        childrenToBeAdded - List of new possible children. Abstract classes are de-aggregated
        sessionId - Session token
        Throws:
        ServerSideException - If the parent class or any of the possible children can not be found If any of the given possible children can not be a possible children of parentClassName
      • addPossibleSpecialChildren

        public void addPossibleSpecialChildren​(String parentClassName,
                                               String[] possibleSpecialChildren,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds special possible children to a given class using its name. If any of the arguments provided are already added, it will abort the operation and rise an exception
        Specified by:
        addPossibleSpecialChildren in interface KuwaibaSoapWebService
        Parameters:
        parentClassName - Class to attach the new possible special children
        possibleSpecialChildren - List of new possible special children. Abstract classes are de-aggregated
        sessionId - Session token
        Throws:
        ServerSideException - If the parent class or any of the possible children can not be found If any of the given possible children can not be a possible children of parentClassName
      • removePossibleChildrenForClassWithId

        public void removePossibleChildrenForClassWithId​(long parentClassId,
                                                         long[] childrenToBeRemoved,
                                                         String sessionId)
                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Removes a set of possible children for a given class
        Specified by:
        removePossibleChildrenForClassWithId in interface KuwaibaSoapWebService
        Parameters:
        parentClassId - Class the possible children are going to be removed from
        childrenToBeRemoved - List of ids of classes to be removed as possible children
        sessionId - Session token
        Throws:
        ServerSideException - If any of the ids provided can't be found
      • removePossibleSpecialChildren

        public void removePossibleSpecialChildren​(long parentClassId,
                                                  long[] specialChildrenToBeRemoved,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Removes a set of possible special children for a given class.
        Specified by:
        removePossibleSpecialChildren in interface KuwaibaSoapWebService
        Parameters:
        parentClassId - Parent Class of the possible special children are going to be removed from
        specialChildrenToBeRemoved - List of ids of classes to be remove as possible special children
        sessionId - Session token
        Throws:
        ServerSideException - If any of the ids provided can't be found
      • isSubClassOf

        public boolean isSubClassOf​(String className,
                                    String allegedParentClass,
                                    String sessionId)
                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Tests if a class is subclass of another.
        Specified by:
        isSubClassOf in interface KuwaibaSoapWebService
        Parameters:
        className - Class to be tested.
        allegedParentClass - Class to be tested against.
        sessionId - Session token.
        Returns:
        If the tested class is subclass of allegedParentClass or not.
        Throws:
        ServerSideException - In case something goes wrong.
      • bulkUpload

        public String bulkUpload​(byte[] file,
                                 int commitSize,
                                 int dataType,
                                 String sessionId)
                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates many objects at once given a well formatted file. See user manual for details on how to format the file
        Specified by:
        bulkUpload in interface KuwaibaSoapWebService
        Parameters:
        file - The file with size no greater
        commitSize - The records are not committed one by one, but in batch. This number tells Kuwaiba how many records (lines) to commit at once.
        dataType - What kind of data contains the file, listTypes, inventory objects, etc
        sessionId - Session token.
        Returns:
        The result of the operation.
        Throws:
        ServerSideException - If something goes wrong.
      • createTemplate

        public String createTemplate​(String templateClass,
                                     String templateName,
                                     String sessionId)
                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a template.
        Specified by:
        createTemplate in interface KuwaibaSoapWebService
        Parameters:
        templateClass - The class you want to create a template for.
        templateName - The name of the template.
        sessionId - Session token.
        Returns:
        The id of the newly created template.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the provided class does not exist If the template class is abstract.
      • createTemplateElement

        public String createTemplateElement​(String templateElementClass,
                                            String templateElementParentClassName,
                                            String templateElementParentId,
                                            String templateElementName,
                                            String sessionId)
                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an object inside a template.
        Specified by:
        createTemplateElement in interface KuwaibaSoapWebService
        Parameters:
        templateElementClass - Class of the object you want to create.
        templateElementParentClassName - Class of the parent to the object you want to create.
        templateElementParentId - Id of the parent to the object you want to create.
        templateElementName - Name of the element.
        sessionId - Session token.
        Returns:
        The id of the new object.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object (or its parent) class could not be found If the parent object could not be found If the class provided to create the new element from is abstract.
      • createTemplateSpecialElement

        public String createTemplateSpecialElement​(String tsElementClass,
                                                   String tsElementParentClassName,
                                                   String tsElementParentId,
                                                   String tsElementName,
                                                   String sessionId)
                                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an special object inside a template.
        Specified by:
        createTemplateSpecialElement in interface KuwaibaSoapWebService
        Parameters:
        tsElementClass - Class of the special object you want to create.
        tsElementParentClassName - Class of the parent to the special object you want to create.
        tsElementParentId - Id of the parent to the special object you want to create.
        tsElementName - Name of the element.
        sessionId - Session token.
        Returns:
        The id of the new object.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the element class are not a possible special child of the element parent class If the element class given are abstract If the element class or element parent class can not be found If the element parent can no be found
      • createBulkTemplateElement

        public String[] createBulkTemplateElement​(String templateElementClassName,
                                                  String templateElementParentClassName,
                                                  String templateElementParentId,
                                                  String templateElementNamePattern,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates multiple template elements using a given name pattern
        Specified by:
        createBulkTemplateElement in interface KuwaibaSoapWebService
        Parameters:
        templateElementClassName - The class name of the new set of template elements
        templateElementParentClassName - The parent class name of the new set of template elements
        templateElementParentId - The parent id of the new set of template elements
        templateElementNamePattern - Name pattern of the new set of template elements
        sessionId - Session id token
        Returns:
        An array of ids for the new template elements
        Throws:
        ServerSideException - If the parent class name or the template element class name cannot be found If the given template element class cannot be a child of the given parent If the parent class name cannot be found If the given pattern to generate the name has less possibilities that the number of template elements to be created
      • createBulkSpecialTemplateElement

        public String[] createBulkSpecialTemplateElement​(String stElementClass,
                                                         String stElementParentClassName,
                                                         String stElementParentId,
                                                         String stElementNamePattern,
                                                         String sessionId)
                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates multiple special template elements using a given name pattern
        Specified by:
        createBulkSpecialTemplateElement in interface KuwaibaSoapWebService
        Parameters:
        stElementClass - The class name of the new set of special template elements
        stElementParentClassName - The parent class name of the new set of special template elements
        stElementParentId - The parent id of the new set of special template elements
        stElementNamePattern - Name pattern of the new set of special template elements
        sessionId - Session id token
        Returns:
        An array if ids for the new special template elements
        Throws:
        ServerSideException - If the parent class name or the special template element class name cannot be found If the given special template element class cannot be a child of the given parent If the parent class name cannot be found If the given pattern to generate the name has less possibilities that the number of special template elements to be created
      • updateTemplateElement

        public void updateTemplateElement​(String templateElementClass,
                                          String templateElementId,
                                          String[] attributeNames,
                                          String[] attributeValues,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates the value of an attribute of a template element.
        Specified by:
        updateTemplateElement in interface KuwaibaSoapWebService
        Parameters:
        templateElementClass - Class of the element you want to update.
        templateElementId - Id of the element you want to update.
        attributeNames - Names of the attributes that you want to be updated as an array of strings.
        attributeValues - The values of the attributes you want to update. For list types, it's the id of the related type
        sessionId - Session token.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the classes provided as arguments do not exist If the template element could not be found If the arrays attributeNames and attributeValues have different sizes
      • deleteTemplateElement

        public void deleteTemplateElement​(String templateElementClass,
                                          String templateElementId,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes an element within a template or a template itself.
        Specified by:
        deleteTemplateElement in interface KuwaibaSoapWebService
        Parameters:
        templateElementClass - The template element class.
        templateElementId - The template element id.
        sessionId - Session token.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the element's class could not be found. If the element could not be found.
      • copyTemplateElements

        public String[] copyTemplateElements​(String[] sourceObjectsClassNames,
                                             String[] sourceObjectsIds,
                                             String newParentClassName,
                                             String newParentId,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Copy template elements within templates. Should not be used to copy entire templates.
        Specified by:
        copyTemplateElements in interface KuwaibaSoapWebService
        Parameters:
        sourceObjectsClassNames - Array with the class names of the elements to be copied.
        sourceObjectsIds - Array with the ids of the elements to be copied.
        newParentClassName - Class of the parent of the copied objects.
        newParentId - Id of the parent of the copied objects.
        sessionId - Session token.
        Returns:
        An array with the ids of the newly created elements in the same order they were provided.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method. If any of the classes could not be found. If any of the source template elements could not be found. If the arrays provided as arguments have different sizes.
      • copyTemplateSpecialElements

        public String[] copyTemplateSpecialElements​(String[] sourceObjectsClassNames,
                                                    String[] sourceObjectsIds,
                                                    String newParentClassName,
                                                    String newParentId,
                                                    String sessionId)
                                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Copy template special elements within templates. Should not be used to copy entire templates.
        Specified by:
        copyTemplateSpecialElements in interface KuwaibaSoapWebService
        Parameters:
        sourceObjectsClassNames - Array with the class names of the special elements to be copied.
        sourceObjectsIds - Array with the ids of the special elements to be copied.
        newParentClassName - Class of the parent of the copied objects.
        newParentId - Id of the parent of the copied objects.
        sessionId - Session token.
        Returns:
        An array with the ids of the newly created special elements in the same order they were provided.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the arrays provided as arguments have different sizes. If any of the classes could not be found. If any of the source template elements could not be found.
      • getTemplateElement

        public RemoteObject getTemplateElement​(String templateElementClass,
                                               String templateElementId,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrives all the information of a given template element.
        Specified by:
        getTemplateElement in interface KuwaibaSoapWebService
        Parameters:
        templateElementClass - Template element class.
        templateElementId - Template element id.
        sessionId - session token
        Returns:
        The template element information
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the template class does not exist If the template element could not be found If an attribute value can't be mapped into value
      • createClassLevelReport

        public long createClassLevelReport​(String className,
                                           String reportName,
                                           String reportDescription,
                                           String script,
                                           int outputType,
                                           boolean enabled,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a class level report (a report that will be available for all instances of a given class -and its subclasses-)
        Specified by:
        createClassLevelReport in interface KuwaibaSoapWebService
        Parameters:
        className - Class this report is going to be related to. It can be ab abstract class and the report will be available for all its subclasses
        reportName - Name of the report.
        reportDescription - Report description.
        script - Script text.
        outputType - What will be the default output of this report? See ClassLevelReportDescriptor for possible values
        enabled - If enabled, a report can be executed.
        sessionId - Session token
        Returns:
        The id of the newly created report.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method. If the class provided could not be found.
      • createInventoryLevelReport

        public long createInventoryLevelReport​(String reportName,
                                               String reportDescription,
                                               String script,
                                               int outputType,
                                               boolean enabled,
                                               List<StringPair> parameters,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an inventory level report (a report that is not tied to a particlar instance or class. In most cases, they also receive parameters)
        Specified by:
        createInventoryLevelReport in interface KuwaibaSoapWebService
        Parameters:
        reportName - Name of the report.
        reportDescription - Report description.
        script - Script text.
        outputType - What will be the default output of this report? See InventoryLevelReportDescriptor for possible values
        enabled - If enabled, a report can be executed.
        parameters - Optional (it might be either null or an empty array). The list of the names parameters that this report will support. They will always be captured as strings, so it's up to the author of the report the sanitization and conversion of the inputs
        sessionId - Session token
        Returns:
        The id of the newly created report.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the dummy root could not be found, which is actually a severe problem.
      • updateReport

        public void updateReport​(long reportId,
                                 String reportName,
                                 String reportDescription,
                                 Boolean enabled,
                                 Integer type,
                                 String script,
                                 String sessionId)
                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates the properties of an existing class level report.
        Specified by:
        updateReport in interface KuwaibaSoapWebService
        Parameters:
        reportId - Id of the report.
        reportName - The name of the report. Null to leave it unchanged.
        reportDescription - The description of the report. Null to leave it unchanged.
        enabled - Is the report enabled? . Null to leave it unchanged.
        type - Type of the output of the report. See LocalReportLight for possible values
        script - Text of the script.
        sessionId - Session token.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the report properties has a wrong or unexpected format If the report could not be found.
      • updateReportParameters

        public void updateReportParameters​(long reportId,
                                           List<StringPair> parameters,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates the value of any of the parameters of a given report.
        Specified by:
        updateReportParameters in interface KuwaibaSoapWebService
        Parameters:
        reportId - Report id.
        parameters - List of pairs attribute-value of the report. Valid values are name, description, script and enabled.
        sessionId - Session token.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the any of the parameters has an invalid name
      • getClassLevelReports

        public List<RemoteReportMetadataLight> getClassLevelReports​(String className,
                                                                    boolean recursive,
                                                                    boolean includeDisabled,
                                                                    String sessionId)
                                                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the class level reports associated to the given class (or its superclasses)
        Specified by:
        getClassLevelReports in interface KuwaibaSoapWebService
        Parameters:
        className - The class to extract the reports from.
        recursive - False to get only the directly associated reports. True top get also the reports associate top its superclasses
        includeDisabled - True to also include the reports marked as disabled. False to return only the enabled ones.
        sessionId - Session token.
        Returns:
        The list of reports.
        Throws:
        ServerSideException - If the class could not be found If the user is not allowed to invoke the method
      • executeClassLevelReport

        public byte[] executeClassLevelReport​(String objectClassName,
                                              String objectId,
                                              long reportId,
                                              String sessionId)
                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Executes a class level report and returns the result.
        Specified by:
        executeClassLevelReport in interface KuwaibaSoapWebService
        Parameters:
        objectClassName - The class of the instance that will be used as input for the report.
        objectId - The id of the instance that will be used as input for the report.
        reportId - The id of the report.
        sessionId - Session token.
        Returns:
        The result of the report execution.
        Throws:
        ServerSideException - If the class could not be found or if the report could not be found or if the inventory object could not be found or if there's an error during the execution of the report.
      • executeInventoryLevelReport

        public byte[] executeInventoryLevelReport​(long reportId,
                                                  List<StringPair> parameters,
                                                  String sessionId)
                                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Executes an inventory level report and returns the result.
        Specified by:
        executeInventoryLevelReport in interface KuwaibaSoapWebService
        Parameters:
        reportId - The id of the report.
        parameters - List of pairs param name - param value
        sessionId - Session token.
        Returns:
        The result of the report execution.
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or If the report could not be found or if the associated script exits with error.
      • createFavoritesFolderForUser

        public long createFavoritesFolderForUser​(String favoritesFolderName,
                                                 long userId,
                                                 String sessionId)
                                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a favorites folder for User.
        Specified by:
        createFavoritesFolderForUser in interface KuwaibaSoapWebService
        Parameters:
        favoritesFolderName - Bookmark folder name
        userId - User id
        sessionId - The session token
        Returns:
        The id of the new Bookmark folder
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or If the user can not be found or If the name is null or empty
      • deleteFavoritesFolders

        public void deleteFavoritesFolders​(long[] favoritesFolderId,
                                           long userId,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a set of favorites folders
        Specified by:
        deleteFavoritesFolders in interface KuwaibaSoapWebService
        Parameters:
        favoritesFolderId - Bookmark folder id
        userId - The User id
        sessionId - The session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or If any favorites folder in the array can not be found
      • addObjectsToFavoritesFolder

        public void addObjectsToFavoritesFolder​(String[] objectClass,
                                                String[] objectId,
                                                long favoritesFolderId,
                                                long userId,
                                                String sessionId)
                                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates a list of objects to an existing favorites folder
        Specified by:
        addObjectsToFavoritesFolder in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class name
        objectId - Object id
        favoritesFolderId - Bookmark folder id
        userId - The User id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the favorites folder can not be found If the object can not be found If the object have a relationship with the favorite folder
      • removeObjectsFromFavoritesFolder

        public void removeObjectsFromFavoritesFolder​(String[] objectClass,
                                                     String[] objectId,
                                                     long favoritesFolderId,
                                                     long userId,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Removes a list of objects from a given favorites folder
        Specified by:
        removeObjectsFromFavoritesFolder in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class name
        objectId - Object id
        favoritesFolderId - Bookmark folder id
        userId - User id the favorites folder belongs to
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the favorites folder can not be found If the object can not be found If the object can not be found
      • getFavoritesFoldersForObject

        public List<RemoteFavoritesFolder> getFavoritesFoldersForObject​(long userId,
                                                                        String objectClass,
                                                                        String objectId,
                                                                        String sessionId)
                                                                 throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the favorites folders an object is included into.
        Specified by:
        getFavoritesFoldersForObject in interface KuwaibaSoapWebService
        Parameters:
        userId - User Id
        objectClass - Object Class name
        objectId - Object id
        sessionId - Session token
        Returns:
        The list of bookmarks where an object is associated
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object can not be found If the object is associated to a bookmark folder but The favorites folder is not associated to the current user
      • updateFavoritesFolder

        public void updateFavoritesFolder​(long favoritesFolderId,
                                          String favoritesFolderName,
                                          long userId,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a favorites folder
        Specified by:
        updateFavoritesFolder in interface KuwaibaSoapWebService
        Parameters:
        favoritesFolderId - Favorites folder id
        favoritesFolderName - Favorites folder name
        userId - User id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the favorites folder can not be found If the name of the favorites folder is null or empty
      • createBusinessRule

        public long createBusinessRule​(String ruleName,
                                       String ruleDescription,
                                       int ruleType,
                                       int ruleScope,
                                       String appliesTo,
                                       String ruleVersion,
                                       List<String> constraints,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a business rule given a set of constraints
        Specified by:
        createBusinessRule in interface KuwaibaSoapWebService
        Parameters:
        ruleName - Rule name
        ruleDescription - Rule description
        ruleType - Rule type. See BusinesRule.TYPE* for possible values.
        ruleScope - The scope of the rule. See BusinesRule.SCOPE* for possible values.
        appliesTo - The class this rule applies to. Can not be null.
        ruleVersion - The version of the rule. Useful to migrate it if necessary in further versions of the platform
        constraints - An array with the definition of the logic to be matched with the rule. Can not be empty or null
        sessionId - Session token
        Returns:
        The id of the newly created business rule
        Throws:
        ServerSideException - If any of the parameters is null (strings) or leer than 1 or if the constraints array is null or empty
      • launchSupervisedSynchronizationTask

        public List<RemoteSyncFinding> launchSupervisedSynchronizationTask​(long syncGroupId,
                                                                           String sessionId)
                                                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Executes a supervised synchronization job, which consist on connecting to the sync data source using the configuration attached to the given sync group and finding the differences between the information currently in the inventory platform and what's in the sync data source. A supervised sync job needs a human to review the differences and decide what to do, while an automated sync job automatically decides what to do based on built-in business rules. Please note that the execution might take some time, so it is expected that the client to implement an asynchronous call
        Specified by:
        launchSupervisedSynchronizationTask in interface KuwaibaSoapWebService
        Parameters:
        syncGroupId - The sync group id
        sessionId - The session token
        Returns:
        A list of differences that require the authorization of a user to be resolved
        Throws:
        ServerSideException - If the sync group could not be found or if
      • launchAutomatedSynchronizationTask

        public List<RemoteSyncResult> launchAutomatedSynchronizationTask​(long syncGroupId,
                                                                         String providersName,
                                                                         String sessionId)
                                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Executes an automated synchronization job, which consist on connecting to the sync data source using the configuration attached to the given sync group and finding the differences between the information currently in the inventory platform and what's in the sync data source. An automated sync job does not need human intervention it automatically decides what to do based on built-in business rules
        Specified by:
        launchAutomatedSynchronizationTask in interface KuwaibaSoapWebService
        Parameters:
        syncGroupId - The sync group id
        sessionId - The session token
        Returns:
        The set of results
        Throws:
        ServerSideException - If the sync group could not be found
      • launchAdHocAutomatedSynchronizationTask

        public List<RemoteSyncResult> launchAdHocAutomatedSynchronizationTask​(List<Long> synDsConfigIds,
                                                                              String providersName,
                                                                              String sessionId)
                                                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Executes an automated synchronization job, which consist on connecting to the sync data source using the configuration attached to the given sync group and finding the differences between the information currently in the inventory platform and what's in the sync data source. An automated sync job does not need human intervention it automatically decides what to do based on built-in business rules
        Specified by:
        launchAdHocAutomatedSynchronizationTask in interface KuwaibaSoapWebService
        Parameters:
        synDsConfigIds - The sync data source configurations ids
        sessionId - The session token
        Returns:
        The set of results
        Throws:
        ServerSideException - If the sync group could not be found
      • createSDHTransportLink

        public String createSDHTransportLink​(String classNameEndpointA,
                                             String idEndpointA,
                                             String classNameEndpointB,
                                             String idEndpointB,
                                             String linkType,
                                             String defaultName,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an SDH transport link (STMX)
        Specified by:
        createSDHTransportLink in interface KuwaibaSoapWebService
        Parameters:
        classNameEndpointA - The class name of the endpoint A (some kind of port)
        idEndpointA - Id of endpoint A
        classNameEndpointB - The class name of the endpoint Z (some kind of port)
        idEndpointB - Id of endpoint Z
        linkType - Type of link (STM1, STM4, STM16, STM256, etc)
        defaultName - The default name of the transport link.
        sessionId - Session token
        Returns:
        The id of the newly created transport link
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or If any of the requested objects can't be found or If any of the classes provided can not be found or If any of the objects involved can't be connected.
      • createSDHContainerLink

        public String createSDHContainerLink​(String classNameEndpointA,
                                             String idEndpointA,
                                             String classNameEndpointB,
                                             String idEndpointB,
                                             String linkType,
                                             List<RemoteSDHPosition> positions,
                                             String defaultName,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an SDH container link (VCX). In practical terms, it's always a high order container, such a VC4XXX
        Specified by:
        createSDHContainerLink in interface KuwaibaSoapWebService
        Parameters:
        classNameEndpointA - The class name of the endpoint A (a GenericCommunicationsEquipment)
        idEndpointA - Id of endpoint A
        classNameEndpointB - The class name of the endpoint B (GenericCommunicationsEquipment)
        idEndpointB - Id of endpoint B
        linkType - Type of link (VC4, VC3, V12, etc. A VC12 alone doesn't make much sense, though)
        positions - This param specifies the transport links and positions used by the container. For more details on how this works, please read the "SDH Model: Technical Design and Tools" document. Please note that is greatly advisable to provide them already sorted
        defaultName - the name to be assigned to the new element. If null, an empty string will be used
        sessionId - Sesion token
        Returns:
        The id of the newly created container link
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or If any of the requested objects can't be found or If any of the classes provided can not be found or If any of the objects involved can't be connected.
      • createSDHTributaryLink

        public String createSDHTributaryLink​(String classNameEndpointA,
                                             String idEndpointA,
                                             String classNameEndpointB,
                                             String idEndpointB,
                                             String linkType,
                                             List<RemoteSDHPosition> positions,
                                             String defaultName,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an SDH tributary link (VCXTributaryLink)
        Specified by:
        createSDHTributaryLink in interface KuwaibaSoapWebService
        Parameters:
        classNameEndpointA - The class name of the endpoint A (some kind of tributary port)
        idEndpointA - Id of endpoint A
        classNameEndpointB - The class name of the endpoint B (some kind of tributary port)
        idEndpointB - Id of endpoint B
        linkType - Type of link (VC4TributaryLink, VC3TributaryLink, V12TributaryLink, etc)
        positions - This param specifies the transport links and positions used by the container. For more details on how this works, please read the SDH Model: Technical Design and Tools document. Please note that is greatly advisable to provide them already sorted. Please note that creating a tributary link automatically creates a container link to deliver it
        defaultName - the name to be assigned to the new element
        sessionId - Session token
        Returns:
        The id of the newly created tributary link
        Throws:
        ServerSideException - If the user is not allowed to invoke the method or If any of the requested objects can't be found or If any of the classes provided can not be found or If any of the objects involved can't be connected.
      • deleteSDHTransportLink

        public void deleteSDHTransportLink​(String transportLinkClass,
                                           String transportLinkId,
                                           boolean forceDelete,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a transport link
        Specified by:
        deleteSDHTransportLink in interface KuwaibaSoapWebService
        Parameters:
        transportLinkClass - Transport Link class
        transportLinkId - Transport link id
        forceDelete - Delete recursively all SDH elements transported by the transport link
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the transport link could not be found
      • deleteSDHContainerLink

        public void deleteSDHContainerLink​(String containerLinkClass,
                                           String containerLinkId,
                                           boolean forceDelete,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a container link
        Specified by:
        deleteSDHContainerLink in interface KuwaibaSoapWebService
        Parameters:
        containerLinkClass - Container link class
        containerLinkId - Container class id
        forceDelete - Delete recursively all SDH elements contained by the container link
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the container link could not be found
      • deleteSDHTributaryLink

        public void deleteSDHTributaryLink​(String tributaryLinkClass,
                                           String tributaryLinkId,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a tributary link and its corresponding container link. This method will delete all the object relationships.
        Specified by:
        deleteSDHTributaryLink in interface KuwaibaSoapWebService
        Parameters:
        tributaryLinkClass - The class of the tributary link
        tributaryLinkId - the id of the tributary link
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the tributary link could not be found
      • findSDHRoutesUsingTransportLinks

        public List<RemoteObjectLightList> findSDHRoutesUsingTransportLinks​(String communicationsEquipmentClassA,
                                                                            String communicationsEquipmentIdA,
                                                                            String communicationsEquipmentClassB,
                                                                            String communicationsEquipmentIB,
                                                                            String sessionId)
                                                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Finds a route between two GenericcommunicationsEquipment based on the TransportLinks network map (for more details on how this works, please read the SDH Model: Technical Design and Tools document)
        Specified by:
        findSDHRoutesUsingTransportLinks in interface KuwaibaSoapWebService
        Parameters:
        communicationsEquipmentClassA - The class of one of the route endpoints
        communicationsEquipmentIdA - The id of one of the route endpoints
        communicationsEquipmentClassB - The class of the other route endpoint
        communicationsEquipmentIB - The id of the other route endpoint
        sessionId - Session token
        Returns:
        A sorted list of RemoteObjectLights containing the route. This list includes the transport links and the nodes in between, including the very endpoints
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the given communication equipment is no subclass of GenericCommunicationsEquipment
      • findSDHRoutesUsingContainerLinks

        public List<RemoteObjectLightList> findSDHRoutesUsingContainerLinks​(String communicationsEquipmentClassA,
                                                                            String communicationsEquipmentIdA,
                                                                            String communicationsEquipmentClassB,
                                                                            String communicationsEquipmentIB,
                                                                            String sessionId)
                                                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Finds a route between two GenericcommunicationsEquipment based on the ContainerLinks network map (for more details on how this works, please read the SDH Model: Technical Design and Tools document)
        Specified by:
        findSDHRoutesUsingContainerLinks in interface KuwaibaSoapWebService
        Parameters:
        communicationsEquipmentClassA - The class of one of the route endpoints
        communicationsEquipmentIdA - The id of one of the route endpoints
        communicationsEquipmentClassB - The class of the other route endpoint
        communicationsEquipmentIB - The id of the other route endpoint
        sessionId - Session token
        Returns:
        A sorted list of RemoteObjectLights containing the route. This list includes the transport links and the nodes in between, including the very endpoints
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the given communication equipment is no subclass of GenericCommunicationsEquipment
      • getSDHContainerLinkStructure

        public List<RemoteSDHContainerLinkDefinition> getSDHContainerLinkStructure​(String containerLinkClass,
                                                                                   String containerLinkId,
                                                                                   String sessionId)
                                                                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the internal structure of a container link. This is useful to provide information about the occupation of a link. This is only applicable to VC4XX
        Specified by:
        getSDHContainerLinkStructure in interface KuwaibaSoapWebService
        Parameters:
        containerLinkClass - Container class
        containerLinkId - Container Id
        sessionId - Session token
        Returns:
        The list of containers contained in the container
        Throws:
        ServerSideException - If the user is not authorized to know the structure of a container link, if the container supplied is not subclass of GenericSDHHighOrderContainerLink, if the container could not be found or if the class could not be found
      • createSubnetPool

        public String createSubnetPool​(String parentId,
                                       String subnetPoolName,
                                       String subnetPoolDescription,
                                       String className,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a pool of subnets if the parentId is -1 the pool will be created in the default root for pools of subnets
        Specified by:
        createSubnetPool in interface KuwaibaSoapWebService
        Parameters:
        parentId - subnet parent Id, -1 to if want to create the pool in the root node
        subnetPoolName - subnet pool name
        subnetPoolDescription - subnet pool description
        className - if is a IPv4 or an IPv6 subnet
        sessionId - session token
        Returns:
        id of the created subnet pool
        Throws:
        ServerSideException - if the IPAM root nodes doesn't exists, or if the IPv4 or IPv6 classes doesn't exists
      • createSubnet

        public String createSubnet​(String poolId,
                                   String className,
                                   List<StringPair> attributes,
                                   String sessionId)
                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a subnet
        Specified by:
        createSubnet in interface KuwaibaSoapWebService
        Parameters:
        poolId - The id of the pool that will contain the subnet
        className - The class name of the subnet (e.g. SubnetIPv4, SubnetIPv6)
        attributes - The attributes that will be set on the newly created element as a string-based key-value dictionary
        sessionId - Session token.
        Returns:
        The id of the new subnet.
        Throws:
        ServerSideException - If something goes wrong, can't find the parent id, IPv4 or IPv6 classes doesn't exists, or some problem with attributes, different size between attribute names and attribute values.
      • deleteSubnets

        public void deleteSubnets​(String className,
                                  List<String> oids,
                                  boolean releaseRelationships,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a subnet. All subnets must be instances of the same class
        Specified by:
        deleteSubnets in interface KuwaibaSoapWebService
        Parameters:
        className - The subnet class
        oids - The ids of the subnets to be deleted
        releaseRelationships - Should the deletion be forced, deleting all the relationships?
        sessionId - Session token
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • removeIP

        public void removeIP​(String[] oids,
                             boolean releaseRelationships,
                             String sessionId)
                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Removes a set of IP Addresses from a subnet. Note that this method must be used only for Subnet objects
        Specified by:
        removeIP in interface KuwaibaSoapWebService
        Parameters:
        oids - ids of the IPs to be deleted
        releaseRelationships - Should the deletion be forced, deleting all the relationships?
        sessionId - Session token
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • relateSubnetToVlan

        public void relateSubnetToVlan​(String id,
                                       String className,
                                       String vlanId,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a relation between a Subnet and a VLAN, this method is also using to associate VFRs, and BDIs to a VLAN TODO: check the model, there are redundant relationships
        Specified by:
        relateSubnetToVlan in interface KuwaibaSoapWebService
        Parameters:
        id - Subnet id
        className - if the subnet has IPv4 or IPv6 IP addresses
        vlanId - VLAN id
        sessionId - Session token
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • releaseSubnetFromVlan

        public void releaseSubnetFromVlan​(String subnetId,
                                          String vlanId,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Releases the relation between a subnet and a VLAN, this method is also using to release VFRs, and BDIs from a VLAN TODO: check the model there are redundant relationships
        Specified by:
        releaseSubnetFromVlan in interface KuwaibaSoapWebService
        Parameters:
        subnetId - Subnet id
        vlanId - the VLAN id
        sessionId - Session token
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • itOverlaps

        public boolean itOverlaps​(String networkIp,
                                  String broadcastIp,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Checks if a new subnet overlaps with an existing one
        Specified by:
        itOverlaps in interface KuwaibaSoapWebService
        Parameters:
        networkIp - the network ip for the subnet
        broadcastIp - the broadcast ip for the subnet
        sessionId - Session token
        Returns:
        true if overlaps
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • associateObjectsToContract

        public void associateObjectsToContract​(String[] objectClass,
                                               String[] objectId,
                                               String contractClass,
                                               String contractId,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates a list of objects (instances of a subclass of InventoryObject) to an existing contract (most probably a support contract)
        Specified by:
        associateObjectsToContract in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        objectId - Object id
        contractClass - contract class
        contractId - contract id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the objects can't be found If any of the objects involved can't be associated If any of the classes provided can not be found
      • releaseObjectFromContract

        public void releaseObjectFromContract​(String objectClass,
                                              String objectId,
                                              String contractId,
                                              String sessionId)
                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Releases an inventory object from a contract it was related to
        Specified by:
        releaseObjectFromContract in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Class of the inventory object
        objectId - Id of the inventory object
        contractId - Contract id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object can not be found If the class can not be found
      • createMPLSLink

        public String createMPLSLink​(String classNameEndpointA,
                                     String idEndpointA,
                                     String classNameEndpointB,
                                     String idEndpointB,
                                     List<StringPair> attributesToBeSet,
                                     String sessionId)
                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an MPLS link
        Specified by:
        createMPLSLink in interface KuwaibaSoapWebService
        Parameters:
        classNameEndpointA - The class name of the endpoint A (some kind of port)
        idEndpointA - Id of endpoint A
        classNameEndpointB - The class name of the endpoint Z (some kind of port)
        idEndpointB - Id of endpoint Z
        attributesToBeSet - Attributes to be set, e.g. mplsLink's name
        sessionId - Session token
        Returns:
        The id of the newly created transport link
        Throws:
        ServerSideException - If the given linkType is no subclass of GenericLogicalConnection If any of the requested objects can't be found If any of the classes provided can not be found If any of the objects involved can't be connected
      • getMPLSLinkEndpoints

        public RemoteMPLSConnectionDetails getMPLSLinkEndpoints​(String connectionId,
                                                                String sessionId)
                                                         throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        The details of a given mpls link
        Specified by:
        getMPLSLinkEndpoints in interface KuwaibaSoapWebService
        Parameters:
        connectionId - the mpls link id
        sessionId - Session token
        Returns:
        An array of two positions: the first is the A endpoint and the second is the B endpoint
        Throws:
        ServerSideException - f the given id class name is not MPLS Link If any of the requested objects can't be found If any of the classes provided can not be found If any of the objects involved can't be connected
      • connectMplsLink

        public void connectMplsLink​(String[] sideAClassNames,
                                    String[] sideAIds,
                                    String[] linksIds,
                                    String[] sideBClassNames,
                                    String[] sideBIds,
                                    String sessionId)
                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Connect a given mpls links with a given ports for every side
        Specified by:
        connectMplsLink in interface KuwaibaSoapWebService
        Parameters:
        sideAClassNames - end point side A class names
        sideAIds - end point side A ids
        linksIds - mpls links ids
        sideBClassNames - end point side B class names
        sideBIds - end point side B ids
        sessionId - session token
        Throws:
        ServerSideException - If the given ports are not subclass of GenericPort If the given link ids are not of the class MPLSLink If any of the requested objects can't be found If any of the classes provided can not be found If any of the objects involved can't be connected
      • disconnectMPLSLink

        public void disconnectMPLSLink​(String connectionId,
                                       int sideToDisconnect,
                                       String sessionId)
                                throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        disconnect mpls link
        Specified by:
        disconnectMPLSLink in interface KuwaibaSoapWebService
        Parameters:
        connectionId - mpls link id
        sideToDisconnect - which side will be disconnect 1 side A, 2 side B, 3 both sides
        sessionId - session token
        Throws:
        ServerSideException - If the given link id is not of the class MPLSLink If any of the requested objects can't be found If any of the classes provided can not be found If any of the objects involved can't be connected
      • deleteMPLSLink

        public void deleteMPLSLink​(String linkId,
                                   boolean forceDelete,
                                   String sessionId)
                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a MPLS link
        Specified by:
        deleteMPLSLink in interface KuwaibaSoapWebService
        Parameters:
        linkId - the id of the mpls link
        forceDelete - Ignore the existing relationships
        sessionId - Session token
        Throws:
        ServerSideException - If the object can not be found If either the object class or the attribute can not be found If the class could not be found If the object could not be deleted because there's some business rules that avoids it or it has incoming relationships.
      • relatePortToInterface

        public void relatePortToInterface​(String portId,
                                          String portClassName,
                                          String interfaceClassName,
                                          String interfaceId,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates any GenericCommunicationsPort to existing BridgeDomainInterface
        Specified by:
        relatePortToInterface in interface KuwaibaSoapWebService
        Parameters:
        portId - MPLSTunnel or BridgeDomain or FrameRelay or VRF id
        portClassName - if is a MPLSTunnel or BridgeDomain or FrameRelay or VRF
        interfaceClassName - network element class name
        interfaceId - network element id
        sessionId - Session token
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • releasePortFromInterface

        public void releasePortFromInterface​(String interfaceClassName,
                                             String interfaceId,
                                             String portId,
                                             String sessionId)
                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Release the association between a network element and a MPLSTunnel or BridgeDomain or FrameRelay or VRF
        Specified by:
        releasePortFromInterface in interface KuwaibaSoapWebService
        Parameters:
        interfaceClassName - network element class name
        interfaceId - network element id
        portId - MPLSTunnel or BridgeDomain or FrameRelay or VRF id
        sessionId - Session token
        Throws:
        ServerSideException - Generic exception encapsulating any possible error raised at runtime
      • addProject

        public String addProject​(String parentId,
                                 String parentClassName,
                                 String className,
                                 String[] attributeNames,
                                 String[] attributeValues,
                                 String sessionId)
                          throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds a Project
        Specified by:
        addProject in interface KuwaibaSoapWebService
        Parameters:
        parentId - Parent Id
        parentClassName - Parent class name
        className - Class name
        attributeNames - Attributes names
        attributeValues - Attributes values
        sessionId - Session id token
        Returns:
        The Project id
        Throws:
        ServerSideException - If any of the attributes or its type is invalid If attributeNames and attributeValues have different sizes. If the class name could not be found
      • deleteProject

        public void deleteProject​(String className,
                                  String oid,
                                  boolean releaseRelationships,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a Project
        Specified by:
        deleteProject in interface KuwaibaSoapWebService
        Parameters:
        className - Class name
        oid - Object id
        releaseRelationships - Release relationships
        sessionId - Session id token
        Throws:
        ServerSideException - If the object couldn't be found If the class could not be found If the object could not be deleted because there's some business rules that avoids it or it has incoming relationships
      • addActivity

        public String addActivity​(String parentId,
                                  String parentClassName,
                                  String className,
                                  String[] attributeNames,
                                  String[] attributeValues,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Adds an Activity
        Specified by:
        addActivity in interface KuwaibaSoapWebService
        Parameters:
        parentId - Parent Id
        parentClassName - Parent class name
        className - Class name
        attributeNames - Attributes names
        attributeValues - Attributes values
        sessionId - Session id token
        Returns:
        The Activity id
        Throws:
        ServerSideException - If the object's class can't be found If the parent id is not found If any of the attribute values has an invalid value or format If the update can't be performed due to a format issue If attributeNames and attributeValues have different sizes.
      • deleteActivity

        public void deleteActivity​(String className,
                                   String oid,
                                   boolean releaseRelationships,
                                   String sessionId)
                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes an Activity
        Specified by:
        deleteActivity in interface KuwaibaSoapWebService
        Parameters:
        className - Class name
        oid - Object id
        releaseRelationships - Release relationships
        sessionId - Session id token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object couldn't be found If the class could not be found If the object could not be deleted because there's some business rules that avoids it or it has incoming relationships
      • getAffectedServices

        public RemoteAssetLevelCorrelatedInformation getAffectedServices​(int resourceType,
                                                                         String resourceDefinition,
                                                                         String sessionId)
                                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Retrieves the services affected when a given network resource is alarmed (or down). The services associated directly to the given resource are returned first, but depending on the resource type, the analysis might be more extensive. If the resource is a link (logical or physical), the services associated to the endpoint ports are also returned. If the the resource is a container (physical or logical), the services associated to the contained links are also returned. If the resource is a network equipment, the services associated directly to the ports contained and their connections are also returned.
        Specified by:
        getAffectedServices in interface KuwaibaSoapWebService
        Parameters:
        resourceType - Use 1 for hardware and 2 for logical links
        resourceDefinition - A semi-colon (;) separated string. The first segment (mandatory) is the name of the affected element, the second is the number of the slot (optional) and the third is the port (optional). Note that to address a logical connection, the resource definition will contain only the name of such connection.
        sessionId - Session token
        Returns:
        A compact summary with the full information about the device/interface provided, the related services and their customers
        Throws:
        ServerSideException - If the resource could not be found or if the resource definition/resource type is not valid
      • getSynchronizationProviders

        public List<RemoteSynchronizationProvider> getSynchronizationProviders​(String sessionId)
                                                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Get the set of sync providers defined in the configuration variables pool called -Sync Providers-
        Specified by:
        getSynchronizationProviders in interface KuwaibaSoapWebService
        Parameters:
        sessionId - Session token
        Returns:
        The set of sync providers defined in the configuration variables pool called -Sync Providers-
        Throws:
        ServerSideException - If the pool could not be found If the value of the variable could not be successfully translated into a java type variable If no configuration variable with that name could be found
      • createSynchronizationDataSourceConfig

        public long createSynchronizationDataSourceConfig​(String objectId,
                                                          long syncGroupId,
                                                          String name,
                                                          List<StringPair> parameters,
                                                          String sessionId)
                                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a Synchronization Data Source Configuration. A Sync data source configuration is a set of parameters used to connect to a sync data source (usually IPs, paths, etc)
        Specified by:
        createSynchronizationDataSourceConfig in interface KuwaibaSoapWebService
        Parameters:
        objectId - Id of the object that the configuration is attached to
        syncGroupId - Id of the sync group this configuration is related to
        name - The name of the new sync data source configuration
        parameters - The list of parameters to be stored as pairs name/value. Note that the Sync provider provides metadata definition to check if the number and format of the parameters correct, so it can be checked at server side
        sessionId - Session token
        Returns:
        The id of the newly created sync configuration.
        Throws:
        ServerSideException - If the sync group could not be found or if the any of the parameters does not comply with the expected format
      • createSynchronizationGroup

        public long createSynchronizationGroup​(String name,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a Synchronization Group. A Sync Group is a set of Synchronization Configurations that will be processed by the same Synchronization Provider. Take into account that the schedule for the SG to be executed is not configured here, but in Task Manager's task
        Specified by:
        createSynchronizationGroup in interface KuwaibaSoapWebService
        Parameters:
        name - The name of the new sync group
        sessionId - Session token
        Returns:
        The id of the newly created sync group
        Throws:
        ServerSideException - If the name or the sync provider are invalid
      • updateSynchronizationGroup

        public void updateSynchronizationGroup​(long syncGroupId,
                                               List<StringPair> syncGroupProperties,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a Synchronization Group. A Sync Group is a set of Synchronization Configurations that will be processed by the same Synchronization Provider. Take into account that the schedule for the SG to be executed is not configured here, but in Task Manager's task
        Specified by:
        updateSynchronizationGroup in interface KuwaibaSoapWebService
        Parameters:
        syncGroupId - The name of the new sync group
        syncGroupProperties - The synchronization group properties
        sessionId - Session token
        Throws:
        ServerSideException - If the name or the sync provider are invalid
      • copySyncDataSourceConfiguration

        public void copySyncDataSourceConfiguration​(long syncGroupId,
                                                    long[] syncDataSourceConfigurationIds,
                                                    String sessionId)
                                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates "copy" a relation between a set of sync data source configurations and a given sync group
        Specified by:
        copySyncDataSourceConfiguration in interface KuwaibaSoapWebService
        Parameters:
        syncGroupId - The Sync Group Id target
        syncDataSourceConfigurationIds - Set of sync data source configuration ids
        sessionId - Session Token
        Throws:
        ServerSideException - If the sync group cannot be found, or some sync data source configuration cannot be found If the sync group is malformed, or some sync data source configuration is malformed
      • releaseSyncDataSourceConfigFromSyncGroup

        public void releaseSyncDataSourceConfigFromSyncGroup​(long syncGroupId,
                                                             long[] syncDataSourceConfigurationIds,
                                                             String sessionId)
                                                      throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Release a set of sync data source configuration from a given sync group
        Specified by:
        releaseSyncDataSourceConfigFromSyncGroup in interface KuwaibaSoapWebService
        Parameters:
        syncGroupId - The Sync Group Id target
        syncDataSourceConfigurationIds - Set of sync data source configuration ids
        sessionId - Session Token
        Throws:
        ServerSideException - If the sync group cannot be found, or some sync data source configuration cannot be found If the sync group is malformed, or some sync data source configuration is malformed
      • moveSyncDataSourceConfiguration

        public void moveSyncDataSourceConfiguration​(long newSyncGroupId,
                                                    long[] syncDataSourceConfigurationIds,
                                                    String sessionId)
                                             throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Moves a sync data source configuration from a sync group to another sync group
        Specified by:
        moveSyncDataSourceConfiguration in interface KuwaibaSoapWebService
        Parameters:
        newSyncGroupId - The Sync Group Id target to release
        syncDataSourceConfigurationIds - Set of sync data source configuration ids
        sessionId - Session token
        Throws:
        ServerSideException - If the sync group cannot be found, or some sync data source configuration cannot be found If the sync group is malformed, or some sync data source configuration is malformed
      • createProcessDefinition

        public long createProcessDefinition​(String name,
                                            String description,
                                            String version,
                                            boolean enabled,
                                            byte[] structure,
                                            String sessionId)
                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates a process definition. A process definition is the metadata that defines the steps and constraints of a given project
        Specified by:
        createProcessDefinition in interface KuwaibaSoapWebService
        Parameters:
        name - The name of the new process definition
        description - The description of the new process definition
        version - The version of the new process definition. This is a three numbers, dot separated string (e.g. 2.4.1)
        enabled - If the project is enabled to create instances from it
        structure - The structure of the process definition. It's an XML document that represents a BPMN process definition
        sessionId - The session token
        Returns:
        The id of the newly created process definition
        Throws:
        ServerSideException - If the process structure defines a malformed process or if the version is invalid
      • updateProcessDefinition

        public void updateProcessDefinition​(long processDefinitionId,
                                            List<StringPair> properties,
                                            byte[] structure,
                                            String sessionId)
                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates a process definition, either its standard properties or its structure
        Specified by:
        updateProcessDefinition in interface KuwaibaSoapWebService
        Parameters:
        processDefinitionId - The process definition id
        properties - A key value dictionary with the standard properties to be updated. These properties are: name, description, version and enabled (use 'true' or 'false' for the latter)
        structure - A byte array withe XML process definition body
        sessionId - The session token
        Throws:
        ServerSideException - If the structure is invalid, or the process definition could not be found or one of the properties is malformed or have an unexpected name
      • deleteProcessDefinition

        public void deleteProcessDefinition​(long processDefinitionId,
                                            String sessionId)
                                     throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Deletes a process definition
        Specified by:
        deleteProcessDefinition in interface KuwaibaSoapWebService
        Parameters:
        processDefinitionId - The process definition to be deleted
        sessionId - The session token
        Throws:
        ServerSideException - If the process definition could not be found or if there are process instances related to the process definition
      • createProcessInstance

        public long createProcessInstance​(long processDefinitionId,
                                          String processInstanceName,
                                          String processInstanceDescription,
                                          String sessionId)
                                   throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an instance of a process, that is, starts one
        Specified by:
        createProcessInstance in interface KuwaibaSoapWebService
        Parameters:
        processDefinitionId - The id of the process to be started
        processInstanceName - The name of the new process
        processInstanceDescription - The description of the new process
        sessionId - The session token
        Returns:
        The id of the newly created process instance
        Throws:
        ServerSideException - If the process definition could not be found or if it's disabled
      • commitActivity

        public void commitActivity​(long processInstanceId,
                                   long activityDefinitionId,
                                   RemoteArtifact artifact,
                                   String sessionId)
                            throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Saves the artifact generated once an activity has been completed (for example, the user filled in a form).
        Specified by:
        commitActivity in interface KuwaibaSoapWebService
        Parameters:
        processInstanceId - The process instance the activity belongs to
        activityDefinitionId - The activity id
        artifact - The artifact to be saved
        sessionId - The session token
        Throws:
        ServerSideException - If the process could not be found, or if the activity had been already executed, or if the activity definition could not be found, or of there's a mismatch in the artifact versions or if the user is not an authorized actor to carry on with the activity
      • getArtifactDefinitionForActivity

        public RemoteArtifactDefinition getArtifactDefinitionForActivity​(long processDefinitionId,
                                                                         long activityDefinitionId,
                                                                         String sessionId)
                                                                  throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Given an activity definition, returns the artifact definition associated to it
        Specified by:
        getArtifactDefinitionForActivity in interface KuwaibaSoapWebService
        Parameters:
        processDefinitionId - The id of the process the activity is related to
        activityDefinitionId - The id of the activity
        sessionId - The session token
        Returns:
        An object containing the artifact definition
        Throws:
        ServerSideException - If the process or the activity could not be found
      • getArtifactForActivity

        public RemoteArtifact getArtifactForActivity​(long processInstanceId,
                                                     long activityId,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Gets the artifact associated to an activity (for example, a form that was already filled in by a user in a previous, already committed activity)
        Specified by:
        getArtifactForActivity in interface KuwaibaSoapWebService
        Parameters:
        processInstanceId - The id of the process instance. This process may have been ended already.
        activityId - The id of the activity the artifact belongs to
        sessionId - The session token
        Returns:
        The artifact corresponding to the given activity
        Throws:
        ServerSideException - If the process instance or activity couldn't be found.
      • associatePhysicalNodeToWarehouse

        public void associatePhysicalNodeToWarehouse​(String objectClass,
                                                     String objectId,
                                                     String warehouseClass,
                                                     String warehouseId,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates an object (a resource) to an existing warehouse or virtual warehouse
        Specified by:
        associatePhysicalNodeToWarehouse in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        objectId - Object id
        warehouseClass - Warehouse class
        warehouseId - Warehouse id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found
      • associatesPhysicalNodeToWarehouse

        public void associatesPhysicalNodeToWarehouse​(String[] objectClass,
                                                      String[] objectId,
                                                      String warehouseClass,
                                                      String warehouseId,
                                                      String sessionId)
                                               throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Associates a list of objects (resources) to an existing warehouse or virtual warehouse
        Specified by:
        associatesPhysicalNodeToWarehouse in interface KuwaibaSoapWebService
        Parameters:
        objectClass - Object class
        objectId - Object id
        warehouseClass - Warehouse class
        warehouseId - Warehouse id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If any of the objects can't be found If any of the objects involved can't be connected (i.e. if it's not an inventory object) If any of the classes provided can not be found
      • releasePhysicalNodeFromWarehouse

        public void releasePhysicalNodeFromWarehouse​(String warehouseClass,
                                                     String warehouseId,
                                                     String targetId,
                                                     String sessionId)
                                              throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Releases an object from a warehouse or virtual warehouse that is using it
        Specified by:
        releasePhysicalNodeFromWarehouse in interface KuwaibaSoapWebService
        Parameters:
        warehouseClass - Warehouse class
        warehouseId - Warehouse id
        targetId - target object id
        sessionId - Session token
        Throws:
        ServerSideException - If the user is not allowed to invoke the method If the object can not be found If the class can not be found If the object activity log could no be found
      • moveObjectsToWarehousePool

        public void moveObjectsToWarehousePool​(String targetClass,
                                               String targetOid,
                                               String[] objectClasses,
                                               String[] objectOids,
                                               String sessionId)
                                        throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Moves objects from their current parent to a warehouse pool target object.
        Specified by:
        moveObjectsToWarehousePool in interface KuwaibaSoapWebService
        Parameters:
        targetClass - New parent object id
        targetOid - The new parent's oid
        objectClasses - Class names of the objects to be moved
        objectOids - Oids of the objects to be moved
        sessionId - Session token
        Throws:
        ServerSideException - If the object's or new parent's class can't be found If the object or its new parent can't be found If the update can't be performed due to a business rule
      • moveObjectsToWarehouse

        public void moveObjectsToWarehouse​(String targetClass,
                                           String targetOid,
                                           String[] objectClasses,
                                           String[] objectOids,
                                           String sessionId)
                                    throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Moves objects from their current parent to a target object.
        Specified by:
        moveObjectsToWarehouse in interface KuwaibaSoapWebService
        Parameters:
        targetClass - New parent object id
        targetOid - The new parent's oid
        objectClasses - Class names of the objects to be moved
        objectOids - Oids of the objects to be moved
        sessionId - Session token
        Throws:
        ServerSideException - If the object's or new parent's class can't be found If the object or its new parent can't be found If the update can't be performed due to a business rule
      • getBGPMap

        public List<RemoteLogicalConnectionDetails> getBGPMap​(List<String> mappedBgpLinksIds,
                                                              String sessionId)
                                                       throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates/updates a map of the BGPLinks
        Specified by:
        getBGPMap in interface KuwaibaSoapWebService
        Parameters:
        mappedBgpLinksIds - BGPLinks that are already mapped, it can be an empty array if nothing is mapped of if the whole map should be generated again.
        sessionId - The session token
        Returns:
        A list of BGPlinks with their endPoints(ports) and the CommunicationsElements parents of the ports
        Throws:
        ServerSideException - If the structure is invalid, or the process definition could not be found or one of the properties is malformed or have an unexpected name
      • createOSPView

        public long createOSPView​(String name,
                                  String description,
                                  byte[] content,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Creates an Outside Plant View
        Specified by:
        createOSPView in interface KuwaibaSoapWebService
        Parameters:
        name - The name of the new view
        description - The description of the new view
        content - The XML document with the contents of the view. The format of the XML document is consistent with the other views
        sessionId - Session token
        Returns:
        The id of the newly created view
        Throws:
        ServerSideException - If the name is empty.
      • updateOSPView

        public void updateOSPView​(long viewId,
                                  String name,
                                  String description,
                                  byte[] content,
                                  String sessionId)
                           throws ServerSideException
        Description copied from interface: KuwaibaSoapWebService
        Updates an existing OSP view
        Specified by:
        updateOSPView in interface KuwaibaSoapWebService
        Parameters:
        viewId - The id of the view
        name - The new name of the view. Null if to remain unchanged
        description - The new description of the view. Null if to remain unchanged
        content - The new content of the view. Null if to remain unchanged
        sessionId - The session token
        Throws:
        ServerSideException - If the view could not be found or if the new name (if applicable) is empty
      • getUserNameFromSession

        public String getUserNameFromSession​(String sessionId)
        Finds the user name using the session Id
        Parameters:
        sessionId - The sessionId
        Returns:
        The username or null of the session could not be found