public interface MetadataService
The MetadataService interface is the main contract for accessing and manipulating the application metadata stored in the metadata repository. Access to the metadata objects is exposed only via the MetadataService interface.
The MetadataService
is exposed as a stateless session EJB.
External clients must access the service only through the corresponding EJB.
Clients should not interact with the internal API layer directly.
Since clients access the metadata services through the stateless session
EJB, all the methods in this interface accepts a reference to a
MetadataServiceHandle
argument that is used to store state
across multiple calls, for example when multiple methods are to be called
within a user transaction.
Clients do not need to access or manipulate the
MetadataServiceHandle
. They just need to hold on to the
reference created by the open
method and pass it in to
methods being called. Finally the handle must explicitly be closed by
calling close
method. Only upon calling the close
method, any changes made using a given handle are committed (or aborted).
The MetadataService
APIs allow partitioning of metadata
into packages by providing the desired package while adding metadata.
These packages follow the standard syntax of the form "/pkg1/pkg2" and
so on. The leading "/" is optional.
For example, while creating a JobType, providing the package
as "/test" will create the object under "/test" whereas a value
of "demo/basic" will create the object under "/demo/basic". If a
null
package is provided, the object gets created under "/".
Please note that the uniqueness of metadata objects are automatically within the scope of a given package (namespace). Therefore within a given package two metadata objects with the same name (obviously of the same type) cannot be created.
Customization Support
This class supports limited customization for certain ESS metadata.
The customizeJobDefinition
method
can be used to customize certain properties for a JobDefintion.
The customizeJobSet
method can be used to
customize certain properties for a JobSet.
This allows customization of a property for a piece of metadata without
changing the base metadata. This works by using MDS metadata customization.
The property must be a member of the one of the
MetadataService.CustomizableProperty
enums, otherwise an exception will be thrown.
Non customizing methods such as updateJobDefinition, updateJobSet, and so on, modify the base metadata definition. When this metadata is upgraded, all of these changes are lost. However, if these changes are made using MDS customizations, then they can survive across upgrades to the base metadata.
In order for this feature to fully work, the application must define a customization class in its adf-config.xml. Refer to MDS documentation on how to do this.
Modifier and Type | Interface and Description |
---|---|
static class |
MetadataService.CustomizableProperty
Enum of properties that can be customized.
|
static class |
MetadataService.QueryField
Metadata query fields.
|
Modifier and Type | Method and Description |
---|---|
MetadataObjectId |
addExclusionDefinition(MetadataServiceHandle handle,
ExclusionsDefinition exclusion,
String packageName)
Adds a ExclusionsDefinition to the metadata repository.
|
MetadataObjectId |
addIncompatibility(MetadataServiceHandle handle,
Incompatibility incompatibility,
String packageName)
Adds an Incompatibility in the metadata repository.
|
MetadataObjectId |
addJobDefinition(MetadataServiceHandle handle,
JobDefinition jobDefn,
String packageName)
Adds a JobDefinition to the metadata repository.
|
MetadataObjectId |
addJobSet(MetadataServiceHandle handle,
JobSet jobset,
String packageName)
Adds a JobSet to the metadata repository.
|
MetadataObjectId |
addJobType(MetadataServiceHandle handle,
JobType jobType,
String packageName)
Adds a JobType in the metadata repository.
|
MetadataObjectId |
addScheduleDefinition(MetadataServiceHandle handle,
Schedule schedule,
String packageName)
Adds a Schedule to the metadata repository.
|
Map |
checkDetailedPermissions(MetadataServiceHandle handle,
String[] metadataPermissionStrings,
MetadataPermission.Action[] actions)
Checks if the current user has permissions to perform actions
on the set of given metadata objects.
|
void |
close(MetadataServiceHandle handle)
Closes the session identified by an instance of MetadataServiceHandle.
|
void |
close(MetadataServiceHandle handle,
boolean abort)
Closes the session identified by an instance of MetadataServiceHandle.
|
MetadataObjectId |
copyExclusionDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
String packageName,
String newName)
Copies a ExclusionDefinition to create another with the
given name.
|
MetadataObjectId |
copyIncompatibility(MetadataServiceHandle handle,
MetadataObjectId objectId,
String packageName,
String newName)
Copies an Incompatibility to create another with the given name.
|
MetadataObjectId |
copyJobDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
String packageName,
String newName)
Copies a JobDefinition to create another with the given name.
|
MetadataObjectId |
copyJobSet(MetadataServiceHandle handle,
MetadataObjectId objectId,
String packageName,
String newName)
Copies a JobSet to create another with the given name.
|
MetadataObjectId |
copyJobType(MetadataServiceHandle handle,
MetadataObjectId objectId,
String packageName,
String newName)
Copies a JobType to create another with the given name.
|
MetadataObjectId |
copyScheduleDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
String packageName,
String newName)
Copies a Schedule to create another with the given name.
|
void |
customizeJobDefinition(MetadataServiceHandle handle,
JobDefinition jobDefinition,
MetadataService.CustomizableProperty property,
Serializable newValue)
Customize a property for JobDefinition metadata.
|
void |
customizeJobSet(MetadataServiceHandle handle,
JobSet jobSet,
MetadataService.CustomizableProperty property,
Serializable newValue)
Customize a property for JobSet metadata.
|
void |
deleteExclusionDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId)
Deletes a ExclusionDefinition from the metadata repository.
|
void |
deleteIncompatibility(MetadataServiceHandle handle,
MetadataObjectId objectId)
Deletes an Incompatibility from the metadata repository.
|
void |
deleteJobDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId)
Deletes a JobDefinition from the metadata repository.
|
void |
deleteJobSet(MetadataServiceHandle handle,
MetadataObjectId objectId)
Deletes a JobSet from the metadata repository.
|
void |
deleteJobType(MetadataServiceHandle handle,
MetadataObjectId objectId)
Deletes a JobType from the metadata repository.
|
void |
deleteScheduleDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId)
Deletes a Schedule from the metadata repository.
|
Enumeration |
filterByPermission(MetadataServiceHandle handle,
Enumeration objectIds,
MetadataPermission.Action[] actions)
Filters or reduces a list of unique idenifiers to only the ones
for which the current user has to perform the given action.
|
String[] |
getCustomMDSNamespace(MetadataServiceHandle handle)
Gets the MDS namespaces that are known to ESS in which metadata
can be customized or updated in a runtime environment.
|
String[] |
getCustomMDSNamespace(MetadataServiceHandle handle,
String domainName)
Gets the MDS namespaces that are known to ESS in which metadata
can be customized or updated in a runtime environment.
|
ExclusionsDefinition |
getExclusionDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
boolean forUpdate)
Retrieves a ExclusionsDefinition from the metadata repository.
|
ExclusionsDefinition[] |
getExclusionDefinitions(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieve an array of ExclusionsDefinition from the metadata repository.
|
Map |
getExclusionDefinitionsMap(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves a Map of ExclusionsDefinition for MetadataObjectIds from
the metadata repository.
|
Collection |
getIncompatibilities(MetadataServiceHandle handle,
MetadataObjectId entity)
Deprecated.
|
Incompatibility[] |
getIncompatibilities(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieve an array of Incompatibilities from the metadata repository.
|
Map |
getIncompatibilitiesMap(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves map of Incompatibilities for MetadataObjectIds
from the metadata repository.
|
Incompatibility |
getIncompatibility(MetadataServiceHandle handle,
MetadataObjectId objectId,
boolean forUpdate)
Retrieves an Incompatibility from the metadata repository.
|
JobDefinition |
getJobDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
boolean forUpdate)
Retrieves a JobDefinition from the metadata repository.
|
JobDefinition[] |
getJobDefinitions(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves an array of JobDefinitions from the metadata repository.
|
Map |
getJobDefinitionsMap(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves map of JobDefinitions for MetadataObjectIds from the
metadata repository.
|
JobSet |
getJobSet(MetadataServiceHandle handle,
MetadataObjectId objectId,
boolean forUpdate)
Retrieves a JobSet from the metadata repository.
|
JobSet[] |
getJobSets(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves an array of JobSets from the metadata repository.
|
Map |
getJobSetsMap(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves a map of JobSets for MetadataObjectIds from the
metadata repository.
|
JobType |
getJobType(MetadataServiceHandle handle,
MetadataObjectId objectId,
boolean forUpdate)
Retrieves a JobType from the metadata repository.
|
JobType[] |
getJobTypes(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieve an array of JobTypes from the metadata repository.
|
Map |
getJobTypesMap(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves a map of JobTypes for MetadataObjectIds from the
metadata repository.
|
BaseMetadata |
getMetadata(MetadataServiceHandle handle,
BaseMetadataType metadataType,
MetadataObjectId metadataObjectId,
boolean forUpdate)
A generic getter for any type of metadata.
|
Schedule |
getScheduleDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
boolean forUpdate)
Retrieves a Schedule from the metadata repository.
|
Schedule[] |
getScheduleDefinitions(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves an array of Schedules from the metadata repository.
|
Map |
getScheduleDefinitionsMap(MetadataServiceHandle handle,
MetadataObjectId[] objectIds,
boolean forUpdate)
Retrieves map of Schedules for MetadataObjectIds from the
metadata repository.
|
boolean |
hasPermission(MetadataServiceHandle handle,
MetadataObjectId objectId,
MetadataPermission.Action[] actions)
Checks if the current user has permission to perform an action
on a given metadata object.
|
boolean |
isInCustomMDSNamespace(MetadataServiceHandle handle,
MetadataObjectId objectId)
Checks whether the namespace of the objectId matches with the
custom MDS namespace.
|
boolean |
isInCustomMDSNamespace(MetadataServiceHandle handle,
String packageName)
Checks whether the specified package name matches with the
custom MDS namespace.
|
MetadataServiceHandle |
open()
Opens a session with the MetadataService.
|
MetadataServiceHandle |
open(Locale locale)
Opens a session with the MetadataService.
|
Enumeration |
queryExclusionDefinitionObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query ExclusionsDefinition that exist in the metadata repository.
|
Enumeration |
queryExclusionDefinitions(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query ExclusionsDefinitions that exist in the metadata repository.
|
Enumeration |
queryIncompatibilities(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query Incompatibilities that exist in the metadata repository.
|
Enumeration |
queryIncompatibilityObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query Incompatibilities that exist in the metadata repository.
|
Enumeration |
queryJobDefinitionObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query JobDefinitions that exist in the metadata repository.
|
Enumeration |
queryJobDefinitionObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending,
String[] paramsToExclude)
Query JobDefinitions that exist in the metadata repository.
|
Enumeration |
queryJobDefinitions(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query JobDefinitions that exist in the metadata repository.
|
Enumeration |
queryJobSetObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query JobSets that exist in the metadata repository.
|
Enumeration |
queryJobSetObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending,
String[] paramsToExclude)
Query JobSets that exist in the metadata repository.
|
Enumeration |
queryJobSets(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query JobSets that exist in the metadata repository.
|
Enumeration |
queryJobTypeObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query JobTypes that exist in the metadata repository.
|
Enumeration |
queryJobTypeObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending,
String[] paramsToExclude)
Query JobTypes that exist in the metadata repository.
|
Enumeration |
queryJobTypes(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query JobTypes that exist in the metadata repository.
|
List |
queryMetadata(MetadataServiceHandle handle,
BaseMetadataType metadataType,
MetadataQueryFilter queryFilter,
oracle.as.scheduler.metadata.query.MetadataQueryField orderBy,
boolean ascending)
A generic query mechanism for any type of metadata.
|
List |
queryMetadataObjects(MetadataServiceHandle handle,
BaseMetadataType metadataType,
MetadataQueryFilter queryFilter,
oracle.as.scheduler.metadata.query.MetadataQueryField orderBy,
boolean ascending)
A generic query mechanism for any type of metadata.
|
Enumeration |
queryScheduleObjects(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query Schedules that exist in the metadata repository.
|
Enumeration |
querySchedules(MetadataServiceHandle handle,
Filter filter,
MetadataService.QueryField orderBy,
boolean ascending)
Query Schedules that exist in the metadata repository.
|
void |
updateExclusionDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
ExclusionsDefinition exclusion)
Updates an existing ExclusionsDefinition in the metadata repository.
|
void |
updateIncompatibility(MetadataServiceHandle handle,
MetadataObjectId objectId,
Incompatibility incompatibility)
Updates an existing Incompatibility definition in the metadata
repository.
|
void |
updateJobDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
JobDefinition jobDefn)
Updates an existing JobDefinition definition in the metadata repository.
|
void |
updateJobSet(MetadataServiceHandle handle,
MetadataObjectId objectId,
JobSet jobset)
Updates an existing JobSet definition in the metadata repository.
|
void |
updateJobType(MetadataServiceHandle handle,
MetadataObjectId objectId,
JobType jobType)
Updates an existing JobType definition in the metadata repository.
|
void |
updateScheduleDefinition(MetadataServiceHandle handle,
MetadataObjectId objectId,
Schedule schedule)
Updates an existing Schedule definition in the metadata repository.
|
MetadataServiceHandle open() throws MetadataServiceException
This method returns an instance of MetadataServiceHandle
that represents a session (connection) to application's metadata
repository. This handle must be used in subsequent method calls.
Eventually, this handle must be closed by calling one of the
close
methods to commit or rollback any changes made
on this handle and to release any resources held by this handle.
That instance of the handle must not be used after close
is called.
MetadataServiceException
- if metadata sub-system error.MetadataServiceHandle open(Locale locale) throws MetadataServiceException
This method returns an instance of MetadataServiceHandle
that represents a session (connection) to application's metadata
repository. This handle must be used in subsequent method calls.
Eventually, this handle must be closed by calling one of the
close
methods to commit or rollback any changes made on
this handle and to release any resources held by this handle.
That instance of the handle must not be used after close
is called.
locale
- the desired Locale to use.MetadataServiceException
- if metadata sub-system error.void close(MetadataServiceHandle handle) throws ConcurrentUpdateException, ValidationException, MetadataServiceException
Calling this method commits any changes made on the handle being passed. However, if a UserTransaction is active while this method is invoked, the actual commit will happen as per the UserTranaction being active.
MetadataService
handles concurrent modifications of metadata
via multiple sessions in an optimistic way. During commit, if
concurrent changes are detected (implying that the updates are not
attempted on the latest version of an object in this session),
an exception is thrown.
handle
- the MetadataServiceHandle to be closed.
This handle instance must not be used after close
is called.ConcurrentUpdateException
- if any metadata objects
modified/created in this session are also modified/created by another
session concurrently.ValidationException
- if validation fails for any changes done
via the given handle.MetadataServiceException
- if the handle is null, or
metadata sub-system error.void close(MetadataServiceHandle handle, boolean abort) throws ConcurrentUpdateException, ValidationException, MetadataServiceException
Calling this method commits or rolls back any changes made on the handle being passed. However if a UserTransaction is active while this method is invoked, the actual commit or rollback will happen as per the UserTranaction being active.
MetadataService
handles concurrent modifications of
metadata via multiple sessions in an optimistic way. During commit,
if concurrent changes are detected (implying that the updates are
not attempted on the * latest version of an object in this session),
an exception is thrown.
handle
- the MetadataServiceHandle to be closed.
This handle instance must not be used after close
is called.abort
- true
to roll back any changes made using this
handle, or false
to commit any changes.ConcurrentUpdateException
- if any metadata objects
modified/created in this session are also modified/created by another
session concurrently.ValidationException
- if validation fails for any changes done
via the given handle.MetadataServiceException
- if the handle is null, or
metadata sub-system error.BaseMetadata getMetadata(MetadataServiceHandle handle, BaseMetadataType metadataType, MetadataObjectId metadataObjectId, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
handle
- the MetadataServiceHandle to use.metadataType
- the type of metadata to get; for example,
Schedule, JobDefinition, JobType, and so on.metadataObjectId
- the id of the object to get.forUpdate
- the value of this parameter should be false
.
A false
value will mark the underlying MDS object as read-only.
false
should be used for performance reasons.metadataObjectId
casted as defined by the generic type of metadataType
.MetadataNotFoundException
- if metadata for the specified
object was not found.MetadataServiceException
- if metadata sub-system error.List queryMetadata(MetadataServiceHandle handle, BaseMetadataType metadataType, MetadataQueryFilter queryFilter, oracle.as.scheduler.metadata.query.MetadataQueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.metadataType
- the type of metadata to get; for example,
Schedule, JobDefinition, JobType, and so on.queryFilter
- used to filter the query results.orderBy
- the field used to order the query results.ascending
- true
to list the results in ascending
order (a-z), or false
in descending order (z-a).MetadataServiceException
- if metadata sub-system error.List queryMetadataObjects(MetadataServiceHandle handle, BaseMetadataType metadataType, MetadataQueryFilter queryFilter, oracle.as.scheduler.metadata.query.MetadataQueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.metadataType
- the type of metadata to get; for example,
Schedule, JobDefinition, JobType, and so on.queryFilter
- used to filter the query results.orderBy
- an optional field used to order the query results.ascending
- true
to list the results in ascending
order (a-z), or false
in descending order (z-a).metadataType
that match the filter criteria.MetadataServiceException
- if metadata sub-system error.void customizeJobDefinition(MetadataServiceHandle handle, JobDefinition jobDefinition, MetadataService.CustomizableProperty property, Serializable newValue) throws ValidationException, MetadataNotFoundException, MetadataServiceException
See class comments for addtional information.
handle
- the MetadataServiceHandle to use.jobDefinition
- the instance of the JobDefinition to be customized.property
- the property to be customized.newValue
- the new value to use to customize the property.ValidationException
- if validation fails for any changes done
via the given handle.MetadataNotFoundException
- if metadata for the specified
object was not found.MetadataServiceException
- if metadata sub-system error.void customizeJobSet(MetadataServiceHandle handle, JobSet jobSet, MetadataService.CustomizableProperty property, Serializable newValue) throws ValidationException, MetadataNotFoundException, MetadataServiceException
See class comments for addtional information.
handle
- the MetadataServiceHandle to use.jobSet
- the instance of the JobSet to be customized.property
- the property to be customized.newValue
- the new value to use to customize the property.ValidationException
- if validation fails for any changes done
via the given handle.MetadataNotFoundException
- if metadata for the specified
object was not found.MetadataServiceException
- if metadata sub-system error.MetadataObjectId addJobType(MetadataServiceHandle handle, JobType jobType, String packageName) throws ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.jobType
- the instance of the JobType to persist.packageName
- the optional package (namespace) in which to
create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.ValidationException
- if validation of theJobType fails.AlreadyExistsException
- if a JobType with the same name
already exists.MetadataServiceException
- if metadata sub-system error.JobType getJobType(MetadataServiceHandle handle, MetadataObjectId objectId, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either a mutable or immutable instance of the given object as desired. When changes are required to be made, a mutable instance must always be fetched.
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobType to be retrieved.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a JobType for objectId
does not exist.MetadataServiceException
- if metadata sub-system error.JobType[] getJobTypes(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the order of the returned metadata objects is the same as the order of the IDs in the objectIds parameter.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the JobTypes to be retrieved.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a JobType with a given metadata
id does not exist.MetadataServiceException
- if metadata sub-system error.Map getJobTypesMap(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the returned metadata objects is mapped to corresponding IDs in the objectIds parameter. For a missing metadata, MetadataNotFoundException will not be thrown and null is set at the value part of corresponding entry in the returned map.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the JobTypes to be retrieved.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobTypes(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobTypeObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobTypeObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending, String[] paramsToExclude) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.paramsToExclude
- a list of parameter names to exclude from the
query results. For example, given ["param1", "param2"] as the value,
any metadata containing a parameter in the ParameterList with
the name "param1" or the name "param2" will be excluded
from the query results.MetadataServiceException
- if metadata sub-system error.void updateJobType(MetadataServiceHandle handle, MetadataObjectId objectId, JobType jobType) throws MetadataNotFoundException, ValidationException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the metadata object to update.jobType
- the modified JobType to persist.MetadataNotFoundException
- if a JobType for objectId
does not exist.ValidationException
- if validation of the given JobType fails.MetadataServiceException
- if metadata sub-system error.MetadataObjectId copyJobType(MetadataServiceHandle handle, MetadataObjectId objectId, String packageName, String newName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobType to be copied.packageName
- the optional package (namespace) in which to
create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.newName
- the name to be assigned to the new JobType.MetadataNotFoundException
- if a JobType for objectId
does not exist.ValidationException
- if validation of the JobType fails.AlreadyExistsException
- if a JobType for newName
already exists.MetadataServiceException
- if metadata sub-system error.void deleteJobType(MetadataServiceHandle handle, MetadataObjectId objectId) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobType to delete.MetadataServiceException
- if metadata sub-system error.MetadataObjectId addJobDefinition(MetadataServiceHandle handle, JobDefinition jobDefn, String packageName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.jobDefn
- the instance of the JobDefinition to persist.packageName
- the optional package (namespace) in which to
create the object. It can be null
, or a string the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.MetadataNotFoundException
- if the JobType for the given
JobDefinition does not exist.ValidationException
- if validation of the JobDefinition fails.AlreadyExistsException
- if a JobDefinition with the
same name already exists.MetadataServiceException
- if metadata sub-system error.JobDefinition getJobDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either a mutable or immutable instance of the given object as desired. When changes are required to be made, a mutable instance must always be fetched.
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobDefinition to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a JobDefinition for
objectId
does not exist.MetadataServiceException
- if metadata sub-system error.JobDefinition[] getJobDefinitions(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the order of the returned metadata objects is the same as the order of the IDs in the objectIds parameter.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the JobDefinitions
to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a JobDefinition for a
given metadata id does not exist.MetadataServiceException
- if metadata sub-system error.Map getJobDefinitionsMap(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the returned metadata objects is mapped to corresponding IDs in the objectIds parameter. For a missing metadata, MetadataNotFoundException will not be thrown and null is set at the value part of corresponding entry in the returned map.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the JobDefinitions
to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobDefinitions(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobDefinitionObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobDefinitionObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending, String[] paramsToExclude) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.paramsToExclude
- list of parameter names to exclude from the
query results. For example, given ["param1", "param2"] as the value,
any metadata containing a parameter in the ParameterList with
the name "param1" or the name "param2" will be excluded
from the query results.MetadataServiceException
- if metadata sub-system error.void updateJobDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, JobDefinition jobDefn) throws MetadataNotFoundException, ValidationException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the metadata object to update.jobDefn
- the modified JobDefinition to persist.MetadataNotFoundException
- if a JobDefinition for
objectId
does not exist.ValidationException
- if validation of the given JobDefinition
fails.MetadataServiceException
- if metadata sub-system error.MetadataObjectId copyJobDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, String packageName, String newName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobDefinition to be copied.packageName
- the optional package (namespace) in which to
create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.newName
- the name to be assigned to the new JobDefinition.MetadataNotFoundException
- if a JobDefinition for
objectId
does not exist.ValidationException
- if validation of the JobDefinition fails.AlreadyExistsException
- if a JobDefinition for newName
already exists.MetadataServiceException
- if metadata sub-system error.void deleteJobDefinition(MetadataServiceHandle handle, MetadataObjectId objectId) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobDefinition to delete.MetadataServiceException
- if metadata sub-system error.MetadataObjectId addJobSet(MetadataServiceHandle handle, JobSet jobset, String packageName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.jobset
- the instance of the JobSet to persist.packageName
- the optional package (namespace) in which to
create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.MetadataNotFoundException
- if a JobDefinition or JobSet
referenced in the supplied JobSet does not exist.ValidationException
- if validation of the JobSet fails.AlreadyExistsException
- if a JobSet with the same name
already exists.MetadataServiceException
- if metadata sub-system error.JobSet getJobSet(MetadataServiceHandle handle, MetadataObjectId objectId, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either a mutable or immutable instance of the given object as desired. When changes are required to be made, a mutable instance must always be fetched.
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobSet to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a JobSet for objectId
does not exist.MetadataServiceException
- if metadata sub-system error.JobSet[] getJobSets(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the order of the returned metadata objects is the same as the order of the IDs in the objectIds parameter.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the JobSets to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a JobSet with a given
metadata id does not exist.MetadataServiceException
- if metadata sub-system error.Map getJobSetsMap(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the returned metadata objects is mapped to corresponding IDs in the objectIds parameter. For a missing metadata, MetadataNotFoundException will not be thrown and null is set at the value part of corresponding entry in the returned map.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the JobSets to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobSets(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobSetObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryJobSetObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending, String[] paramsToExclude) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.paramsToExclude
- list of parameter names to exclude from the
query results. For example, given ["param1", "param2"] as the value,
any metadata containing a parameter in the ParameterList with
the name "param1" or the name "param2" will be excluded
from the query results.MetadataServiceException
- if metadata sub-system error.void updateJobSet(MetadataServiceHandle handle, MetadataObjectId objectId, JobSet jobset) throws MetadataNotFoundException, ValidationException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the metadata object to update.jobset
- the modified JobSet to persist.MetadataNotFoundException
- if a JobSet for objectId
does not exist.ValidationException
- if validation the given JobSet fails.MetadataServiceException
- if metadata sub-system error.MetadataObjectId copyJobSet(MetadataServiceHandle handle, MetadataObjectId objectId, String packageName, String newName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobSet to be copied.packageName
- the optional package (namespace) in which
to create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.newName
- the name to be assigned to the new JobSet.MetadataNotFoundException
- if a JobSet for objectId
does not exist.ValidationException
- if validation of the JobSet fails.AlreadyExistsException
- if a JobSet for newName
already exists.MetadataServiceException
- if metadata sub-system error.void deleteJobSet(MetadataServiceHandle handle, MetadataObjectId objectId) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the JobSet to delete.MetadataServiceException
- if metadata sub-system error.MetadataObjectId addIncompatibility(MetadataServiceHandle handle, Incompatibility incompatibility, String packageName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.incompatibility
- the instance of the Incompatibility to persist.packageName
- the optional the package (namespace) in which
to create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.MetadataNotFoundException
- if any JobDefinition or JobSet
referenced in the Incompatibility do not exist.ValidationException
- if validation of the Incompatibility fails.AlreadyExistsException
- if an Incompatibility with the
same name already exists.MetadataServiceException
- if metadata sub-system error.Incompatibility getIncompatibility(MetadataServiceHandle handle, MetadataObjectId objectId, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either a mutable or immutable instance of the given object as desired. When changes are required to be made, a mutable instance must always be fetched.
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the Incompatibility to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if an Incompatibility for
objectId
does not exist.MetadataServiceException
- if metadata sub-system error.Incompatibility[] getIncompatibilities(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the order of the returned metadata objects is the same as the order of the IDs in the objectIds parameter.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the Incompatibilities
to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if an Incompatibility for a
given metadata id does not exist.MetadataServiceException
- if metadata sub-system error.Map getIncompatibilitiesMap(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the returned metadata objects is mapped to corresponding IDs in the objectIds parameter. For a missing metadata, MetadataNotFoundException will not be thrown and null is set at the value part of corresponding entry in the returned map.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the Incompatibilities
to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataServiceException
- if metadata sub-system error.@Deprecated Collection getIncompatibilities(MetadataServiceHandle handle, MetadataObjectId entity) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.entity
- the unique identifier of the JobDefinition or
JobSet for which all the Incompatibilities will be returned.MetadataServiceException
- if metadata sub-system error.Enumeration queryIncompatibilities(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryIncompatibilityObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.void updateIncompatibility(MetadataServiceHandle handle, MetadataObjectId objectId, Incompatibility incompatibility) throws MetadataNotFoundException, ValidationException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the metadata object to modify.incompatibility
- the modified Incompatibility to persist.MetadataNotFoundException
- if an Incompatibility for
objectId
does not exist.ValidationException
- if validation of the Incompatibility fails.MetadataServiceException
- if metadata sub-system error.MetadataObjectId copyIncompatibility(MetadataServiceHandle handle, MetadataObjectId objectId, String packageName, String newName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the Incompatibility
to be copied.packageName
- the optional package (namespace) in which
to create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.newName
- the name to be assigned to the new Incompatibility.MetadataNotFoundException
- if an Incompatibility for
objectId
does not exist.ValidationException
- if validation of the Incompatibility fails.AlreadyExistsException
- if an Incompatibility for newName
lready exists.MetadataServiceException
- if metadata sub-system error.void deleteIncompatibility(MetadataServiceHandle handle, MetadataObjectId objectId) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the Incompatibility to delete.MetadataServiceException
- if metadata sub-system error.MetadataObjectId addScheduleDefinition(MetadataServiceHandle handle, Schedule schedule, String packageName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.schedule
- the instance of the Schedule to persist.packageName
- the optional package (namespace) in which
to create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.MetadataNotFoundException
- if any ExclusionsDefinition
referenced by the given Schedule does not exist.ValidationException
- if validation of the Schedule fails.AlreadyExistsException
- if a Schedule with the same name
already exists.MetadataServiceException
- if metadata sub-system error.Schedule getScheduleDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either a mutable or immutable instance of the given object as desired. When changes are required to be made, a mutable instance must always be fetched.
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the Schedule to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a Schedule for objectId
does not exist.MetadataServiceException
- if metadata sub-system error.Schedule[] getScheduleDefinitions(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the order of the returned metadata objects is the same as the order of the IDs in the objectIds parameter.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the Schedules to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a Schedule for a given
metadata id does not exist.MetadataServiceException
- if metadata sub-system error.Map getScheduleDefinitionsMap(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the returned metadata objects is mapped to corresponding IDs in the objectIds parameter. For a missing metadata, MetadataNotFoundException will not be thrown and null is set at the value part of corresponding entry in the returned map.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the Schedules to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataServiceException
- if metadata sub-system error.Enumeration querySchedules(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryScheduleObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.void updateScheduleDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, Schedule schedule) throws MetadataNotFoundException, ValidationException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the metadata object to modify.schedule
- the modified Schedule to persist.MetadataNotFoundException
- if a Schedule for objectId
does not exist.ValidationException
- if validation of the given Schedule fails.MetadataServiceException
- if metadata sub-system error.MetadataObjectId copyScheduleDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, String packageName, String newName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the Schedule to be copied.packageName
- the optional package (namespace) in which
to create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.newName
- the name to be assigned to the new Schedule.MetadataNotFoundException
- if a Schedule for objectId
does not exist.ValidationException
- if validation of the Schedule fails.AlreadyExistsException
- if a Schedule for newName
already exists.MetadataServiceException
- if metadata sub-system error.void deleteScheduleDefinition(MetadataServiceHandle handle, MetadataObjectId objectId) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the Schedule to delete.MetadataServiceException
- if metadata sub-system error.MetadataObjectId addExclusionDefinition(MetadataServiceHandle handle, ExclusionsDefinition exclusion, String packageName) throws ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.exclusion
- the instance of the ExclusionsDefinition to persist.packageName
- the optional package (namespace) in which
to create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.ValidationException
- if validation of the ExclusionsDefinition
fails.AlreadyExistsException
- if an ExclusionsDefinition with the
same name already exists.MetadataServiceException
- if metadata sub-system error.ExclusionsDefinition getExclusionDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either a mutable or immutable instance of the given object as desired. When changes are required to be made, a mutable instance must always be fetched.
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the ExclusionsDefinition
to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a ExclusionsDefinition for
for objectId
does not exist.MetadataServiceException
- if metadata sub-system error.ExclusionsDefinition[] getExclusionDefinitions(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataNotFoundException, MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the order of the returned metadata objects is the same as the order of the IDs in the objectIds parameter.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the ExclusionsDefinition
to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataNotFoundException
- if a ExclusionsDefinition for
a given metadata id does not exist.MetadataServiceException
- if metadata sub-system error.Map getExclusionDefinitionsMap(MetadataServiceHandle handle, MetadataObjectId[] objectIds, boolean forUpdate) throws MetadataServiceException
This method returns either mutable or immutable instances of the given metadata ids as desired. When changes are required to be made, a mutable instance must always be fetched. It is to be noted that the returned metadata objects is mapped to corresponding IDs in the objectIds parameter. For a missing metadata, MetadataNotFoundException will not be thrown and null is set at the value part of corresponding entry in the returned map.
handle
- the MetadataServiceHandle to use.objectIds
- the unique identifiers of the ExclusionDefinitions
to retrieve.forUpdate
- indicates whether a mutable or immutable instances
should be fetched. If updates will be performed on the retrieved
objects, then mutable instances must be fetched by specifying a
value of true
. Otherwise false
should be specified
for read-only instances.MetadataServiceException
- if metadata sub-system error.Enumeration queryExclusionDefinitions(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.Enumeration queryExclusionDefinitionObjects(MetadataServiceHandle handle, Filter filter, MetadataService.QueryField orderBy, boolean ascending) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.filter
- specifies the fields, comparators, and values to
use for the search.orderBy
- the field name to be used to sort the query results.
If null
, then no specific ordering will be applied.
Only supported fields must be used.ascending
- controls whether the orderBy
argument
should be sorted in ascending or descending order.
true
for ascending, or false
for descending.MetadataServiceException
- if metadata sub-system error.void updateExclusionDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, ExclusionsDefinition exclusion) throws MetadataNotFoundException, ValidationException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the metadata object to modify.exclusion
- the modified ExclusionDefinition to persist.MetadataNotFoundException
- if an ExclusionsDefinition for
objectId
does not exist.ValidationException
- if validation of the ExclusionsDefinition
fails.MetadataServiceException
- if metadata sub-system error.MetadataObjectId copyExclusionDefinition(MetadataServiceHandle handle, MetadataObjectId objectId, String packageName, String newName) throws MetadataNotFoundException, ValidationException, AlreadyExistsException, MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the ExclusionsDefinition
to be copied.packageName
- the optional package (namespace) in which
to create the object. It can be null
, or a string in the
format "/pkg1/pkg2/...", with or without leading "/".
If specified, it allows further partitioning of the metadata objects.newName
- the name to be assigned to the new ExclusionsDefinition.MetadataNotFoundException
- if an ExclusionsDefinition for
for objectId
does not exist.ValidationException
- if validation of the ExclusionsDefinition
fails.AlreadyExistsException
- thrown if a ExclusionsDefinition for
newName
exists.MetadataServiceException
- if metadata sub-system error.void deleteExclusionDefinition(MetadataServiceHandle handle, MetadataObjectId objectId) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique identifier of the ExclusionsDefinition
to delete.MetadataServiceException
- if metadata sub-system error.boolean hasPermission(MetadataServiceHandle handle, MetadataObjectId objectId, MetadataPermission.Action[] actions) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- the unique metadata denitifer whose permissions
are being checked.actions
- the permission actions to check.true
if the current user has permissions to
perform all the actions listed on objectId
, or
false
otherwise.MetadataServiceException
- if metadata sub-system error.Map checkDetailedPermissions(MetadataServiceHandle handle, String[] metadataPermissionStrings, MetadataPermission.Action[] actions) throws MetadataServiceException
This method returns a Map with key as the permission string and
value as another map with key as the MetadataPermission.Action
and value as the boolean result of its permission check.
handle
- the MetadataServiceHandle to use.metadataPermissionStrings
- the unique permission identifiers
of MetadataObjectId that are the target of the permission check.actions
- te permission actions to check.Map
of {code Map}s if the current user has
permissions to perform the actions listed on the objectIds.MetadataServiceException
- if metadata sub-system error.Enumeration filterByPermission(MetadataServiceHandle handle, Enumeration objectIds, MetadataPermission.Action[] actions) throws MetadataServiceException
In other words, each identitfier in the objectIds list is checked
as in hasPermission
. Only the items which
do have permission for the listed actions will appear returned list.
handle
- the MetadataServiceHandle to se.objectIds
- a enumeration of unique identifiers (MetadataObjectIds)
to be filtered.actions
- the permission action to check.MetadataServiceException
- if metadata sub-system error.String[] getCustomMDSNamespace(MetadataServiceHandle handle) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.MetadataServiceException
- if metadata sub-system error.String[] getCustomMDSNamespace(MetadataServiceHandle handle, String domainName) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.domainName
- domain name. This parameter is currently ignored.MetadataServiceException
- if metadata sub-system error.boolean isInCustomMDSNamespace(MetadataServiceHandle handle, MetadataObjectId objectId) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.objectId
- unique identifier of the Ess metadata.true
if the objectId namespace is a custom MDS
namespace, or false
otherwise.MetadataServiceException
- if metadata sub-system error.boolean isInCustomMDSNamespace(MetadataServiceHandle handle, String packageName) throws MetadataServiceException
handle
- the MetadataServiceHandle to use.packageName
- package name of the Ess Metadata.true
if packageName
matches a custom
MDS namespace, or false
otherwise.MetadataServiceException
- if metadata sub-system error.