01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: /**
18: * Created on Jan 13, 2004
19: *
20: *
21: * @author
22: */package org.apache.jetspeed.deployment.simpleregistry;
23:
24: import java.util.Collection;
25:
26: /**
27: * <p>
28: * SimpleRegistry
29: * </p>
30: * <p>
31: * This is an interface for creating simple registry systems. A good example would be an
32: * in memory registry that gets populate at runtime and is lost on shutdown.
33: *
34: * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
35: * @version $Id: SimpleRegistry.java 516881 2007-03-11 10:34:21Z ate $
36: *
37: */
38: public interface SimpleRegistry {
39: /**
40: * Registers the entry.
41: *
42: * @throws java.lang.IllegalAgrumentException in <code>entry</code> is null or
43: * <code>entry.getId()</code> is null
44: * @throws org.apache.jetspeed.cps.simpleregistry if this <code>entry</code> is
45: * already registered.
46: * @param entry
47: */
48: public void register(Entry entry) throws SimpleRegistryException;
49:
50: /**
51: * De-registers the entry
52: * @param entry
53: * @throws java.lang.IllegalAgrumentException in <code>entry</code> is null or
54: * <code>entry.getId()</code> is null
55: */
56: public void deRegister(Entry entry);
57:
58: /**
59: * Verifies whether or not this entry is registered.
60: * @param entry
61: *
62: * @return boolean <code>true</code> is the <code>entry</code> is registered
63: * otherwise <code>false</code>.
64: * @throws java.lang.IllegalAgrumentException in <code>entry</code> is null or
65: * <code>entry.getId()</code> is null
66: */
67: public boolean isRegistered(Entry entry);
68:
69: /**
70: * Provides a Cloolection of <code>org.apache.jetspeed.cps.simpleregistry.Entry</code>
71: * objects that are currently registered to this registery
72: * @return
73: */
74: public Collection getRegistry();
75:
76: }
|