001: /*
002: * ObjectManager.java
003: *
004: * Version: $Revision: 1.1 $
005: *
006: * Date: $Date: 2006/03/20 22:39:04 $
007: *
008: * Copyright (c) 2002, Hewlett-Packard Company and Massachusetts
009: * Institute of Technology. All rights reserved.
010: *
011: * Redistribution and use in source and binary forms, with or without
012: * modification, are permitted provided that the following conditions are
013: * met:
014: *
015: * - Redistributions of source code must retain the above copyright
016: * notice, this list of conditions and the following disclaimer.
017: *
018: * - Redistributions in binary form must reproduce the above copyright
019: * notice, this list of conditions and the following disclaimer in the
020: * documentation and/or other materials provided with the distribution.
021: *
022: * - Neither the name of the Hewlett-Packard Company nor the name of the
023: * Massachusetts Institute of Technology nor the names of their
024: * contributors may be used to endorse or promote products derived from
025: * this software without specific prior written permission.
026: *
027: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
028: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
029: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
030: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
031: * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
032: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
033: * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
034: * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
035: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
036: * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
037: * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
038: * DAMAGE.
039: */
040:
041: package org.dspace.app.xmlui.wing;
042:
043: import java.util.HashMap;
044:
045: /**
046: * The object manager is a class that must be implemented by each specific repository
047: * implementation that identifies refrenced objects. Since the DRI document includes
048: * refrences to external resources implementers of this class must know how objects
049: * are refrenced.
050: *
051: * The specefic implementation of ObjectManager that is used is determened by the
052: * WingComponent that is creating the refrence.
053: *
054: * @author Scott Phillips
055: */
056:
057: public interface ObjectManager {
058: /**
059: * Determine if the supplied object is manageable by this implementation of
060: * ObjectManager. If the object is manageable then manage it, and return true.
061: *
062: * @param object
063: * The object to be managed.
064: * @return true if the object can be managed, otherwise false.
065: */
066: public boolean manageObject(Object object) throws WingException;
067:
068: /**
069: * Return a url refrencing the object's metadata. If this is unabvailable
070: * return null.
071: *
072: * @param object The object being managed.
073: */
074: public String getObjectURL(Object object) throws WingException;
075:
076: /**
077: * Return a descriptive, repository specfic, type for the object. If
078: * this is unabvailable return null.
079: *
080: * @param object The object being managed.
081: */
082: public String getObjectType(Object object) throws WingException;
083:
084: /**
085: * Return a unique identifier of the repository this object is contained
086: * in. If this is unabvailable return null.
087: *
088: * @param object The object being managed.
089: */
090: public String getRepositoryIdentifier(Object object)
091: throws WingException;
092:
093: /**
094: * Return a list of all repositories managed by this manager. The
095: * hash should be of the form repository identifier as the key,
096: * and the value for each key is a metadata URL.
097: */
098: public HashMap<String, String> getAllManagedRepositories()
099: throws WingException;
100: }
|