public class ProjectNodeSupport extends java.lang.Object implements IProjectNodes
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FRAMEWORK_RESOURCES_ALLOWED_URL_PREFIX |
static java.lang.String |
NODES_XML |
static java.lang.String |
PROJECT_RESOURCES_ALLOWED_URL_PREFIX |
static java.lang.String |
PROJECT_RESOURCES_FILE_PROPERTY |
static java.lang.String |
PROJECT_RESOURCES_FILEFORMAT_PROPERTY |
static java.lang.String |
PROJECT_RESOURCES_MERGE_NODE_ATTRIBUTES |
static java.lang.String |
PROJECT_RESOURCES_URL_PROPERTY |
static java.lang.String |
RESOURCES_SOURCE_PROP_PREFIX |
| Constructor and Description |
|---|
ProjectNodeSupport(IRundeckProjectConfig projectConfig,
ResourceFormatGeneratorService resourceFormatGeneratorService,
ResourceModelSourceService resourceModelSourceService) |
| Modifier and Type | Method and Description |
|---|---|
static ResourceModelSource |
asModelSource(IProjectNodes nodes) |
ResourceModelSource |
createCachingSource(ResourceModelSource origin,
java.lang.String ident,
java.lang.String descr,
SourceFactory.CacheType type,
boolean logging) |
INodeSet |
getNodeSet()
Returns the set of nodes for the project
|
static java.lang.String |
getNodesResourceFilePath(IRundeckProject project,
Framework framework) |
IRundeckProjectConfig |
getProjectConfig() |
java.util.ArrayList<java.lang.Exception> |
getResourceModelSourceExceptions() |
java.util.Map<java.lang.String,java.lang.Exception> |
getResourceModelSourceExceptionsMap() |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
listResourceModelConfigurations()
list the configurations of resource model providers.
|
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
listResourceModelConfigurations(java.util.Properties props)
Return a list of resource model configuration
|
void |
updateNodesResourceFile(java.io.File source,
java.lang.String nodesResourceFilePath)
Update the resources file from a source file
|
void |
updateNodesResourceFile(INodeSet nodeset,
java.lang.String nodesResourceFilePath)
Update the resources file given an input Nodes set
|
boolean |
updateNodesResourceFile(java.lang.String nodesResourcesFilePath)
Conditionally update the nodes resources file if a URL source is defined for it and return
true if the update process was invoked and succeeded
|
void |
updateNodesResourceFileFromUrl(java.lang.String providerURL,
java.lang.String username,
java.lang.String password,
java.lang.String nodesResourceFilePath)
Update the nodes resources file from a specific URL, with BASIC authentication as provided or
as defined in the URL's userInfo section.
|
public static final java.lang.String NODES_XML
public static final java.lang.String PROJECT_RESOURCES_URL_PROPERTY
public static final java.lang.String PROJECT_RESOURCES_FILE_PROPERTY
public static final java.lang.String PROJECT_RESOURCES_FILEFORMAT_PROPERTY
public static final java.lang.String RESOURCES_SOURCE_PROP_PREFIX
public static final java.lang.String PROJECT_RESOURCES_MERGE_NODE_ATTRIBUTES
public static final java.lang.String PROJECT_RESOURCES_ALLOWED_URL_PREFIX
public static final java.lang.String FRAMEWORK_RESOURCES_ALLOWED_URL_PREFIX
public ProjectNodeSupport(IRundeckProjectConfig projectConfig, ResourceFormatGeneratorService resourceFormatGeneratorService, ResourceModelSourceService resourceModelSourceService)
public INodeSet getNodeSet()
getNodeSet in interface IProjectNodesINodeSetpublic java.util.ArrayList<java.lang.Exception> getResourceModelSourceExceptions()
getResourceModelSourceExceptions in interface IProjectNodespublic java.util.Map<java.lang.String,java.lang.Exception> getResourceModelSourceExceptionsMap()
getResourceModelSourceExceptionsMap in interface IProjectNodespublic static ResourceModelSource asModelSource(IProjectNodes nodes)
nodes - IProjectNodespublic ResourceModelSource createCachingSource(ResourceModelSource origin, java.lang.String ident, java.lang.String descr, SourceFactory.CacheType type, boolean logging)
logging - origin - origin sourceident - unique identity for this cached source, used in filenamedescr - description of the source, used in logginglogging - if true, log cache accesspublic java.util.List<java.util.Map<java.lang.String,java.lang.Object>> listResourceModelConfigurations()
listResourceModelConfigurations in interface IProjectNodespublic static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> listResourceModelConfigurations(java.util.Properties props)
props - propertiespublic static java.lang.String getNodesResourceFilePath(IRundeckProject project, Framework framework)
public boolean updateNodesResourceFile(java.lang.String nodesResourcesFilePath)
throws UpdateUtils.UpdateException
updateNodesResourceFile in interface IProjectNodesnodesResourcesFilePath - destination file pathUpdateUtils.UpdateException - if an error occurs while trying to update the resources filepublic void updateNodesResourceFileFromUrl(java.lang.String providerURL,
java.lang.String username,
java.lang.String password,
java.lang.String nodesResourceFilePath)
throws UpdateUtils.UpdateException
updateNodesResourceFileFromUrl in interface IProjectNodesproviderURL - URL to retrieve resources file definitionusername - username or nullpassword - or nullnodesResourceFilePath - path of the destination fileUpdateUtils.UpdateException - if an error occurs during the update processpublic void updateNodesResourceFile(INodeSet nodeset, java.lang.String nodesResourceFilePath) throws UpdateUtils.UpdateException
updateNodesResourceFile in interface IProjectNodesnodeset - nodesnodesResourceFilePath - destination file pathUpdateUtils.UpdateException - if an error occurs while trying to update the resources file or generate
nodespublic void updateNodesResourceFile(java.io.File source,
java.lang.String nodesResourceFilePath)
throws UpdateUtils.UpdateException
source - the source fileUpdateUtils.UpdateException - if an error occurs while trying to update the resources filepublic IRundeckProjectConfig getProjectConfig()