Class InventoryService

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

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

    InventoryService class.

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

      • InventoryService

        public InventoryService()

        Constructor for InventoryService.

    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception

        afterPropertiesSet

        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        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​(String deviceName)

        checkRancidNode

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

        public Map<String,​Object> getRancidNodeBase​(int nodeid)

        getRancidNodeBase

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

        public Map<String,​Object> getRancidNode​(int nodeid)

        getRancidNode

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

        public Map<String,​Object> getBuckets​(int nodeid)

        getBuckets

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

        public Map<String,​Object> getRancidNodeList​(int nodeid)

        getRancidNodeList

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

        public Map<String,​Object> getRancidNodeList​(int nodeid,
                                                          String group)

        getRancidNodeList

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

        public Map<String,​Object> getInventory​(int nodeid,
                                                     String group,
                                                     String version)

        getInventory

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

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

        getRancidNodeWithCLoginForGroup

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

        public Map<String,​Object> getRancidNodeWithCLogin​(int nodeid,
                                                                boolean adminRole)

        getRancidNodeWithCLogin

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

        public boolean switchStatus​(String groupName,
                                    String deviceName)

        switchStatus

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

        public boolean deleteNodeOnRouterDb​(String groupName,
                                            String deviceName)

        deleteNodeOnRouterDb

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

        public boolean updateNodeOnRouterDb​(String groupName,
                                            String deviceName,
                                            String deviceType,
                                            String status,
                                            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​(String groupName,
                                            String deviceName,
                                            String deviceType,
                                            String status,
                                            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.
      • deleteClogin

        public boolean deleteClogin​(String deviceName)

        deleteClogin

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

        public boolean deleteBucketItem​(String bucket,
                                        String filename)

        deleteBucketItem

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

        public boolean deleteBucket​(String bucket)

        deleteBucket

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

        public boolean createBucket​(String bucket)

        createBucket

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