Package org.rundeck.app.acl
Interface ContextACLManager<T>
-
- All Superinterfaces:
ContextValidator<T>
- All Known Implementing Classes:
BaseContextACLManager
,ContextACLStorageFileManager
public interface ContextACLManager<T> extends ContextValidator<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(T context, ACLFileManagerListener listener)
Receive notification of changesvoid
addListenerMap(java.util.function.Function<T,ACLFileManagerListener> mapping)
Define mapping to add listeners when managers are createdboolean
deletePolicyFile(T context, java.lang.String fileName)
Delete a policy fileboolean
existsPolicyFile(T context, java.lang.String file)
ACLFileManager
forContext(T context)
AclPolicyFile
getAclPolicy(T context, java.lang.String fileName)
Retrieve a system policyjava.lang.String
getPolicyFileContents(T context, java.lang.String fileName)
java.util.List<java.lang.String>
listStoredPolicyFiles(T context)
List the system aclpolicy file names, not including the dir pathlong
loadPolicyFileContents(T context, java.lang.String fileName, java.io.OutputStream outputStream)
Load content to output streamvoid
removeListener(T context, ACLFileManagerListener listener)
Remove a listenerlong
storePolicyFile(T context, java.lang.String fileName, java.io.InputStream input)
Store a system policy filelong
storePolicyFileContents(T context, java.lang.String fileName, java.lang.String fileText)
Store a system policy file-
Methods inherited from interface org.rundeck.app.acl.ContextValidator
validatePolicyFile, validateYamlPolicy
-
-
-
-
Method Detail
-
forContext
ACLFileManager forContext(T context)
-
addListenerMap
void addListenerMap(java.util.function.Function<T,ACLFileManagerListener> mapping)
Define mapping to add listeners when managers are created
-
addListener
void addListener(T context, ACLFileManagerListener listener)
Receive notification of changes
-
removeListener
void removeListener(T context, ACLFileManagerListener listener)
Remove a listener
-
storePolicyFile
long storePolicyFile(T context, java.lang.String fileName, java.io.InputStream input) throws java.io.IOException
Store a system policy file- Parameters:
fileName
- name without pathinput
- input stream- Returns:
- size of bytes stored
- Throws:
java.io.IOException
-
deletePolicyFile
boolean deletePolicyFile(T context, java.lang.String fileName) throws java.io.IOException
Delete a policy file- Returns:
- true if successful
- Throws:
java.io.IOException
-
storePolicyFileContents
long storePolicyFileContents(T context, java.lang.String fileName, java.lang.String fileText) throws java.io.IOException
Store a system policy file- Parameters:
fileName
- name without pathfileText
- contents- Returns:
- size of bytes stored
- Throws:
java.io.IOException
-
getAclPolicy
AclPolicyFile getAclPolicy(T context, java.lang.String fileName)
Retrieve a system policy- Parameters:
fileName
- name without path- Returns:
- definition
-
getPolicyFileContents
java.lang.String getPolicyFileContents(T context, java.lang.String fileName) throws java.io.IOException
- Parameters:
fileName
- name of policy file, without path- Returns:
- text contents of the policy file
- Throws:
java.io.IOException
-
loadPolicyFileContents
long loadPolicyFileContents(T context, java.lang.String fileName, java.io.OutputStream outputStream) throws java.io.IOException
Load content to output stream- Parameters:
fileName
- name of policy file, without path- Returns:
- length of output
- Throws:
java.io.IOException
-
existsPolicyFile
boolean existsPolicyFile(T context, java.lang.String file)
- Parameters:
file
- name without path- Returns:
- true if the policy file with the given name exists
-
listStoredPolicyFiles
java.util.List<java.lang.String> listStoredPolicyFiles(T context)
List the system aclpolicy file names, not including the dir path
-
-