@Component public class HubProjectImpl extends java.lang.Object implements HubProject
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENTITY_CONFIG_DIR |
protected org.slf4j.Logger |
logger |
static java.lang.String |
MODULES_DIR |
static java.lang.String |
USER_SCHEMAS_DIR |
HUB_CONFIG_DIR, PATH_PREFIX, USER_CONFIG_DIR
Constructor and Description |
---|
HubProjectImpl() |
Modifier and Type | Method and Description |
---|---|
void |
createProject(java.lang.String projectDirString) |
void |
exportProject(java.io.File location)
Exports the project content to disk
|
java.nio.file.Path |
getCustomMappingFunctionsDir() |
java.nio.file.Path |
getCustomModuleDir(java.lang.String stepName,
java.lang.String stepType) |
java.nio.file.Path |
getCustomModulesDir()
Gets the path for the custom modules directory
|
java.nio.file.Path |
getEntityConfigDir()
Gets the path for the entity's config directory
|
java.nio.file.Path |
getEntityDatabaseDir()
Gets the path for the entity database directory
|
java.nio.file.Path |
getEntityDir(java.lang.String entityName)
Deprecated.
|
java.nio.file.Path |
getFlowsDir()
Gets the path for the flows directory
|
java.nio.file.Path |
getHubConfigDir()
Gets the path for the hub's config directory
|
java.nio.file.Path |
getHubDatabaseDir()
Gets the path for the hub's database directory
|
java.nio.file.Path |
getHubEntitiesDir()
Gets the path for the hub entities directory
|
java.nio.file.Path |
getHubMappingsDir()
Gets the path for the hub mappings directory
|
java.lang.String |
getHubModulesDeployTimestampFile() |
java.nio.file.Path |
getHubPluginsDir()
Gets the path for the hub plugins directory
|
java.nio.file.Path |
getHubSecurityDir()
Gets the path for the hub's security directory
|
java.nio.file.Path |
getHubServersDir()
Gets the path for the hub servers directory
|
java.nio.file.Path |
getHubStagingModulesDir()
Gets the path for the hub staging modules
|
java.nio.file.Path |
getHubTriggersDir()
Gets the path for the hub's triggers directory
|
java.nio.file.Path |
getLegacyHubEntitiesDir()
Gets the legacy path for the hub entities directory
|
java.nio.file.Path |
getLegacyHubMappingsDir()
Gets the legacy path for the hub mappings directory
|
java.nio.file.Path |
getLegacyMappingDir(java.lang.String mappingName) |
java.nio.file.Path |
getMappingDir(java.lang.String mappingName) |
java.nio.file.Path |
getModulesDir()
Gets the path for the modules directory
|
java.nio.file.Path |
getProjectDir()
Returns the base directory for this project
|
java.lang.String |
getProjectDirString()
Gets the string used to originally make the project
|
java.nio.file.Path |
getStepDefinitionsDir()
Gets the path for the hub step-definitions directory
|
java.nio.file.Path |
getStepsDirByType(StepDefinition.StepDefinitionType type)
Gets the path for the hub step directory by step type
|
java.nio.file.Path |
getUserConfigDir()
Gets the path for the user config directory
|
java.nio.file.Path |
getUserDatabaseDir()
Gets the path for the user database directory
|
java.nio.file.Path |
getUserFinalModulesDir()
Gets the path for the user final modules
|
java.lang.String |
getUserModulesDeployTimestampFile() |
java.nio.file.Path |
getUserSchemasDir()
Gets the path for the user schemas directory
|
java.nio.file.Path |
getUserSecurityDir()
Gets the path for the user security directory
|
java.nio.file.Path |
getUserServersDir()
Gets the path for the user servers directory
|
java.nio.file.Path |
getUserStagingModulesDir()
Gets the path for the user staging modules
|
protected boolean |
hasEmptyRangeElementIndexArray(com.fasterxml.jackson.databind.node.ObjectNode db) |
void |
init(java.util.Map<java.lang.String,java.lang.String> customTokens)
Initializes a directory as a hub project directory.
|
boolean |
isInitialized()
Checks if the project has been initialized or not
|
protected void |
removeEmptyRangeElementIndexArrayFromFinalDatabaseFile()
This method uses warn-level log messages to ensure they appear when upgrading a project via Gradle.
|
void |
setUserModulesDeployTimestampFile(java.lang.String userModulesDeployTimestampFile) |
protected void |
upgradeFlows() |
void |
upgradeProject()
Performs an upgrade to a pre-4.0 project by copying folders
to their new positions as defined in hubproject.
|
public static final java.lang.String ENTITY_CONFIG_DIR
public static final java.lang.String MODULES_DIR
public static final java.lang.String USER_SCHEMAS_DIR
protected final org.slf4j.Logger logger
public java.lang.String getProjectDirString()
HubProject
getProjectDirString
in interface HubProject
public void createProject(java.lang.String projectDirString)
createProject
in interface HubProject
public java.nio.file.Path getHubPluginsDir()
HubProject
getHubPluginsDir
in interface HubProject
public java.nio.file.Path getStepDefinitionsDir()
HubProject
getStepDefinitionsDir
in interface HubProject
public java.nio.file.Path getStepsDirByType(StepDefinition.StepDefinitionType type)
HubProject
getStepsDirByType
in interface HubProject
type
- - a Step typepublic java.nio.file.Path getHubEntitiesDir()
HubProject
getHubEntitiesDir
in interface HubProject
public java.nio.file.Path getHubMappingsDir()
HubProject
getHubMappingsDir
in interface HubProject
public java.nio.file.Path getLegacyHubEntitiesDir()
HubProject
getLegacyHubEntitiesDir
in interface HubProject
public java.nio.file.Path getLegacyHubMappingsDir()
HubProject
getLegacyHubMappingsDir
in interface HubProject
public java.nio.file.Path getHubConfigDir()
HubProject
getHubConfigDir
in interface HubProject
public java.nio.file.Path getHubDatabaseDir()
HubProject
getHubDatabaseDir
in interface HubProject
public java.nio.file.Path getHubServersDir()
HubProject
getHubServersDir
in interface HubProject
public java.nio.file.Path getHubSecurityDir()
HubProject
getHubSecurityDir
in interface HubProject
public java.nio.file.Path getHubTriggersDir()
HubProject
getHubTriggersDir
in interface HubProject
public java.nio.file.Path getUserConfigDir()
HubProject
getUserConfigDir
in interface HubProject
public java.nio.file.Path getUserSecurityDir()
HubProject
getUserSecurityDir
in interface HubProject
public java.nio.file.Path getUserDatabaseDir()
HubProject
getUserDatabaseDir
in interface HubProject
public java.nio.file.Path getUserSchemasDir()
HubProject
getUserSchemasDir
in interface HubProject
public java.nio.file.Path getUserServersDir()
HubProject
getUserServersDir
in interface HubProject
public java.nio.file.Path getEntityConfigDir()
HubProject
getEntityConfigDir
in interface HubProject
public java.nio.file.Path getEntityDatabaseDir()
HubProject
getEntityDatabaseDir
in interface HubProject
public java.nio.file.Path getFlowsDir()
HubProject
getFlowsDir
in interface HubProject
public java.nio.file.Path getHubStagingModulesDir()
HubProject
getHubStagingModulesDir
in interface HubProject
public java.nio.file.Path getUserStagingModulesDir()
HubProject
getUserStagingModulesDir
in interface HubProject
public java.nio.file.Path getModulesDir()
HubProject
getModulesDir
in interface HubProject
public java.nio.file.Path getUserFinalModulesDir()
HubProject
getUserFinalModulesDir
in interface HubProject
public java.nio.file.Path getCustomModulesDir()
HubProject
getCustomModulesDir
in interface HubProject
public java.nio.file.Path getCustomMappingFunctionsDir()
getCustomMappingFunctionsDir
in interface HubProject
public boolean isInitialized()
HubProject
isInitialized
in interface HubProject
public void init(java.util.Map<java.lang.String,java.lang.String> customTokens)
HubProject
init
in interface HubProject
customTokens
- - some custom tokens to start withpublic void upgradeProject() throws java.io.IOException
HubProject
upgradeProject
in interface HubProject
java.io.IOException
- if problem happens with the on-disk project.public void exportProject(java.io.File location)
HubProject
exportProject
in interface HubProject
protected void upgradeFlows()
protected void removeEmptyRangeElementIndexArrayFromFinalDatabaseFile()
protected boolean hasEmptyRangeElementIndexArray(com.fasterxml.jackson.databind.node.ObjectNode db)
public java.lang.String getHubModulesDeployTimestampFile()
getHubModulesDeployTimestampFile
in interface HubProject
public java.lang.String getUserModulesDeployTimestampFile()
getUserModulesDeployTimestampFile
in interface HubProject
public void setUserModulesDeployTimestampFile(java.lang.String userModulesDeployTimestampFile)
setUserModulesDeployTimestampFile
in interface HubProject
@Deprecated public java.nio.file.Path getEntityDir(java.lang.String entityName)
getEntityDir
in interface HubProject
public java.nio.file.Path getMappingDir(java.lang.String mappingName)
getMappingDir
in interface HubProject
public java.nio.file.Path getLegacyMappingDir(java.lang.String mappingName)
getLegacyMappingDir
in interface HubProject
public java.nio.file.Path getCustomModuleDir(java.lang.String stepName, java.lang.String stepType)
getCustomModuleDir
in interface HubProject
public java.nio.file.Path getProjectDir()
HubProject
getProjectDir
in interface HubProject