public class EnvironmentSettings
extends java.lang.Object
| Constructor and Description |
|---|
EnvironmentSettings(EntityStore store)
Create an EnvironmentSettings from an entity store.
|
| Modifier and Type | Method and Description |
|---|---|
Entity |
addEnviromentSetting(Entity entity,
java.lang.String fieldname,
int index)
Add a new environmentalized field for an entity.
|
java.util.Map<ESPK,Entity> |
applyEnvironmentSpecificValues()
Apply the environment values in the env group settings component store to the store,
i.e.
|
ESPK |
findEnvironmentalizedEntity(Entity entity)
Find an EnvironmentalizedEntity relating to an Entity in the entity store.
|
java.lang.String |
getDisplayNameForPPK(ESPK pk)
Used by promotion script to display user-friendly identifier for a string portable ESPK
|
java.lang.String |
getDisplayNameForPPK(java.lang.String ppk)
Used by promotion script to display user-friendly identifier for a string portable ESPK
|
EntityStore |
getEntityStoreWithEnvSettingsApplied()
Generate an entity store with environment-specific settings applied as contained
in the env group settings store represented by this class.
|
ESPK |
getEnvironmentalizedEntitiesPk(EntityStore store)
Get the PK of the EnvironmentalizedEntities in the entiity store.
|
java.lang.Object |
getEnvironmentSettingValue(Entity envFieldEntity)
Called by promotion script/Policy Studio when an existing environment-specific
value must be displayed to user so they can decide to override or not.
|
java.lang.String |
getEnvironmentSettingValueAsString(Entity envFieldEntity)
Called by promotion script when an existing environment-specific
value must be displayed to user so they can decide to override or not.
|
EnvironmentalizedEntities |
getEnvSettings()
Get the environmentalized settings.
|
com.vordel.common.crypto.PasswordCipher |
getPasswordCipher()
Get the password cipher
|
java.util.List<ESPK> |
getPossibleESPKValuesForReference(Entity entityToEnvironmentalize,
Entity envFieldEntity)
Used by promotion script to get a list of portable ESPKs that may be used as values
for references, e.g.
|
java.util.List<java.lang.String> |
getPossibleStringValuesForReference(Entity entityToEnvironmentalize,
Entity envFieldEntity)
Used by promotion script to get a list of portable ESPKs (as strings) that may be used as values
for references, e.g.
|
java.lang.String |
getReferenceType(Entity entityToEnvironmentalize,
Entity envFieldEntity) |
EntityStore |
getStore()
Get the entity store.
|
boolean |
hasEnvironmentSetting(Entity entity,
java.lang.String fieldname,
int index)
Determines whether an environmentalized field already exists.
|
java.util.Map<Entity,java.util.Collection<Entity>> |
interpretEnvSettingsForStore()
Generate a map with a key that is an entity in the server's main entity store, and the value
is a list of EnvironmentalizedField entities in the env settings component store that apply
to that entity in the server's main entity store.
|
boolean |
isReferenceField(Entity entityToEnvironmentalize,
Entity envFieldEntity)
Returns true if the EnvironmentalizedField refers to a reference field in the
server entity store.
|
void |
mergeTemplateEnvSettings(EntityStore policyArchiveStore)
Used by
DeploymentArchive constructor that takes a
PolicyArchive and EnvironmentArchive
as parameters. |
void |
removeEnviromentalizedEntity(Entity envEntity)
Remove all env settings for a particular entity.
|
void |
removeEnviromentSetting(Entity entity,
java.lang.String fieldname,
int index)
Removes an environmentalized field from an entity.
|
void |
removeEnvSettingValues()
This method removes the values from the EnvSettingsStore.
|
void |
setEnvironmentSettingValue(Entity envFieldEntity,
java.lang.Object value)
Called by promotion script/Policy Studio when an environment-specific
value entered by user must be saved to the EnvSettingsStore.xml.
|
void |
setEnvironmentSettingValueAsString(Entity envFieldEntity,
java.lang.String value)
Called by promotion script when an environment-specific
value entered by user must be saved to the EnvSettingsStore.xml.
|
void |
setPassphrase(java.lang.String passphrase)
Set the passphrase for encrypting data in EnvGroupSettings.xml entity store.
|
void |
upgrade()
This method is run *after* an upgrade has completed.
|
public EnvironmentSettings(EntityStore store) throws EntityStoreException
store - The federated entity store containing the EnvSettingsStore.xml entity store,
or in some cases the EnvSettingsStore.xml entity storeEntityStoreExceptionpublic EntityStore getStore()
public void setPassphrase(java.lang.String passphrase)
passphrase - The passphrasepublic com.vordel.common.crypto.PasswordCipher getPasswordCipher()
public Entity addEnviromentSetting(Entity entity, java.lang.String fieldname, int index) throws EntityStoreException
entity - The entity that we are adding an environmentalized field tofieldname - The field name of the field in the entity being environmentalizedindex - The index of the field being environmentalized. For multi-valued fields this may be > 0EntityStoreExceptionpublic void removeEnviromentSetting(Entity entity, java.lang.String fieldname, int index) throws EntityStoreException
entity - The entity that we are removing the environmentalized field fromfieldname - The field name of the field in the entity we no longer wish to environmetalizeindex - The index of the field. For multi-valued fields this may be > 0EntityStoreExceptionpublic boolean hasEnvironmentSetting(Entity entity, java.lang.String fieldname, int index) throws EntityStoreException
entity - The entity whose field we want to checkfieldname - The field name of the entity we want to checkEntityStoreExceptionpublic void mergeTemplateEnvSettings(EntityStore policyArchiveStore) throws java.io.IOException, EntityStoreException
DeploymentArchive constructor that takes a
PolicyArchive and EnvironmentArchive
as parameters.
Used by Configuration Studio/script at promotion time when a user opens a
v2.pol file (new from downstream) and a v1.env file (from last deployment
in current environment).
The EnvSettingsStore.xml in the store wrapped by this class is merged with
the one in the policyArchiveStore as follows:-
policyArchiveStore - The federated store from the policy archive.java.io.IOExceptionEntityStoreExceptionpublic void removeEnvSettingValues()
throws EntityStoreException
java.io.IOExceptionEntityStoreExceptionpublic java.util.Map<ESPK,Entity> applyEnvironmentSpecificValues() throws EntityStoreException
EntityStoreExceptionpublic java.util.Map<Entity,java.util.Collection<Entity>> interpretEnvSettingsForStore() throws EntityStoreException
EntityStoreExceptionpublic java.lang.String getEnvironmentSettingValueAsString(Entity envFieldEntity) throws EntityStoreException, java.security.GeneralSecurityException
envFieldEntity - The EnvironmentalizedField entity in the EnvSettingsStore.xml that holds the
field whose value we are getting.EntityStoreExceptionjava.security.GeneralSecurityExceptionpublic java.lang.Object getEnvironmentSettingValue(Entity envFieldEntity) throws EntityStoreException, java.security.GeneralSecurityException
envFieldEntity - The EnvironmentalizedField entity in the EnvSettingsStore.xml that holds the
field whose value we are getting.EntityStoreExceptionjava.security.GeneralSecurityExceptionpublic void setEnvironmentSettingValueAsString(Entity envFieldEntity, java.lang.String value) throws EntityStoreException, java.security.GeneralSecurityException
envFieldEntity - The EnvironmentalizedField entity in the EnvSettingsStore.xml that holds the
field whose value we are setting.value - The value to setEntityStoreExceptionjava.security.GeneralSecurityExceptionpublic void setEnvironmentSettingValue(Entity envFieldEntity, java.lang.Object value) throws EntityStoreException, java.security.GeneralSecurityException
envFieldEntity - The EnvironmentalizedField entity in the EnvSettingsStore.xml that holds the
field whose value we are setting.value - The value to setEntityStoreExceptionjava.security.GeneralSecurityExceptionpublic boolean isReferenceField(Entity entityToEnvironmentalize, Entity envFieldEntity)
entityToEnvironmentalize - The entity that is being environmentalized in main server config.envFieldEntity - The EnvironmentalizedField entity in the EnvSettingsStore.xml that holds the env-specific value.public java.lang.String getReferenceType(Entity entityToEnvironmentalize, Entity envFieldEntity)
public java.util.List<ESPK> getPossibleESPKValuesForReference(Entity entityToEnvironmentalize, Entity envFieldEntity) throws EntityStoreException
entityToEnvironmentalize - The entity that is being environmentalized in main server config.envFieldEntity - The EnvironmentalizedField entity in the EnvSettingsStore.xml that holds the env-specific value.EntityStoreExceptionpublic java.util.List<java.lang.String> getPossibleStringValuesForReference(Entity entityToEnvironmentalize, Entity envFieldEntity) throws EntityStoreException
entityToEnvironmentalize - The entity that is being environmentalized in main server config.envFieldEntity - The EnvironmentalizedField entity in the EnvSettingsStore.xml that holds the env-specific value.EntityStoreExceptionpublic java.lang.String getDisplayNameForPPK(java.lang.String ppk)
throws EntityStoreException
ppk - string portable ESPKEntityStoreExceptionpublic java.lang.String getDisplayNameForPPK(ESPK pk) throws EntityStoreException
pk - The ESPKEntityStoreExceptionpublic EntityStore getEntityStoreWithEnvSettingsApplied() throws EntityStoreException
EntityStoreExceptionpublic EnvironmentalizedEntities getEnvSettings() throws EntityStoreException
EntityStoreExceptionpublic void upgrade()
throws EntityStoreException,
java.security.GeneralSecurityException
EntityStoreExceptionjava.security.GeneralSecurityExceptionpublic void removeEnviromentalizedEntity(Entity envEntity) throws EntityStoreException
envEntity - The EnvironmentalizedEntity to removeEntityStoreExceptionpublic ESPK getEnvironmentalizedEntitiesPk(EntityStore store) throws EntityStoreException
store - The entity storeEntityStoreExceptionpublic ESPK findEnvironmentalizedEntity(Entity entity) throws EntityStoreException
entity - The entityEntityStoreException
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel