01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/entity/tags/sakai_2-4-1/entity-api/api/src/java/org/sakaiproject/entity/api/EntityManager.java $
03: * $Id: EntityManager.java 7396 2006-04-06 03:46:58Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.entity.api;
21:
22: import java.util.List;
23:
24: /**
25: * <p>
26: * EntityManager is the API for managing EntityProducer services / managers.
27: * </p>
28: */
29: public interface EntityManager {
30: /**
31: * Access the list of managers that are registered EntityProducer.
32: *
33: * @return List (EntityProducer) of managers that are registered EntityProducer.
34: */
35: List getEntityProducers();
36:
37: /**
38: * Register this as an EntityProducer.
39: *
40: * @param manager
41: * The EntityProducer manager to register.
42: * @param referenceRoot
43: * The prefix of all entity references handeled by this producer (i.e. "content" if you handle "/content/..." references)
44: */
45: void registerEntityProducer(EntityProducer manager,
46: String referenceRoot);
47:
48: /**
49: * Create a new Reference object, from the given reference string.
50: *
51: * @param refString
52: * The reference string.
53: * @return a new reference object made from the given reference string.
54: */
55: Reference newReference(String refString);
56:
57: /**
58: * Create a new Reference object, as a copy of the given Reference object.
59: *
60: * @param copyMe
61: * The Reference object to copy
62: * @return a new Reference object, as a copy of the given Reference object.
63: */
64: Reference newReference(Reference copyMe);
65:
66: /**
67: * Create a new List specially designed to hold References.
68: *
69: * @return a new List specially designed to hold References.
70: */
71: List newReferenceList();
72:
73: /**
74: * Create a new List specially designed to hold References, as a copy of another.
75: *
76: * @param copyMe
77: * Make the new list contain a copy of this list.
78: * @return a new List specially designed to hold References, as a copy of another.
79: */
80: List newReferenceList(List copyMe);
81:
82: /**
83: * Check for a valid reference.
84: *
85: * @param ref
86: * a reference string.
87: * @return true if the reference is valid, false if not.
88: */
89: boolean checkReference(String ref);
90: }
|