001: /*
002: * <copyright>
003: *
004: * Copyright 1997-2004 BBNT Solutions, LLC
005: * under sponsorship of the Defense Advanced Research Projects
006: * Agency (DARPA).
007: *
008: * You can redistribute this software and/or modify it under the
009: * terms of the Cougaar Open Source License as published on the
010: * Cougaar Open Source Website (www.cougaar.org).
011: *
012: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023: *
024: * </copyright>
025: */
026:
027: package org.cougaar.planning.ldm.plan;
028:
029: import org.cougaar.core.mts.MessageAddress;
030: import org.cougaar.planning.ldm.asset.Asset;
031:
032: /**
033: * AssetTransfer Interface
034: * An AssetTransfer is a type of PlanElement
035: * which represents an Asset being assigned to another Agent for use.
036: * An AssetAssignment PlanningDirective is closely related
037: *
038: **/
039: public interface AssetTransfer extends PlanElement {
040:
041: /**
042: * Returns an Asset that has certain capabilities.
043: * This Asset is being assigned to a agent for use.
044: *
045: * @return org.cougaar.planning.ldm.asset.Asset - a physical entity or agent that is assigned to a Agent.
046: */
047: Asset getAsset();
048:
049: /**
050: * Returns the Asset to which the asset is being assigned.
051: * @return Asset representing the destination asset
052: */
053: Asset getAssignee();
054:
055: /**
056: * Returns the Agent from which the asset was assigned.
057: * @return MessageAddress representing the source of the asset
058: */
059: MessageAddress getAssignor();
060:
061: /**
062: * Returns the Schedule for the "ownership" of the asset being transfered.
063: * @return Schedule
064: */
065: Schedule getSchedule();
066:
067: /**
068: * Checks to see if there is a potential conflict with another allocation
069: * or asset transfer involving the same asset.
070: * Will return true if there is a potential conflict.
071: * Will return false if there is NOT a potential conflict.
072: * @return boolean
073: */
074: boolean isPotentialConflict();
075:
076: /**
077: * Checks to see if there is a potential conflict with the asset's
078: * available schedule. ( Asset.getRoleSchedule().getAvailableSchedule() )
079: * Will return true if there is a potential conflict.
080: * @return boolean
081: */
082: boolean isAssetAvailabilityConflict();
083:
084: /**
085: * request that the destination organization be re-contacted due
086: * to changes in the transferred asset (e.g. Organization predictor
087: * has been modified. The AssetTransfer object also should be
088: * publishChange()ed.
089: **/
090: void indicateAssetChange();
091:
092: /** infrastructure hook for resetting AssetChange flag **/
093: void resetAssetChangeIndicated();
094:
095: /** is there an unprocessed asset change pending? **/
096: boolean isAssetChangeIndicated();
097:
098: /**
099: * Return the Role this Asset is performing while transferred.
100: * @return Role
101: */
102: Role getRole();
103: }
|