Package org.rundeck.app.acl
Class ACLStorageFileManager
- java.lang.Object
-
- org.rundeck.app.acl.ACLStorageFileManager
-
- All Implemented Interfaces:
ACLFileManager
public class ACLStorageFileManager extends java.lang.Object implements ACLFileManager
Provides ACLFileManager backed by a StorageManager, does NOT implement Listener semantics
-
-
Constructor Summary
Constructors Constructor Description ACLStorageFileManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
deletePolicyFile(java.lang.String fileName)
Delete a policy fileboolean
existsPolicyFile(java.lang.String file)
AclPolicyFile
getAclPolicy(java.lang.String fileName)
Retrieve a system policyjava.lang.String
getPolicyFileContents(java.lang.String fileName)
java.util.List<java.lang.String>
listStoredPolicyFiles()
List the system aclpolicy file names, not including the dir pathlong
loadPolicyFileContents(java.lang.String fileName, java.io.OutputStream outputStream)
Load content to output streamlong
storePolicyFile(java.lang.String fileName, java.io.InputStream input)
Store a system policy filelong
storePolicyFileContents(java.lang.String fileName, java.lang.String fileText)
Store a system policy file-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.rundeck.app.acl.ACLFileManager
addListener, getValidator, removeListener, validatePolicyFile
-
-
-
-
Method Detail
-
listStoredPolicyFiles
public java.util.List<java.lang.String> listStoredPolicyFiles()
List the system aclpolicy file names, not including the dir path- Specified by:
listStoredPolicyFiles
in interfaceACLFileManager
-
existsPolicyFile
public boolean existsPolicyFile(java.lang.String file)
- Specified by:
existsPolicyFile
in interfaceACLFileManager
- Parameters:
file
- name without path- Returns:
- true if the policy file with the given name exists
-
getPolicyFileContents
public java.lang.String getPolicyFileContents(java.lang.String fileName) throws java.io.IOException
- Specified by:
getPolicyFileContents
in 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.IOException
Load content to output stream- Specified by:
loadPolicyFileContents
in interfaceACLFileManager
- Parameters:
fileName
- name of policy file, without path- Returns:
- length of output
- 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 interfaceACLFileManager
- Parameters:
fileName
- name without path- Returns:
- definition
-
storePolicyFileContents
public long storePolicyFileContents(java.lang.String fileName, java.lang.String fileText)
Store a system policy file- Specified by:
storePolicyFileContents
in interfaceACLFileManager
- Parameters:
fileName
- name without pathfileText
- contents- Returns:
- size of bytes stored
-
storePolicyFile
public long storePolicyFile(java.lang.String fileName, java.io.InputStream input)
Store a system policy file- Specified by:
storePolicyFile
in interfaceACLFileManager
- Parameters:
fileName
- name without pathinput
- input stream- Returns:
- size of bytes stored
-
deletePolicyFile
public boolean deletePolicyFile(java.lang.String fileName)
Delete a policy file- Specified by:
deletePolicyFile
in interfaceACLFileManager
- Returns:
- true if successful
-
-