Class NodeSupport

  • All Implemented Interfaces:
    IFrameworkNodes

    public class NodeSupport
    extends java.lang.Object
    implements IFrameworkNodes
    Created by greg on 2/20/15.
    • Constructor Detail

      • NodeSupport

        public NodeSupport()
    • Method Detail

      • getFrameworkNodeHostname

        public java.lang.String getFrameworkNodeHostname()
        Gets the value of "framework.server.hostname" property
        Specified by:
        getFrameworkNodeHostname in interface IFrameworkNodes
        Returns:
        Returns value of framework.server.hostname property
      • getFrameworkNodeName

        public java.lang.String getFrameworkNodeName()
        Gets the value of "framework.server.name" property
        Specified by:
        getFrameworkNodeName in interface IFrameworkNodes
        Returns:
        Returns value of framework.server.name property
      • getOsFamily

        public static java.lang.String getOsFamily()
      • filterAuthorizedNodes

        public INodeSet filterAuthorizedNodes​(java.lang.String project,
                                              java.util.Set<java.lang.String> actions,
                                              INodeSet unfiltered,
                                              com.dtolabs.rundeck.core.authorization.AuthContext authContext)
        Specified by:
        filterAuthorizedNodes in interface IFrameworkNodes
        Parameters:
        project - project name
        actions - action set
        unfiltered - nodes
        authContext - authoriziation
        Returns:
        the nodeset consisting only of the input nodes where the specified actions are all authorized
      • getNodeAuthResource

        public java.util.HashMap<java.lang.String,​java.lang.String> getNodeAuthResource​(INodeEntry iNodeEntry)
      • isLocalNode

        public boolean isLocalNode​(INodeDesc node)
        Return true if the node is the local framework node. Compares the (logical) node names of the nodes after eliding any embedded 'user@' parts.
        Specified by:
        isLocalNode in interface IFrameworkNodes
        Parameters:
        node - the node
        Returns:
        true if the node's name is the same as the framework's node name