Package org.rundeck.app.acl
Class DelegateACLFileManager
- java.lang.Object
-
- org.rundeck.app.acl.DelegateACLFileManager
-
- All Implemented Interfaces:
ACLFileManager
- Direct Known Subclasses:
ListenableACLFileManager
public class DelegateACLFileManager extends java.lang.Object implements ACLFileManager
-
-
Constructor Summary
Constructors Constructor Description DelegateACLFileManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(ACLFileManagerListener listener)Receive notification of changesbooleandeletePolicyFile(java.lang.String fileName)Delete a policy filebooleanexistsPolicyFile(java.lang.String file)AclPolicyFilegetAclPolicy(java.lang.String fileName)Retrieve a system policyprotected ACLFileManagergetDelegate()java.lang.StringgetPolicyFileContents(java.lang.String fileName)com.dtolabs.rundeck.core.authorization.providers.BaseValidatorgetValidator()java.util.List<java.lang.String>listStoredPolicyFiles()List the system aclpolicy file names, not including the dir pathlongloadPolicyFileContents(java.lang.String fileName, java.io.OutputStream outputStream)Load content to output streamvoidremoveListener(ACLFileManagerListener listener)Remove a listenerlongstorePolicyFile(java.lang.String fileName, java.io.InputStream input)Store a system policy filelongstorePolicyFileContents(java.lang.String fileName, java.lang.String fileText)Store a system policy filecom.dtolabs.rundeck.core.authorization.RuleSetValidation<com.dtolabs.rundeck.core.authorization.providers.PolicyCollection>validatePolicyFile(java.lang.String fname)
-
-
-
Method Detail
-
getValidator
public com.dtolabs.rundeck.core.authorization.providers.BaseValidator getValidator()
- Specified by:
getValidatorin interfaceACLFileManager
-
addListener
public void addListener(ACLFileManagerListener listener)
Description copied from interface:ACLFileManagerReceive notification of changes- Specified by:
addListenerin interfaceACLFileManager
-
removeListener
public void removeListener(ACLFileManagerListener listener)
Description copied from interface:ACLFileManagerRemove a listener- Specified by:
removeListenerin interfaceACLFileManager
-
storePolicyFile
public long storePolicyFile(java.lang.String fileName, java.io.InputStream input) throws java.io.IOExceptionDescription copied from interface:ACLFileManagerStore a system policy file- Specified by:
storePolicyFilein interfaceACLFileManager- Parameters:
fileName- name without pathinput- input stream- Returns:
- size of bytes stored
- Throws:
java.io.IOException
-
deletePolicyFile
public boolean deletePolicyFile(java.lang.String fileName) throws java.io.IOExceptionDescription copied from interface:ACLFileManagerDelete a policy file- Specified by:
deletePolicyFilein interfaceACLFileManager- Returns:
- true if successful
- Throws:
java.io.IOException
-
storePolicyFileContents
public long storePolicyFileContents(java.lang.String fileName, java.lang.String fileText) throws java.io.IOExceptionDescription copied from interface:ACLFileManagerStore a system policy file- Specified by:
storePolicyFileContentsin interfaceACLFileManager- Parameters:
fileName- name without pathfileText- contents- Returns:
- size of bytes stored
- Throws:
java.io.IOException
-
getAclPolicy
public AclPolicyFile getAclPolicy(java.lang.String fileName)
Description copied from interface:ACLFileManagerRetrieve a system policy- Specified by:
getAclPolicyin interfaceACLFileManager- Parameters:
fileName- name without path- Returns:
- definition
-
getPolicyFileContents
public java.lang.String getPolicyFileContents(java.lang.String fileName) throws java.io.IOException- Specified by:
getPolicyFileContentsin interfaceACLFileManager- 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.IOExceptionDescription copied from interface:ACLFileManagerLoad content to output stream- Specified by:
loadPolicyFileContentsin interfaceACLFileManager- 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:
existsPolicyFilein interfaceACLFileManager- 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:
validatePolicyFilein interfaceACLFileManager- Throws:
java.io.IOException
-
listStoredPolicyFiles
public java.util.List<java.lang.String> listStoredPolicyFiles()
Description copied from interface:ACLFileManagerList the system aclpolicy file names, not including the dir path- Specified by:
listStoredPolicyFilesin interfaceACLFileManager
-
getDelegate
protected ACLFileManager getDelegate()
-
-