Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


oracle.as.scheduler
Class ExclusionsDefinition

java.lang.Object
  extended by oracle.as.scheduler.BaseMetadata<ExclusionsDefinition>
      extended by oracle.as.scheduler.ExclusionsDefinition

All Implemented Interfaces:
java.io.Serializable

public class ExclusionsDefinition
extends BaseMetadata<ExclusionsDefinition>
implements java.io.Serializable

Used to represent a collection of Exclusion objects as a single unit.

Instances of ExclusionsDefinition are persisted in the metadata repository which makes it a sharable object across Schedule definitions.

An example is list of holidays represented as one instance of ExclusionsDefinition object that contains all the individual holidays represented by instances of Exclusion class. A Schedule then refer to this holidays to skip any occurrences that happen on any of these holidays.

See Also:
Exclusion, Schedule, Serialized Form

Constructor Summary
ExclusionsDefinition(java.lang.String name, java.lang.String description, java.util.Collection<Exclusion> exclusions)
          Constructs a new instance with the given collection of exclusions.
ExclusionsDefinition(java.lang.String name, java.lang.String description, java.util.Collection<Exclusion> exclusions, MetadataObjectId objectId)
          Constructs a new instance.
ExclusionsDefinition(java.lang.String name, java.lang.String displayNameKey, java.lang.String descriptionKey, java.util.Collection<Exclusion> exclusions, java.lang.String[] resourceBundleIDs)
          Constructs a new instance with the given collection of exclusions.

 

Method Summary
 void addExclusion(Exclusion exclusion)
          Add an exclusion to this object.
 ExclusionsDefinition clone(java.lang.String newName)
           
 boolean equals(java.lang.Object obj)
          Compares an object for equality with this ExclusionsDefinition object.
static ExclusionsDefinition from(javax.management.openmbean.CompositeData cd)
          Create an instance of the model specific class out of an associated CompositeData instance
 BaseMetadataType<ExclusionsDefinition> getBaseMetadataType()
           
 java.util.Collection<Exclusion> getExclusions()
          Returns the list of exclusions of this object.
protected  ExclusionsDefinition getSelf()
           
 boolean isExcluded(java.util.Calendar start, java.util.Calendar date)
          Check if a given date fall in the list of exclusions contained within this ExclusionsDefinition instance.
 void removeExclusion(Exclusion exclusion)
          Method to remove an Exclusion from this ExclusionsDefinition object.
 void setExclusions(java.util.Collection<Exclusion> exclusions)
          Sets the list of exclusions of this object.
 javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
           
static javax.management.openmbean.CompositeType toCompositeType()
          Returns the CompositeType that describes this model specific class
protected  void validateCustom()
          Validates this instance of ExclusionsDefinition.

 

Methods inherited from class oracle.as.scheduler.BaseMetadata
from, getDescription, getDescriptionKey, getDisplayName, getDisplayNameKey, getMessages, getMetadataObjectId, getName, getResourceBundles, hashCode, localize, setDescription, setDescriptionKey, setDisplayName, setDisplayNameKey, setResourceBundles, toCompositeData, toString, validate

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

ExclusionsDefinition

public ExclusionsDefinition(java.lang.String name,
                            java.lang.String description,
                            java.util.Collection<Exclusion> exclusions)
Constructs a new instance with the given collection of exclusions.
Parameters:
name - - name for this instance. It cannot be null. The name is also used as the default display name unless otherwise specifially set.
description - - optional description string.
exclusions - - collection of exclusions instances for the new instance.

ExclusionsDefinition

public ExclusionsDefinition(java.lang.String name,
                            java.lang.String displayNameKey,
                            java.lang.String descriptionKey,
                            java.util.Collection<Exclusion> exclusions,
                            java.lang.String[] resourceBundleIDs)
