Interface BuildAgentInit

    • Method Detail

      • restoreAgent

        boolean restoreAgent()
        Restores this agent data from the database.
        Returns:
        true if agent was in the database and its status was restored and false if this agent is new
        Throws:
        UnsupportedOperationException - if this agent does not support restoring from the database
      • setId

        void setId​(int id)
      • setAgentTypeId

        void setAgentTypeId​(int agentTypeId)
        Set agent type id to the instance of the agent.
        Parameters:
        agentTypeId - new type id.
      • setAuthorizationToken

        void setAuthorizationToken​(@NotNull
                                   String agentAuthorizationToken)
      • generateUniqueAgentAuthorizationToken

        void generateUniqueAgentAuthorizationToken()
        Generates new agent authorization token for this agent. It is guaranteed that the new authorization token is unique among the all agents in the database.
      • initEnabled

        void initEnabled​(boolean enabled)
        Initializes enabled status in agent
        Parameters:
        enabled - true if agent is enabled
      • initAuthorized

        void initAuthorized​(boolean authorized)
        Initializes authorized status in agent
        Parameters:
        enabled - true if agent is authorized
      • initAgentTypeId

        void initAgentTypeId​(int agentTypeId)
        Initializes agent type id in agent