Class DelegateACLFileManager

    • Constructor Detail

      • DelegateACLFileManager

        public DelegateACLFileManager()
    • Method Detail

      • getValidator

        public com.dtolabs.rundeck.core.authorization.providers.BaseValidator getValidator()
        Specified by:
        getValidator in interface ACLFileManager
      • storePolicyFile

        public long storePolicyFile​(java.lang.String fileName,
                                    java.io.InputStream input)
                             throws java.io.IOException
        Description copied from interface: ACLFileManager
        Store a system policy file
        Specified by:
        storePolicyFile in interface ACLFileManager
        Parameters:
        fileName - name without path
        input - input stream
        Returns:
        size of bytes stored
        Throws:
        java.io.IOException
      • deletePolicyFile

        public boolean deletePolicyFile​(java.lang.String fileName)
                                 throws java.io.IOException
        Description copied from interface: ACLFileManager
        Delete a policy file
        Specified by:
        deletePolicyFile in interface ACLFileManager
        Returns:
        true if successful
        Throws:
        java.io.IOException
      • storePolicyFileContents

        public long storePolicyFileContents​(java.lang.String fileName,
                                            java.lang.String fileText)
                                     throws java.io.IOException
        Description copied from interface: ACLFileManager
        Store a system policy file
        Specified by:
        storePolicyFileContents in interface ACLFileManager
        Parameters:
        fileName - name without path
        fileText - contents
        Returns:
        size of bytes stored
        Throws:
        java.io.IOException
      • getAclPolicy

        public AclPolicyFile getAclPolicy​(java.lang.String fileName)
        Description copied from interface: ACLFileManager
        Retrieve a system policy
        Specified by:
        getAclPolicy in interface ACLFileManager
        Parameters:
        fileName - name without path
        Returns:
        definition
      • getPolicyFileContents

        public java.lang.String getPolicyFileContents​(java.lang.String fileName)
                                               throws java.io.IOException
        Specified by:
        getPolicyFileContents in interface ACLFileManager
        Parameters:
        fileName - name of policy file, without path
        Returns:
        text contents of the policy file
        Throws:
        java.io.IOException
      • loadPolicyFileContents

        public long loadPolicyFileContents​(java.lang.String fileName,
                                           java.io.OutputStream outputStream)
                                    throws java.io.IOException
        Description copied from interface: ACLFileManager
        Load content to output stream
        Specified by:
        loadPolicyFileContents in interface ACLFileManager
        Parameters:
        fileName - name of policy file, without path
        Returns:
        length of output
        Throws:
        java.io.IOException
      • existsPolicyFile

        public boolean existsPolicyFile​(java.lang.String file)
        Specified by:
        existsPolicyFile in interface ACLFileManager
        Parameters:
        file - name without path
        Returns:
        true if the policy file with the given name exists
      • validatePolicyFile

        public com.dtolabs.rundeck.core.authorization.RuleSetValidation<com.dtolabs.rundeck.core.authorization.providers.PolicyCollection> validatePolicyFile​(java.lang.String fname)
                                                                                                                                                       throws java.io.IOException
        Specified by:
        validatePolicyFile in interface ACLFileManager
        Throws:
        java.io.IOException
      • listStoredPolicyFiles

        public java.util.List<java.lang.String> listStoredPolicyFiles()
        Description copied from interface: ACLFileManager
        List the system aclpolicy file names, not including the dir path
        Specified by:
        listStoredPolicyFiles in interface ACLFileManager