001: /*
002: * Copyright 2004 Hippo Webworks.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.apache.slide.store;
017:
018: import org.apache.slide.util.ObjectCache;
019: import org.apache.slide.util.ObjectCacheInformation;
020: import org.apache.slide.util.ObjectCacheInformationStub;
021:
022: public class ExtendedStoreAccess {
023:
024: private ExtendedStore m_store;
025:
026: public ExtendedStoreAccess(ExtendedStore store) {
027: super ();
028:
029: m_store = store;
030: }
031:
032: public ObjectCache getContentCache() {
033: return m_store.contentCache;
034: }
035:
036: public ObjectCacheInformation getContentCacheInformation() {
037: ObjectCacheInformation result;
038:
039: ObjectCache objectCache = m_store.contentCache;
040: if (objectCache != null) {
041: result = (ObjectCacheInformation) objectCache;
042: } else {
043: result = new ObjectCacheInformationStub();
044: }
045:
046: return result;
047: }
048:
049: public ObjectCache getObjectsCache() {
050: return m_store.objectsCache;
051: }
052:
053: public ObjectCacheInformation getObjectsCacheInformation() {
054: ObjectCacheInformation result;
055:
056: ObjectCache objectCache = m_store.objectsCache;
057: if (objectCache != null) {
058: result = (ObjectCacheInformation) objectCache;
059: } else {
060: result = new ObjectCacheInformationStub();
061: }
062:
063: return result;
064: }
065:
066: public ObjectCache getPermissionsCache() {
067: return m_store.permissionsCache;
068: }
069:
070: public ObjectCacheInformation getPermissionsCacheInformation() {
071: ObjectCacheInformation result;
072:
073: ObjectCache objectCache = m_store.permissionsCache;
074: if (objectCache != null) {
075: result = (ObjectCacheInformation) objectCache;
076: } else {
077: result = new ObjectCacheInformationStub();
078: }
079:
080: return result;
081: }
082:
083: public ObjectCache getLocksCache() {
084: return m_store.locksCache;
085: }
086:
087: public ObjectCacheInformation getLocksCacheInformation() {
088: ObjectCacheInformation result;
089:
090: ObjectCache objectCache = m_store.locksCache;
091: if (objectCache != null) {
092: result = (ObjectCacheInformation) objectCache;
093: } else {
094: result = new ObjectCacheInformationStub();
095: }
096:
097: return result;
098: }
099:
100: public ObjectCache getDescriptorsCache() {
101: return m_store.descriptorsCache;
102: }
103:
104: public ObjectCacheInformation getDescriptorsCacheInformation() {
105: ObjectCacheInformation result;
106:
107: ObjectCache objectCache = m_store.descriptorsCache;
108: if (objectCache != null) {
109: result = (ObjectCacheInformation) objectCache;
110: } else {
111: result = new ObjectCacheInformationStub();
112: }
113:
114: return result;
115: }
116:
117: public ObjectCache getDescriptorCache() {
118: return m_store.descriptorCache;
119: }
120:
121: public ObjectCacheInformation getDescriptorCacheInformation() {
122: ObjectCacheInformation result;
123:
124: ObjectCache objectCache = m_store.descriptorCache;
125: if (objectCache != null) {
126: result = (ObjectCacheInformation) objectCache;
127: } else {
128: result = new ObjectCacheInformationStub();
129: }
130:
131: return result;
132: }
133: }
|