public class Config extends java.lang.Object implements ConfigMBean
NAME, TYPE| Constructor and Description |
|---|
Config(ConfigServiceImpl configService, java.lang.String session) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignEnvValues(java.util.Collection<QualifiedEnvValue> envValues)
Sets one or more environment value directly.
|
void |
cloneLocation(Ref sourceLocation, Ref targetLocation, boolean merge)
Clones a given project or folder.
|
void |
cloneResource(Ref ref, Ref newref)
Clones a given resource.
|
void |
createChildResource(Ref parentref, NamedRef childref, java.lang.Object childResourceData)
Creates a resource that is logically contained within a parent resource.
|
byte[] |
createCustomizationFile(java.util.Set<Ref> refs, java.util.Set<java.lang.String> envValueTypes)
Creates a customization file from a set of resources/projects/folder.
|
Ref |
createFolder(Ref projectOrFolderRef, java.lang.String folderName, java.lang.String description)
Creates a folder with the given name under a project or another folder.
|
void |
createLocation(Ref location, java.lang.String description)
creates a location
|
Ref |
createProject(java.lang.String projectName, java.lang.String description)
Creates a project with the given name, and project data.
|
void |
createResource(Ref ref, java.lang.Object resourceData)
Creates a resource with the given reference.
|
void |
customize(java.util.List<Customization> customizations)
This API supports multiple customizations at one place.
|
void |
delete(java.util.Set<Ref> refs)
Deletes the given collection of references.
|
void |
delete(java.util.Set<Ref> refs, java.util.Set<Ref> exclusions)
Deletes the given collection of references.
|
void |
deleteFolder(Ref folderRef)
Deletes the given folder
|
void |
deleteLocation(Ref location)
deletes a particular location
|
void |
deleteProject(java.lang.String projectName)
Deletes the given project
|
void |
deleteResource(Ref ref)
Deletes the given resource
|
boolean |
exists(Ref ref)
Returns true if an entity exists in the project.
|
byte[] |
export(java.util.Collection<Ref> refsToExport, boolean includeDependencies, EncryptionScope escope, char[] passphrase)
Exports the given collection of references on-the-fly and returns bytes that make up the export data.
|
byte[] |
exportProjects(java.util.Collection<Ref> projectrefs, char[] passphrase)
Export resources at the project level.
|
java.util.List<QualifiedEnvValue> |
findEnvValues(EnvValueQuery query)
Searches environment specific values in the domain in a particular session and returns env values that satisfy the criteria constituted by the parameters
|
SnapshotDelta<CanonicalResource,CanonicalDelta> |
getCanonicalDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2)
Returns the delta of canonical values between two snapshots at different dates.
|
SnapshotDelta<CanonicalResource,CanonicalDelta> |
getCanonicalDelta(Snapshot<Digest> source)
Compares the versions and references given in the sourceVersion with the current set of resources and their versions.
|
Snapshot<CanonicalResource> |
getCanonicalSnapshot(RefValueDomain valueDomain, java.util.Date date)
Returns snapshot of canonical values for resources that are in the given value domain as of the given time.
|
java.util.List<ChangeRecord> |
getChangeHistory(Ref ref, ChangeRecord.ChangeHistoryType historyType, int resultSize)
Returns a list of changes, in chronological order, that are performed over the given reference.
|
SessionConflicts |
getConflicts(java.lang.Boolean dummy)
Returns a list of conflicts
|
java.lang.Object |
getDelta(Ref ref1, long version1, Ref ref2, long version2)
Returns the delta (diff) between the two revisions of the given resources.
|
java.util.Set<Ref> |
getDependencies(Ref root)
Returns the collection of references that originate from a component in the tree rooted at the given reference to another component that is outside the tree.
|
java.util.Set<Ref> |
getDependents(Ref root)
Returns the collection of references from components outside the given tree to components that are inside the tree.
|
java.util.Map<Ref,Diagnostics> |
getDiagnostics(java.util.Collection<Ref> refs)
Returns a mapping from resource references to diagnostic objects for these resources.
|
Diagnostics |
getDiagnostics(Ref ref)
Returns the Diagnostics object for the given resource.
|
SnapshotDelta<Digest,Digest> |
getDigestDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2)
Returns the delta of digests between two snapshots at different dates.
|
Snapshot<Digest> |
getDigestSnapshot(RefValueDomain valueDomain, java.util.Date date)
Returns snapshot of Digests for resources that are in the given value domain as of the given time.
|
java.lang.Object |
getEnvValue(Ref ref, java.lang.String envType, java.lang.String location)
returns the environment value with the given type and location in the given resource.
|
java.util.List<EnvValueMetadata> |
getEnvValueMetadata(java.util.Set<java.lang.String> envValueTypes)
returns a Collection of EnvValueMetadata of the respective envValueTypes that are passed.
|
java.util.Set<java.lang.String> |
getEnvValueTypes()
Returns a collection of all the known env value types registered
|
java.util.List<ExecRecord> |
getExecRecords(java.util.Date startDate, java.util.Date endDate, java.util.Set<TaskDescription.Type> taskTypes, java.util.Set<java.lang.String> userNames, java.util.Set<ExecRecord.Status> statusSet, java.util.Set<Ref> refsAffected)
Returns ExecRecords matching the criteria formed by the input arguments.
|
java.util.List<ExecRecord> |
getExecRecords(java.util.List<java.lang.String> taskIds)
Returns ExecRecord objects associated with the given list of task Ids.
|
java.util.List<ExecRecord> |
getExecutionHistory(int N)
Returns the execution records for the last
N task executions that are performed in the given session or directly on the core state. |
ExportInfo |
getExportInfo()
Returns information about all the resources in a session that can be exported
|
java.lang.String |
getFolderDescription(Ref folder)
returns the data associated with the folder
|
java.util.Set<Ref> |
getFolders(Ref root)
lists the folders dirctly undr the given parent location
|
<T extends Metadata> |
getMetadata(Ref ref)
Returns the metadata about the given reference.
|
java.util.Map<Ref,Metadata> |
getMetadata(java.util.Set<Ref> refs)
Returns metadata information about the given references.
|
SnapshotDelta<PortableResource,PortableDelta> |
getPortableDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2, PBE_EncryptionService es)
Returns the delta of portable values between two snapshots at different dates.
|
SnapshotDelta<PortableResource,PortableDelta> |
getPortableDelta(Snapshot<Digest> source)
Compares the versions and references given in the sourceVersion with the current set of resources and their versions.
|
Snapshot<PortableResource> |
getPortableSnapshot(RefValueDomain valueDomain, java.util.Date date)
Returns snapshot of portable values for resources that are in the given value domain as of the given time.
|
java.lang.String |
getProjectDescription(java.lang.String projectName)
returns the data associated with the project
|
java.util.Set<Ref> |
getProjects()
Convenience method for obtaining all the projects in the domain
|
SnapshotDelta<Ref,Ref> |
getRefDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2)
Returns the delta of references between two snapshots at different dates.
|
java.util.Set<Ref> |
getRefs(BaseQuery query)
Searches for resources using the given query and returns a set of refs.
|
Snapshot<Ref> |
getRefSnapshot(RefValueDomain valueDomain, java.util.Date date)
Returns snapshot of references that are in the given value domain as of the given time.
|
java.lang.Object |
getResourceData(Ref ref)
Returns the resource data (by default this will be a copy).
|
java.lang.Object |
getResourceData(Ref ref, boolean copy)
Returns the resource data.
|
ResourceMetadata |
getResourceMetadata(Ref ref)
returns the metadata for the given resource ref
|
java.util.Map<Ref,ResourceMetadata> |
getResourceMetadata(ResourceQuery query)
Searches a particular resource type based in the given resource query and returns metadata for the resources that satisfy the given criteria.
|
java.util.Map<Ref,ResourceMetadata> |
getResourceMetadata(java.util.Set<Ref> refs)
Returns metadata information about the given references.
|
java.util.Set<Ref> |
getResources(Ref root)
Returns the resources that are directly under the given root.
|
java.util.Set<Ref> |
getResources(Ref root, boolean recursive)
Returns the resources that are under the given root.
|
java.util.Set<Ref> |
getResources(ResourceQuery query)
Returns references to all resources satisfying the given query
|
java.util.Set<Ref> |
getResources(java.lang.String typeId)
Returns references to all resources of the given type
|
CanonicalResource |
getRevision(Ref ref, long version)
Returns the the CanonicalResource representation of the given revision of a resource
|
java.lang.String |
getSession()
Returns the name of the session that whis mbean operates on
|
SessionInfo |
getSessionInfo()
returns the session info
|
java.util.Set<java.lang.String> |
getSimpleEnvValueTypes()
Returns a Set of the known env value types with simple value objects registered.
|
UploadedJarInfo |
getUploadedJarInfo()
Returns detailed information about the entities in the previously staged configuration jar file
|
boolean |
hasDependents(Ref root)
Returns true if there are any dependents on the given folder/project or resource.
|
ImportResult |
importUploaded(java.util.Collection<Ref> refs, boolean includeDependencies, boolean preserveExistingEnvValues, char[] passphrase)
imports selected resources/projects/folders from the previously uploaded jar file into the session.
|
ImportResult |
importUploaded(ImportPlan importPlan)
Import an already uploaded jar file in this session.
|
java.util.Set<Ref> |
mapReferences(java.util.Collection<Ref> resourcesToConsider, java.util.Map<Ref,Ref> refMap)
Modifies the existing references from all the resources in the given list (resourcesToConsider) to a new set of references passed in the refMap.
|
Ref |
moveResource(Ref ref, Ref location)
convenience method to move the given resource to a new location
|
boolean |
projectExists(java.lang.String projectName)
Convenience method that returns true if the given project exists
|
int |
purgeExecutionHistory(java.util.Date startTime, java.util.Date endTime, boolean deletePurgeRecords)
Purges execution and associated undo records for the given session.
|
int |
purgeExecutionHistory(int max)
Purges execution and associated undo records for the given session.
|
void |
renameLocation(Ref sourceLocation, Ref targetLocation, boolean merge)
Maps an existing project or folder to another project or folder.
|
void |
renameResource(Ref ref, Ref newref)
Changes the identity of an existing resource so that its name, or its location, or both are different.
|
Ref |
renameResource(Ref ref, java.lang.String name)
convenience methods to rename just the local name
|
int |
replaceEnvValues(EnvValueQuery query, java.lang.String replacement)
Find environment values as indicated by the query and replaces all occurances of the env value pattern (as returned by
EnvValueQuery.getSearchString() ) with the given parameter. |
java.util.Map<Ref,ResourceMetadata> |
searchResources(java.util.Set<ResourceQuery> queries)
Searches across multiple resource types based on a set of queries reusing the existing query infrastructure
|
void |
setFolderDescription(Ref folder, java.lang.String desc)
Sets the description associated with the folder
|
void |
setProjectDescription(java.lang.String projectName, java.lang.String description)
Sets the data associated with the project
|
void |
synchronizeResource(Ref resourceref)
synchronizes the value of a resource that has been modified in this session, with the value from the core.
|
void |
undoTask(java.lang.String taskId)
Undoes the execution of a config task whose task id is given.
|
void |
updateLocation(Ref location, java.lang.String description)
Sets the description associated with the location
|
void |
updateResource(Ref ref, java.lang.Object newResourceData)
Updates an existing resource
|
byte[] |
upgradeJarFile(byte[] input, char[] passphrase)
Re-exports an exported jar file without importing it.
|
void |
uploadJarFile(byte[] data)
obtains configuration data from a configuration jar file and locally (temporarily) stages it
|
public Config(ConfigServiceImpl configService, java.lang.String session)
public java.lang.String getSession()
ConfigMBeangetSession in interface ConfigMBeanpublic SessionInfo getSessionInfo()
ConfigMBeangetSessionInfo in interface ConfigMBeanpublic boolean exists(Ref ref)
ConfigMBeanexists in interface ConfigMBeanref - reference to the entitypublic <T extends Metadata> T getMetadata(Ref ref) throws NotFoundException
ConfigMBeanResourceMetadata object.getMetadata in interface ConfigMBeanref - reference to a domain, project, folder or resource.DomainMetadata if ref is Ref.DOMAIN.ProjectMetadata if ref is a reference to a project.FolderMetadata if ref is a reference to a folder.ResourceMetadata if ref is a reference to a resource.NotFoundException - when referenced object is not foundpublic java.util.Map<Ref,Metadata> getMetadata(java.util.Set<Ref> refs) throws NotFoundException
ConfigMBeanConfigMBean.getMetadata(com.bea.wli.config.Ref) for more information on the data returned.getMetadata in interface ConfigMBeanNotFoundExceptionpublic java.util.Set<Ref> getRefs(BaseQuery query) throws NotFoundException
ConfigMBeangetRefs in interface ConfigMBeanquery - You can pass either ResourceQuery or DependencyQuery.NotFoundException - if a resource to a reference is not foundpublic boolean hasDependents(Ref root) throws NotFoundException
ConfigMBeanConfigMBean.getDependents(Ref) } when checking whether the root can be deleted.hasDependents in interface ConfigMBeanNotFoundExceptionpublic java.util.Set<Ref> getDependents(Ref root) throws NotFoundException
ConfigMBeangetDependents in interface ConfigMBeanNotFoundExceptionpublic java.util.Set<Ref> getDependencies(Ref root) throws NotFoundException
ConfigMBeangetDependencies in interface ConfigMBeanNotFoundExceptionpublic void delete(java.util.Set<Ref> refs) throws DeleteException, NotFoundException
ConfigMBeandelete in interface ConfigMBeanrefs - the collection of references to deleteDeleteExceptionNotFoundException - if a reference is not foundpublic void delete(java.util.Set<Ref> refs, java.util.Set<Ref> exclusions) throws DeleteException, NotFoundException
ConfigMBeandelete in interface ConfigMBeanrefs - the collection of references to deleteexclusions - collection of references to exclude from deletionDeleteExceptionNotFoundException - if a reference is not foundpublic java.util.Set<Ref> getProjects()
ConfigMBeangetProjects in interface ConfigMBeanpublic boolean projectExists(java.lang.String projectName)
ConfigMBeanprojectExists in interface ConfigMBeanpublic Ref createProject(java.lang.String projectName, java.lang.String description) throws ValidationException, CreateException
ConfigMBeancreateProject in interface ConfigMBeanprojectName - name of the project.description - descriptions associated with the projectValidationExceptionCreateExceptionpublic void deleteProject(java.lang.String projectName)
throws DeleteException,
NotFoundException
ConfigMBeandeleteProject in interface ConfigMBeanprojectName - name of the projectDeleteExceptionNotFoundException - if the project is not foundpublic void setProjectDescription(java.lang.String projectName,
java.lang.String description)
throws ValidationException,
UpdateException
ConfigMBeansetProjectDescription in interface ConfigMBeanUpdateExceptionValidationExceptionpublic java.lang.String getProjectDescription(java.lang.String projectName)
throws NotFoundException
ConfigMBeangetProjectDescription in interface ConfigMBeanNotFoundExceptionpublic java.util.Set<Ref> getFolders(Ref root) throws NotFoundException
ConfigMBeangetFolders in interface ConfigMBeanroot - reference to the parent project or folder for which to lists the sub-foldersNotFoundException - if the parnt is not foundpublic Ref createFolder(Ref projectOrFolderRef, java.lang.String folderName, java.lang.String description) throws CreateException, ValidationException
ConfigMBeancreateFolder in interface ConfigMBeanprojectOrFolderRef - reference to the project or folder under which the new folder will be createdfolderName - name of the folderdescription - description associated with the folder. OptionalCreateException - if a folder with the same name under the given parent exists.ValidationExceptionpublic void deleteFolder(Ref folderRef) throws DeleteException, NotFoundException
ConfigMBeandeleteFolder in interface ConfigMBeanfolderRef - reference to the folderDeleteExceptionNotFoundException - if the folder is not foundpublic void setFolderDescription(Ref folder, java.lang.String desc) throws ValidationException, UpdateException
ConfigMBeansetFolderDescription in interface ConfigMBeanUpdateExceptionValidationExceptionpublic java.lang.String getFolderDescription(Ref folder) throws NotFoundException
ConfigMBeangetFolderDescription in interface ConfigMBeanNotFoundExceptionpublic void createLocation(Ref location, java.lang.String description) throws CreateException, ValidationException
ConfigMBeancreateLocation in interface ConfigMBeanlocation - the location to createCreateExceptionValidationExceptionpublic void updateLocation(Ref location, java.lang.String description) throws ValidationException, UpdateException
ConfigMBeanupdateLocation in interface ConfigMBeanValidationExceptionUpdateExceptionpublic void deleteLocation(Ref location) throws NotFoundException, DeleteException
ConfigMBeandeleteLocation in interface ConfigMBeanlocation - the location to deleteNotFoundException - if the locationdoes nto existDeleteException - if the delete failedpublic void cloneLocation(Ref sourceLocation, Ref targetLocation, boolean merge) throws ValidationException, CreateException
ConfigMBeancloneLocation in interface ConfigMBeansourceLocation - the reference to the source project / folder to be cloned.targetLocation - the target location of the clone.merge - If true, does not complain if the target location already exists, and contains other resources.ValidationExceptionCreateExceptionpublic void renameLocation(Ref sourceLocation, Ref targetLocation, boolean merge) throws NotFoundException, AlreadyExistsException, UpdateException
ConfigMBeanMore precisely a mapping from A1/A2/.../An to B1/B2/.../Bm will change identity of all projects, folders, and resources under A1/A2/.../An (inclusive) to have a location prefix of B1/B2/.../Bm. For example if there is a folder A1/A2/.../An/Foo, it will become B1/B2/.../Bm/Foo.
renameLocation in interface ConfigMBeansourceLocation - the reference to the source project / folder to be mapped.targetLocation - the target location to be mapped to.merge - allows merging a project/folder with an existing project/folder. For example if folder A/B is changed to be D/E, and if D/E already exists, resources inside A/B will simply be moved into D/E, thereby merging the two folders.NotFoundException - if the source location is not found.AlreadyExistsException - thrown when merge is false and another location with the new identity already exists, or if merge is true and resource in the source location conflicts with anothoer resource with the same name in the target location.UpdateException - any other failure is wrapped inside this exception.public java.util.Set<Ref> getResources(java.lang.String typeId)
ConfigMBeangetResources in interface ConfigMBeantypeId - the type idpublic java.util.Set<Ref> getResources(Ref root) throws NotFoundException
ConfigMBeangetResources in interface ConfigMBeanroot - the location containing the resourcesNotFoundException - if the given root is not foundpublic java.util.Set<Ref> getResources(Ref root, boolean recursive) throws NotFoundException
ConfigMBeanRef.DOMAINgetResources in interface ConfigMBeanroot - the location to look underrecursive - If true, returns resources of sub-folders as wellNotFoundException - if the given root is not foundpublic java.util.Set<Ref> getResources(ResourceQuery query)
ConfigMBeangetResources in interface ConfigMBeanquery - the main filtering querypublic ResourceMetadata getResourceMetadata(Ref ref) throws NotFoundException
ConfigMBeangetResourceMetadata in interface ConfigMBeanNotFoundException - if the resource does not existpublic java.util.Map<Ref,ResourceMetadata> getResourceMetadata(java.util.Set<Ref> refs) throws NotFoundException
ConfigMBeangetResourceMetadata in interface ConfigMBeanrefs - references of the resources to get metadata forNotFoundException - if one of the resources does not existpublic java.util.Map<Ref,ResourceMetadata> getResourceMetadata(ResourceQuery query) throws NotFoundException
ConfigMBeangetResourceMetadata in interface ConfigMBeanquery - the main filtering queryNotFoundExceptionpublic java.util.Map<Ref,ResourceMetadata> searchResources(java.util.Set<ResourceQuery> queries) throws NotFoundException
searchResources in interface ConfigMBeanqueries -NotFoundExceptionpublic java.lang.Object getResourceData(Ref ref) throws NotFoundException
ConfigMBeangetResourceData in interface ConfigMBeanref - reference to the resourceNotFoundExceptionpublic java.lang.Object getResourceData(Ref ref, boolean copy) throws NotFoundException
ConfigMBeangetResourceData in interface ConfigMBeanref - reference to the resourcecopy - whether to return a copy. If asked to return the underlying value, care must be given not to update it.NotFoundExceptionpublic void createResource(Ref ref, java.lang.Object resourceData) throws ValidationException, CreateException
ConfigMBeancreateResource in interface ConfigMBeanresourceData - the resource data. The data type depends on the resource typeAlreadyExistsException - if a resource already exists for this referenceCreateException - if creation failsValidationExceptionpublic void createChildResource(Ref parentref, NamedRef childref, java.lang.Object childResourceData) throws ValidationException, CreateException
ConfigMBeancreateChildResource in interface ConfigMBeanparentref - reference to the parent resource that will contain this child resourcechildref - the reference to the child that will be created, the name attribute is an opaque representation of the location where the child reference will go inside the parent resource. The exact form and semantics of this argument is completely left to the developers of the parent resource. Can be null if the location attribute is irrelevantchildResourceData - the initial value for the childValidationException - if validation failsAlreadyExistsException - if another resource already exists for this RefCreateException - if creation of the resource failspublic void updateResource(Ref ref, java.lang.Object newResourceData) throws ValidationException, UpdateException
ConfigMBeanupdateResource in interface ConfigMBeanref - the reference to the resourcenewResourceData - the new resource data. The data type depends on the resource typeNotFoundException - if the resource does not existUpdateException - if the update failsValidationExceptionpublic void renameResource(Ref ref, Ref newref) throws ValidationException, UpdateException
ConfigMBeanrenameResource in interface ConfigMBeanref - the reference to the resourcenewref - the new identity for the resourceNotFoundException - if the resource is not found, or if the newRef references a non-existing location.AlreadyExistsException - if another resource with the new identity already existsUpdateException - any other failureValidationExceptionpublic Ref renameResource(Ref ref, java.lang.String name) throws ValidationException, UpdateException
ConfigMBeanrenameResource in interface ConfigMBeanref - the reference to the resourcename - the new local name for the resourceNotFoundException - if the resource is not found, or if the newRef references a non-existing location.AlreadyExistsException - if another resource with the new identity already existsUpdateException - any other failureValidationExceptionpublic Ref moveResource(Ref ref, Ref location) throws ValidationException, UpdateException
ConfigMBeanmoveResource in interface ConfigMBeanref - the reference to the resourcelocation - the new identity for the resourceNotFoundException - if the resource is not found, or if the newRef references a non-existing location.AlreadyExistsException - if another resource with the new identity already existsUpdateException - any other failureValidationExceptionpublic void cloneResource(Ref ref, Ref newref) throws ValidationException, CreateException
ConfigMBeancloneResource in interface ConfigMBeanref - the reference to the resourcenewref - the new identity for the resourceNotFoundException - if the resource is not found, or if the newRef references a non-existing location.AlreadyExistsException - if another resource with the new identity already existsCreateException - any other failureValidationExceptionpublic void deleteResource(Ref ref) throws NotFoundException, DeleteException
ConfigMBeandeleteResource in interface ConfigMBeanNotFoundException - if the resource does not existDeleteExceptionpublic void synchronizeResource(Ref resourceref) throws ValidationException, UpdateException, CreateException, DeleteException
ConfigMBeansynchronizeResource in interface ConfigMBeanValidationException - if a validation failure occurs during synchronizationUpdateException - if the resource cannot be updatedCreateException - if the resource cannot be createdDeleteException - if the resource cannot be deletedpublic void uploadJarFile(byte[] data)
throws java.lang.Exception
ConfigMBeanuploadJarFile in interface ConfigMBeandata - contents of a previously exported configuration jar filejava.lang.Exceptionpublic UploadedJarInfo getUploadedJarInfo() throws NotFoundException
ConfigMBeangetUploadedJarInfo in interface ConfigMBeanNotFoundException - if no configuration jar has been uploaded, or a previously uploaded jar file has been importedpublic ImportResult importUploaded(java.util.Collection<Ref> refs, boolean includeDependencies, boolean preserveExistingEnvValues, char[] passphrase) throws java.lang.Exception
ConfigMBeanimportUploaded in interface ConfigMBeanrefs - references to the resources/folders/projects to be imported. An entity can be listed multiple times (directly or indirectly via its parent folder/project). A reference to project, folder will cause all resources in the configuration jar file under that location to be imported. If null or Ref.DOMAIN all resources in the config jar are imported.includeDependencies - whether to include dependencies of the resources that are given in the refs parameter which are also in uploaded jar file.preserveExistingEnvValues - This flag controls whether certain environment values inside of a resource will be overwritten or preserved during an import. The import always overwrites any existing data, except environment values that are found in both the existing data and imported data. If this argument is true, the import of a resource (which already exists) proceeds as follows:
passphrase - the pass phrase to use to decrypt resources that have been encrypted. Null value can be given if the jar file is known to not have been encrypted.NotFoundException - if no configuration jar has been uploaded, or a previously uploaded jar file has been importedjava.lang.Exception - any other exceptionpublic ImportResult importUploaded(ImportPlan importPlan) throws java.lang.Exception
ConfigMBeanimportUploaded in interface ConfigMBeanimportPlan - ImportPlanjava.lang.Exceptionpublic byte[] export(java.util.Collection<Ref> refsToExport, boolean includeDependencies, EncryptionScope escope, char[] passphrase) throws java.lang.Exception
ConfigMBeanexport in interface ConfigMBeanrefsToExport - array of references to items to be exported. A reference to a resource causes that resource to be exported. If there is a reference to a folder, project, or the domain (via Ref.DOMAIN) then all resources under these are exported as well. In order to export all the resources simply call this method with Ref.DOMAIN.includeDependencies - whether to include dependencies of the resources that are given in the refsToExport parameterescope - the scope of encryptionpassphrase - the passphrase to use if encryption will be donejava.lang.Exception - if a reference is not found.public byte[] exportProjects(java.util.Collection<Ref> projectrefs, char[] passphrase) throws java.lang.Exception
ConfigMBeanConfigMBean.export(java.util.Collection<com.bea.wli.config.Ref>, boolean, com.bea.wli.config.importexport.EncryptionScope, char[]) when imported to a target domain. Resource that are in the target domain, but not in the jar file are deleted by default. This behavior could be overriden or customized by modifying the import plan.exportProjects in interface ConfigMBeanprojectrefs - references to projects to be exportedjava.lang.Exceptionpublic ExportInfo getExportInfo()
ConfigMBeangetExportInfo in interface ConfigMBeanpublic byte[] upgradeJarFile(byte[] input,
char[] passphrase)
throws java.lang.Exception
ConfigMBeanupgradeJarFile in interface ConfigMBeaninput - bytes that supplies the contents of the exported jar filepassphrase - the pass phrase to use to decrypt resources that have been encrypted. Null value can be given if the jar file is known to not have been encrypted.java.lang.Exceptionpublic java.util.Set<java.lang.String> getEnvValueTypes()
ConfigMBeangetEnvValueTypes in interface ConfigMBeanpublic java.util.Set<java.lang.String> getSimpleEnvValueTypes()
ConfigMBeangetSimpleEnvValueTypes in interface ConfigMBeanpublic java.util.List<EnvValueMetadata> getEnvValueMetadata(java.util.Set<java.lang.String> envValueTypes)
ConfigMBeangetEnvValueMetadata in interface ConfigMBeanpublic java.lang.Object getEnvValue(Ref ref, java.lang.String envType, java.lang.String location) throws NotFoundException
ConfigMBeangetEnvValue in interface ConfigMBeanref - resource refenvType - environment value typelocation - environment value locationNotFoundException - if the resource is not foundpublic java.util.List<QualifiedEnvValue> findEnvValues(EnvValueQuery query) throws NotFoundException
ConfigMBeanfindEnvValues in interface ConfigMBeanNotFoundExceptionpublic int replaceEnvValues(EnvValueQuery query, java.lang.String replacement) throws java.lang.Exception
ConfigMBeanEnvValueQuery.getSearchString() ) with the given parameter.replaceEnvValues in interface ConfigMBeanquery - the query that indicates which env values to findreplacement - the replacement text. This text will be substituted for the env value pattern given in the query.java.lang.Exceptionpublic void assignEnvValues(java.util.Collection<QualifiedEnvValue> envValues) throws ValidationException, UpdateException
ConfigMBeanConfigMBean.findEnvValues(com.bea.wli.config.env.EnvValueQuery) method to obtain the location of a particular environment value.assignEnvValues in interface ConfigMBeanenvValues - Environment values to set.NotFoundException - if a resource is not foundUpdateException - if any other exception occurs while updating the env valuesValidationExceptionpublic void undoTask(java.lang.String taskId)
throws java.lang.Exception
ConfigMBeanundoTask in interface ConfigMBeantaskId - the id of the task that will be undonejava.lang.Exception - if the undo task fails.public int purgeExecutionHistory(java.util.Date startTime,
java.util.Date endTime,
boolean deletePurgeRecords)
throws java.lang.Exception
ConfigMBeanpurgeExecutionHistory in interface ConfigMBeanstartTime - the start of time range for execution history purging. If null all records older than the endTime are deletedendTime - the end of the time range for execution history purgingdeletePurgeRecords - purge records are not automatically deleted. Set this flag to true to also delete any purge record in the time window. The deleted purge records will be accounted for in the count returnedjava.lang.Exceptionpublic int purgeExecutionHistory(int max)
throws java.lang.Exception
ConfigMBeanpurgeExecutionHistory in interface ConfigMBeanmax - maximum number of records to keepjava.lang.Exceptionpublic java.util.List<ExecRecord> getExecutionHistory(int N)
ConfigMBeanN task executions that are performed in the given session or directly on the core state. The result includes successful and unsuccessful executions. The result is ordered in reverse chronological order and is limited to the top N elements. This method returns empty list if no config operation has been executed so far.getExecutionHistory in interface ConfigMBeanN - the number of most recent executions to return. a negative value returns all recordspublic java.util.List<ExecRecord> getExecRecords(java.util.List<java.lang.String> taskIds) throws NotFoundException
ConfigMBeangetExecRecords in interface ConfigMBeantaskIds - list of task idsNotFoundException - if no information about the task was not foundpublic java.util.List<ExecRecord> getExecRecords(java.util.Date startDate, java.util.Date endDate, java.util.Set<TaskDescription.Type> taskTypes, java.util.Set<java.lang.String> userNames, java.util.Set<ExecRecord.Status> statusSet, java.util.Set<Ref> refsAffected)
ConfigMBeangetExecRecords in interface ConfigMBeanstartDate - return ExecRecords after and including this date. A null value indicates the beginning of timeendDate - return ExecRecords before but not including this date. A null value indicates the all records since the start datetaskTypes - return only the tasks whose type is included in this set. If null return all task typesuserNames - return only the tasks executed by any user in this set. If null return all tasks executed by any userstatusSet - return only the tasks whose status is in this set. If null return all tasks regardless of their statusrefsAffected - return only the tasks that have modified *ANY* of the references included here. If null return all tasks regardless of what is modified. Renames and moves are handled in a special way. If a task renames/moves a resource from Ref1 to Ref2, it will appear as if the task has modified both Ref1 and Ref2public java.util.List<ChangeRecord> getChangeHistory(Ref ref, ChangeRecord.ChangeHistoryType historyType, int resultSize) throws java.lang.Exception
ConfigMBeangetChangeHistory in interface ConfigMBeanref - the reference to the resourcehistoryType - type of history to return. See ChangeRecord.ChangeHistoryType for more informationresultSize - the number of results to return. If historyType is ChangeRecord.ChangeHistoryType#Progressive, the first resultSize changes are returned. Otherwise the most recent resultSize changes are returnedjava.lang.Exceptionpublic Snapshot<Ref> getRefSnapshot(RefValueDomain valueDomain, java.util.Date date) throws java.lang.Exception
ConfigMBeangetRefSnapshot in interface ConfigMBeanvalueDomain - the value domaindate - indicates the date for which to return the snapshot. A null value indicates the most recent snapshotjava.lang.Exceptionpublic Snapshot<Digest> getDigestSnapshot(RefValueDomain valueDomain, java.util.Date date) throws java.lang.Exception
ConfigMBeangetDigestSnapshot in interface ConfigMBeanvalueDomain - the value domaindate - indicates the date for which to return the snapshot. A null value indicates the most recent snapshotjava.lang.Exceptionpublic Snapshot<CanonicalResource> getCanonicalSnapshot(RefValueDomain valueDomain, java.util.Date date) throws java.lang.Exception
ConfigMBeangetCanonicalSnapshot in interface ConfigMBeanvalueDomain - the value domaindate - indicates the date for which to return the snapshot. A null value indicates the most recent snapshotjava.lang.Exceptionpublic Snapshot<PortableResource> getPortableSnapshot(RefValueDomain valueDomain, java.util.Date date) throws java.lang.Exception
ConfigMBeangetPortableSnapshot in interface ConfigMBeanvalueDomain - the value domaindate - indicates the date for which to return the snapshot. A null value indicates the most recent snapshotjava.lang.Exceptionpublic SnapshotDelta<Ref,Ref> getRefDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2) throws java.lang.Exception
ConfigMBeanThe delta is expressed in terms of add and delete operations, which when applied to the first snapshot will yield the second snapshot.
The delta does not contain any entries for updated references, since this information cannot be derived from reference snapshots.
getRefDelta in interface ConfigMBeanjava.lang.Exceptionpublic SnapshotDelta<Digest,Digest> getDigestDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2) throws java.lang.Exception
ConfigMBeanThe delta is expressed in terms of add, update and delete operations, which when applied to the first snapshot will yield the second snapshot.
getDigestDelta in interface ConfigMBeanjava.lang.Exceptionpublic SnapshotDelta<CanonicalResource,CanonicalDelta> getCanonicalDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2) throws java.lang.Exception
ConfigMBeanThe delta is expressed in terms of add, update and delete operations, which when applied to the first snapshot will yield the second snapshot.
getCanonicalDelta in interface ConfigMBeanjava.lang.Exceptionpublic SnapshotDelta<PortableResource,PortableDelta> getPortableDelta(RefValueDomain valueDomain, java.util.Date date1, java.util.Date date2, PBE_EncryptionService es) throws java.lang.Exception
ConfigMBeanThe delta is expressed in terms of add, update and delete operations, which when applied to the first snapshot will yield the second snapshot.
The result can optionally be encrypted
getPortableDelta in interface ConfigMBeanjava.lang.Exceptionpublic SnapshotDelta<CanonicalResource,CanonicalDelta> getCanonicalDelta(Snapshot<Digest> source) throws java.lang.Exception
ConfigMBeangetCanonicalDelta in interface ConfigMBeansource - the digest snapshot of the source systemjava.lang.Exceptionpublic SnapshotDelta<PortableResource,PortableDelta> getPortableDelta(Snapshot<Digest> source) throws java.lang.Exception
ConfigMBeangetPortableDelta in interface ConfigMBeansource - the digest snapshot of the source systemjava.lang.Exceptionpublic CanonicalResource getRevision(Ref ref, long version) throws java.lang.Exception
ConfigMBeangetRevision in interface ConfigMBeanref - reference to the resourceversion - the version to return.java.lang.Exceptionpublic java.lang.Object getDelta(Ref ref1, long version1, Ref ref2, long version2) throws java.lang.Exception
ConfigMBeangetDelta in interface ConfigMBeanref1 - the reference to the first resource.version1 - the version number of the first resourceref2 - the reference to the second resourceversion2 - the version number of the second resourcejava.lang.Exceptionpublic SessionConflicts getConflicts(java.lang.Boolean dummy)
ConfigMBeangetConflicts in interface ConfigMBeandummy - must be null. This is here to get around a JMX behavior that was making this method invisiblepublic Diagnostics getDiagnostics(Ref ref) throws NotFoundException
ConfigMBeangetDiagnostics in interface ConfigMBeanDiagnostics object for the given resource. may be null.NotFoundException - if resource is not foundpublic java.util.Map<Ref,Diagnostics> getDiagnostics(java.util.Collection<Ref> refs) throws NotFoundException
ConfigMBeangetDiagnostics in interface ConfigMBeanrefs - the resource references for which to return the diagnostics.NotFoundExceptionpublic java.util.Set<Ref> mapReferences(java.util.Collection<Ref> resourcesToConsider, java.util.Map<Ref,Ref> refMap) throws NotFoundException, UpdateException
ConfigMBeanmapReferences in interface ConfigMBeanresourcesToConsider - list of resources to be modified with the new referencesrefMap - map of references. key is the old ref and value is the new refNotFoundException - if the resource to a reference is not foundUpdateException - if there is any error while trying to update the resourcespublic void customize(java.util.List<Customization> customizations) throws java.lang.Exception
ConfigMBeancustomize in interface ConfigMBeancustomizations - Customizationjava.lang.Exceptionpublic byte[] createCustomizationFile(java.util.Set<Ref> refs, java.util.Set<java.lang.String> envValueTypes) throws java.lang.Exception
ConfigMBeancreateCustomizationFile in interface ConfigMBeanrefs - set of resources/project/folderenvValueTypes - only these environment value types are consideredjava.lang.Exception