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: package org.apache.cocoon.webapps.session.context;
18:
19: import org.apache.cocoon.ProcessingException;
20:
21: /**
22: * Interface for a context provider.
23: * Objects of this class provide special context, e.g. authentication or portal.
24: * The provider has to take care that the context is instantiated and managed
25: * correctly: for example a request context object should only created once
26: * per request, an authentication context once per session etc.
27: *
28: * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
29: * @deprecated This block is deprecated and will be removed in future versions.
30: * @version CVS $Id: SessionContextProvider.java 433543 2006-08-22 06:22:54Z crossley $
31: */
32: public interface SessionContextProvider {
33:
34: String ROLE = SessionContextProvider.class.getName();
35:
36: /**
37: * Get the context
38: * @param name The name of the context
39: * @return The context
40: * @throws ProcessingException If the context is not available.
41: */
42: SessionContext getSessionContext(String name)
43: throws ProcessingException;
44:
45: /**
46: * Does the context exist?
47: */
48: boolean existsSessionContext(String name)
49: throws ProcessingException;
50:
51: }
|