Constructs a new instance with the given collection of exclusions.
Parameters:
name - -- name for this instance. It cannot be null. The name is also used as the default display name unless otherwise specifially set.
displayNameKey - - the key of the entry in the resourcebundles to lookup the display name. Optional
descriptionKey - - the key of the entry in the resourcebundles to lookup the description. Optional.
exclusions - - collection of exclusions instances for the new instance.
resourceBundleIDs - -- an array of resource bundle id, Optional

ExclusionsDefinition

public ExclusionsDefinition(java.lang.String name,
                            java.lang.String description,
                            java.util.Collection<Exclusion> exclusions,
                            MetadataObjectId objectId)
Constructs a new instance. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.
Parameters:
name - - name for this instance. It cannot be null.
description - - optional description string.
exclusions - - collection of exclusions instances for the new instance.
objectId - - unique identifier of this object in the metadata repository. The identifier is set which this object is retrieved via MetadataService.

Method Detail

addExclusion

public void addExclusion(Exclusion exclusion)
Add an exclusion to this object.
Parameters:
exclusion - - instance of Exclusion to be added to this object.

removeExclusion

public void removeExclusion(Exclusion exclusion)
Method to remove an Exclusion from this ExclusionsDefinition object.
Parameters:
exclusion - - the Exclusion instance to be removed from the list of exclusions contained in this object.

getExclusions

public java.util.Collection<Exclusion> getExclusions()
Returns the list of exclusions of this object.
Returns:
- a collection containing the list of exclusions of this object.

setExclusions

public void setExclusions(java.util.Collection<Exclusion> exclusions)
Sets the list of exclusions of this object.
Parameters:
exclusions - - a collection containing the list of exclusions to be set for this object.

isExcluded

public boolean isExcluded(java.util.Calendar start,
                          java.util.Calendar date)
Check if a given date fall in the list of exclusions contained within this ExclusionsDefinition instance. If found, it indicates that the given date must be skipped or excluded.

The method takes a starting time as an argument that is used to generate occurrence if any of the Exclusion contained in this object is based on Recurrence

Parameters:
start - - the start time for any recurrence based Exclusion.
date - - the date to be checked for exclusion.
Returns:
- true of the given date must be excluded, false otherwise.

validateCustom

protected void validateCustom()
                       throws ValidationException
Validates this instance of ExclusionsDefinition.

The method performs checks that are possible on this object. It does not ensure the existence of objects referenced by this definition. Such references and related validations are done by the MetadataService at the time of object persistence. MetadataService also calls this method to ensure only valid objects are persisted.

Specified by:
validateCustom in class BaseMetadata<ExclusionsDefinition>
Throws:
ValidationException - - thrown if any invalid data is detected.

equals

public boolean equals(java.lang.Object obj)
Compares an object for equality with this ExclusionsDefinition object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - - the object to compare with this ExclusionsDefinition.
Returns:
- true if the object passed in is an instance of ExclusionsDefinition and is equal to this ExclusionsDefinition, false otherwise.

toCompositeType

public static javax.management.openmbean.CompositeType toCompositeType()
Returns the CompositeType that describes this model specific class

toCompositeData

public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
Specified by:
toCompositeData in class BaseMetadata<ExclusionsDefinition>

from

public static ExclusionsDefinition from(javax.management.openmbean.CompositeData cd)
                                 throws java.lang.IllegalArgumentException
Create an instance of the model specific class out of an associated CompositeData instance
Throws:
java.lang.IllegalArgumentException

getSelf

protected ExclusionsDefinition getSelf()
Specified by:
getSelf in class BaseMetadata<ExclusionsDefinition>

getBaseMetadataType

public BaseMetadataType<ExclusionsDefinition> getBaseMetadataType()
Specified by:
getBaseMetadataType in class BaseMetadata<ExclusionsDefinition>

clone

public ExclusionsDefinition clone(java.lang.String newName)
Specified by:
clone in class BaseMetadata<ExclusionsDefinition>

Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.