public class ServerConfigHandler extends BaseHandler
VALID
Constructor and Description |
---|
ServerConfigHandler() |
Modifier and Type | Method and Description |
---|---|
int |
addChannels(User loggedInUser,
java.util.List<java.lang.Number> serverIds,
java.util.List<java.lang.String> configChannelLabels,
boolean addToTop)
Given a list of servers and configuration channels,
this method inserts the configuration channels to either the top or
the bottom (whichever you specify) of a system's subscribed
configuration channels list.
|
ConfigRevision |
createOrUpdatePath(User loggedInUser,
java.lang.Integer sid,
java.lang.String path,
boolean isDir,
java.util.Map<java.lang.String,java.lang.Object> data,
boolean commitToLocal)
Creates a NEW path(file/directory) with the given path or updates an existing path
with the given contents in a given server.
|
ConfigRevision |
createOrUpdateSymlink(User loggedInUser,
java.lang.Integer sid,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object> data,
boolean commitToLocal)
Creates a NEW symbolic link with the given path or updates an existing path
with the given target_path in a given server.
|
int |
deleteFiles(User loggedInUser,
java.lang.Integer sid,
java.util.List<java.lang.String> paths,
boolean deleteFromLocal)
Removes a list of paths from a local or sandbox channel of a server..
|
int |
deployAll(User loggedInUser,
java.util.List<java.lang.Number> serverIds,
java.util.Date date)
Schedules a deploy action for all the configuration files
of a given list of servers.
|
java.util.List<ConfigChannel> |
listChannels(User loggedInUser,
java.lang.Integer sid)
List all the global channels associated to a system
in the order of their ranking.
|
java.util.List<ConfigFileNameDto> |
listFiles(User loggedInUser,
java.lang.Integer sid,
boolean listLocal)
List files in a given server
|
java.util.List<ConfigRevision> |
lookupFileInfo(User loggedInUser,
java.lang.Integer sid,
java.util.List<java.lang.String> paths,
boolean searchLocal)
Given a list of paths and a server the method returns details about the latest
revisions of the paths.
|
int |
removeChannels(User loggedInUser,
java.util.List<java.lang.Number> serverIds,
java.util.List<java.lang.String> configChannelLabels)
removes selected channels from list of config channels provided
for a given list of servers.
|
int |
setChannels(User loggedInUser,
java.util.List<java.lang.Number> serverIds,
java.util.List<java.lang.String> configChannelLabels)
replaces the existing set of config channels for a given
list of servers.
|
ensureConfigAdmin, ensureOrgAdmin, ensureOrgOrConfigAdmin, ensureSatAdmin, ensureSystemGroupAdmin, ensureUserRole, getLoggedInUser, invoke, providesAuthentication, setEntityAttribute, validateClientCertificate, validateEntitlements, validateMap, verifyOrgExists
public java.util.List<ConfigFileNameDto> listFiles(User loggedInUser, java.lang.Integer sid, boolean listLocal)
loggedInUser
- The current usersid
- the server idlistLocal
- true if a list of paths in local override is desired
false if list of paths in sandbox channel is desiredpublic ConfigRevision createOrUpdatePath(User loggedInUser, java.lang.Integer sid, java.lang.String path, boolean isDir, java.util.Map<java.lang.String,java.lang.Object> data, boolean commitToLocal)
loggedInUser
- The current usersid
- the server id.path
- the path of the given text file.isDir
- true if this is a directory path, false if its to be a file pathdata
- a map containing properties pertaining to the given path..
for directory paths - 'data' will hold values for ->
owner, group, permissions
for file paths - 'data' will hold values for->
contents, owner, group, permissions, macro-start-delimiter, macro-end-delimitercommitToLocal
- true if we want to commit the file to
the server's local channel false if we want to commit it to sandbox.public ConfigRevision createOrUpdateSymlink(User loggedInUser, java.lang.Integer sid, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object> data, boolean commitToLocal)
loggedInUser
- The current usersid
- the server id.path
- the path of the given text file.data
- a map containing properties pertaining to the given path..
'data' will hold values for ->
target_paths, selinux_ctxcommitToLocal
- true if we want to commit the file to
the server's local channel false if we want to commit it to sandbox.public java.util.List<ConfigRevision> lookupFileInfo(User loggedInUser, java.lang.Integer sid, java.util.List<java.lang.String> paths, boolean searchLocal)
loggedInUser
- The current usersid
- the server idpaths
- a list of paths to examine.searchLocal
- true look at local overrides, false
to look at sandbox overridespublic int deleteFiles(User loggedInUser, java.lang.Integer sid, java.util.List<java.lang.String> paths, boolean deleteFromLocal)
loggedInUser
- The current usersid
- the server id to remove the files from..paths
- the list of paths to delete.deleteFromLocal
- true if we want to delete form local channel
false if we want to delete from sandbox..public int deployAll(User loggedInUser, java.util.List<java.lang.Number> serverIds, java.util.Date date)
loggedInUser
- The current userserverIds
- list of IDs of the server to schedule the deploy actiondate
- date of the deploy action..public java.util.List<ConfigChannel> listChannels(User loggedInUser, java.lang.Integer sid)
loggedInUser
- The current usersid
- a system idpublic int addChannels(User loggedInUser, java.util.List<java.lang.Number> serverIds, java.util.List<java.lang.String> configChannelLabels, boolean addToTop)
loggedInUser
- The current userserverIds
- a list of ids of servers to add the configuration channels to.configChannelLabels
- set of configuration channels labelsaddToTop
- if true inserts the configuration channels list to
the top of the configuration channels list of a serverpublic int setChannels(User loggedInUser, java.util.List<java.lang.Number> serverIds, java.util.List<java.lang.String> configChannelLabels)
loggedInUser
- The current userserverIds
- a list of ids of servers to change the config files for..configChannelLabels
- sets channels labelspublic int removeChannels(User loggedInUser, java.util.List<java.lang.Number> serverIds, java.util.List<java.lang.String> configChannelLabels)
loggedInUser
- The current userserverIds
- the list of server ids.configChannelLabels
- sets channels labels