Class InventoryService

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    public class InventoryService
    extends java.lang.Object
    implements org.springframework.beans.factory.InitializingBean

    InventoryService class.

    Since:
    1.8.1
    Version:
    $Id: $
    Author:
    ranger
    • Constructor Summary

      Constructors 
      Constructor Description
      InventoryService()
      Constructor for InventoryService.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()
      afterPropertiesSet
      boolean checkRancidNode​(java.lang.String deviceName)
      checkRancidNode
      boolean checkRWSAlive()
      checkRWSAlive
      boolean createBucket​(java.lang.String bucket)
      createBucket
      boolean createNodeOnRouterDb​(java.lang.String groupName, java.lang.String deviceName, java.lang.String deviceType, java.lang.String status, java.lang.String comment)
      createNodeOnRouterDb
      boolean deleteBucket​(java.lang.String bucket)
      deleteBucket
      boolean deleteBucketItem​(java.lang.String bucket, java.lang.String filename)
      deleteBucketItem
      boolean deleteClogin​(java.lang.String deviceName)
      deleteClogin
      boolean deleteNodeOnRouterDb​(java.lang.String groupName, java.lang.String deviceName)
      deleteNodeOnRouterDb
      java.util.Map<java.lang.String,​java.lang.Object> getBuckets​(int nodeid)
      getBuckets
      java.util.Map<java.lang.String,​java.lang.Object> getInventory​(int nodeid, java.lang.String group, java.lang.String version)
      getInventory
      NodeDao getNodeDao()
      getNodeDao
      java.util.Map<java.lang.String,​java.lang.Object> getRancidNode​(int nodeid)
      getRancidNode
      java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeBase​(int nodeid)
      getRancidNodeBase
      java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeList​(int nodeid)
      getRancidNodeList
      java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeList​(int nodeid, java.lang.String group)
      getRancidNodeList
      java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeWithCLogin​(int nodeid, boolean adminRole)
      getRancidNodeWithCLogin
      java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeWithCLoginForGroup​(int nodeid, java.lang.String group, boolean adminRole)
      getRancidNodeWithCLoginForGroup
      RWSConfig getRwsConfig()
      getRwsConfig
      void setNodeDao​(NodeDao nodeDao)
      setNodeDao
      void setRwsConfig​(RWSConfig rwsConfig)
      setRwsConfig
      boolean switchStatus​(java.lang.String groupName, java.lang.String deviceName)
      switchStatus
      boolean updateClogin​(java.lang.String deviceName, java.lang.String groupName, java.lang.String userID, java.lang.String pass, java.lang.String enPass, java.lang.String loginM, java.lang.String autoE)
      updateClogin
      boolean updateNodeOnRouterDb​(java.lang.String groupName, java.lang.String deviceName, java.lang.String deviceType, java.lang.String status, java.lang.String comment)
      updateNodeOnRouterDb
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InventoryService

        public InventoryService()

        Constructor for InventoryService.

    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception

        afterPropertiesSet

        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        java.lang.Exception - if any.
      • getRwsConfig

        public RWSConfig getRwsConfig()

        getRwsConfig

        Returns:
        a RWSConfig object.
      • setRwsConfig

        public void setRwsConfig​(RWSConfig rwsConfig)

        setRwsConfig

        Parameters:
        rwsConfig - a RWSConfig object.
      • getNodeDao

        public NodeDao getNodeDao()

        getNodeDao

        Returns:
        a NodeDao object.
      • setNodeDao

        public void setNodeDao​(NodeDao nodeDao)

        setNodeDao

        Parameters:
        nodeDao - a NodeDao object.
      • checkRWSAlive

        public boolean checkRWSAlive()

        checkRWSAlive

        Returns:
        a boolean.
      • checkRancidNode

        public boolean checkRancidNode​(java.lang.String deviceName)

        checkRancidNode

        Parameters:
        deviceName - a String object.
        Returns:
        a boolean.
      • getRancidNodeBase

        public java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeBase​(int nodeid)

        getRancidNodeBase

        Parameters:
        nodeid - a int.
        Returns:
        a java$util$Map object.
      • getRancidNode

        public java.util.Map<java.lang.String,​java.lang.Object> getRancidNode​(int nodeid)

        getRancidNode

        Parameters:
        nodeid - a int.
        Returns:
        a java$util$Map object.
      • getBuckets

        public java.util.Map<java.lang.String,​java.lang.Object> getBuckets​(int nodeid)

        getBuckets

        Parameters:
        nodeid - a int.
        Returns:
        a java$util$Map object.
      • getRancidNodeList

        public java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeList​(int nodeid)

        getRancidNodeList

        Parameters:
        nodeid - a int.
        Returns:
        a java$util$Map object.
      • getRancidNodeList

        public java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeList​(int nodeid,
                                                                                        java.lang.String group)

        getRancidNodeList

        Parameters:
        nodeid - a int.
        group - a String object.
        Returns:
        a java$util$Map object.
      • getInventory

        public java.util.Map<java.lang.String,​java.lang.Object> getInventory​(int nodeid,
                                                                                   java.lang.String group,
                                                                                   java.lang.String version)

        getInventory

        Parameters:
        nodeid - a int.
        group - a String object.
        version - a String object.
        Returns:
        a java$util$Map object.
      • getRancidNodeWithCLoginForGroup

        public java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeWithCLoginForGroup​(int nodeid,
                                                                                                      java.lang.String group,
                                                                                                      boolean adminRole)

        getRancidNodeWithCLoginForGroup

        Parameters:
        nodeid - a int.
        group - a String object.
        adminRole - a boolean.
        Returns:
        a java$util$Map object.
      • getRancidNodeWithCLogin

        public java.util.Map<java.lang.String,​java.lang.Object> getRancidNodeWithCLogin​(int nodeid,
                                                                                              boolean adminRole)

        getRancidNodeWithCLogin

        Parameters:
        nodeid - a int.
        adminRole - a boolean.
        Returns:
        a java$util$Map object.
      • switchStatus

        public boolean switchStatus​(java.lang.String groupName,
                                    java.lang.String deviceName)

        switchStatus

        Parameters:
        groupName - a String object.
        deviceName - a String object.
        Returns:
        a boolean.
      • deleteNodeOnRouterDb

        public boolean deleteNodeOnRouterDb​(java.lang.String groupName,
                                            java.lang.String deviceName)

        deleteNodeOnRouterDb

        Parameters:
        groupName - a String object.
        deviceName - a String object.
        Returns:
        a boolean.
      • updateNodeOnRouterDb

        public boolean updateNodeOnRouterDb​(java.lang.String groupName,
                                            java.lang.String deviceName,
                                            java.lang.String deviceType,
                                            java.lang.String status,
                                            java.lang.String comment)

        updateNodeOnRouterDb

        Parameters:
        groupName - a String object.
        deviceName - a String object.
        deviceType - a String object.
        status - a String object.
        comment - a String object.
        Returns:
        a boolean.
      • createNodeOnRouterDb

        public boolean createNodeOnRouterDb​(java.lang.String groupName,
                                            java.lang.String deviceName,
                                            java.lang.String deviceType,
                                            java.lang.String status,
                                            java.lang.String comment)

        createNodeOnRouterDb

        Parameters:
        groupName - a String object.
        deviceName - a String object.
        deviceType - a String object.
        status - a String object.
        comment - a String object.
        Returns:
        a boolean.
      • updateClogin

        public boolean updateClogin​(java.lang.String deviceName,
                                    java.lang.String groupName,
                                    java.lang.String userID,
                                    java.lang.String pass,
                                    java.lang.String enPass,
                                    java.lang.String loginM,
                                    java.lang.String autoE)

        updateClogin

        Parameters:
        deviceName - a String object.
        groupName - a String object.
        userID - a String object.
        pass - a String object.
        enPass - a String object.
        loginM - a String object.
        autoE - a String object.
        Returns:
        a boolean.
      • deleteClogin

        public boolean deleteClogin​(java.lang.String deviceName)

        deleteClogin

        Parameters:
        deviceName - a String object.
        Returns:
        a boolean.
      • deleteBucketItem

        public boolean deleteBucketItem​(java.lang.String bucket,
                                        java.lang.String filename)

        deleteBucketItem

        Parameters:
        bucket - a String object.
        filename - a String object.
        Returns:
        a boolean.
      • deleteBucket

        public boolean deleteBucket​(java.lang.String bucket)

        deleteBucket

        Parameters:
        bucket - a String object.
        Returns:
        a boolean.
      • createBucket

        public boolean createBucket​(java.lang.String bucket)

        createBucket

        Parameters:
        bucket - a String object.
        Returns:
        a boolean.