001: /*
002: * Copyright 2004 Outerthought bvba and Schaubroeck nv
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.outerj.daisy.repository.commonimpl.schema;
017:
018: import org.outerj.daisy.repository.schema.*;
019: import org.outerj.daisy.repository.ValueType;
020: import org.outerj.daisy.repository.RepositoryException;
021: import org.outerj.daisy.repository.LinkExtractorInfos;
022: import org.outerj.daisy.repository.commonimpl.AuthenticatedUser;
023:
024: public class RepositorySchemaImpl implements RepositorySchema {
025: private final CommonRepositorySchema delegate;
026: private final AuthenticatedUser user;
027:
028: public RepositorySchemaImpl(CommonRepositorySchema delegate,
029: AuthenticatedUser user) {
030: this .delegate = delegate;
031: this .user = user;
032: }
033:
034: public DocumentType createNewDocumentType(String name) {
035: return createDocumentType(name);
036: }
037:
038: public DocumentType createDocumentType(String name) {
039: return delegate.createDocumentType(name, user);
040: }
041:
042: public void deleteDocumentType(long documentTypeId)
043: throws RepositoryException {
044: delegate.deleteDocumentType(documentTypeId, user);
045: }
046:
047: public FieldType createNewFieldType(String name, ValueType valueType) {
048: return createFieldType(name, valueType);
049: }
050:
051: public FieldType createFieldType(String name, ValueType valueType) {
052: return createFieldType(name, valueType, false);
053: }
054:
055: public FieldType createFieldType(String name, ValueType valueType,
056: boolean multiValue) {
057: return createFieldType(name, valueType, multiValue, false);
058: }
059:
060: public FieldType createFieldType(String name, ValueType valueType,
061: boolean multiValue, boolean hierarchical) {
062: return delegate.createFieldType(name, valueType, multiValue,
063: hierarchical, user);
064: }
065:
066: public void deleteFieldType(long fieldTypeId)
067: throws RepositoryException {
068: delegate.deleteFieldType(fieldTypeId, user);
069: }
070:
071: public PartType createNewPartType(String name, String mimeTypes) {
072: return createPartType(name, mimeTypes);
073: }
074:
075: public PartType createPartType(String name, String mimeTypes) {
076: return delegate.createPartType(name, mimeTypes, user);
077: }
078:
079: public void deletePartType(long partTypeId)
080: throws RepositoryException {
081: delegate.deletePartType(partTypeId, user);
082: }
083:
084: public DocumentTypes getAllDocumentTypes(boolean updateable)
085: throws RepositoryException {
086: return delegate.getAllDocumentTypes(updateable, user);
087: }
088:
089: public FieldTypes getAllFieldTypes(boolean updateable)
090: throws RepositoryException {
091: return delegate.getAllFieldTypes(updateable, user);
092: }
093:
094: public PartTypes getAllPartTypes(boolean updateable)
095: throws RepositoryException {
096: return delegate.getAllPartTypes(updateable, user);
097: }
098:
099: public PartType getPartTypeById(long id, boolean updateable)
100: throws RepositoryException {
101: return delegate.getPartTypeById(id, updateable, user);
102: }
103:
104: public PartType getPartTypeByName(String name, boolean updateable)
105: throws RepositoryException {
106: return delegate.getPartTypeByName(name, updateable, user);
107: }
108:
109: public PartType getPartType(String nameOrId, boolean updateable)
110: throws RepositoryException {
111: return delegate.getPartType(nameOrId, updateable, user);
112: }
113:
114: public FieldType getFieldTypeById(long id, boolean updateable)
115: throws RepositoryException {
116: return delegate.getFieldTypeById(id, updateable, user);
117: }
118:
119: public FieldType getFieldTypeByName(String name, boolean updateable)
120: throws RepositoryException {
121: return delegate.getFieldTypeByName(name, updateable, user);
122: }
123:
124: public FieldType getFieldType(String nameOrId, boolean updateable)
125: throws RepositoryException {
126: return delegate.getFieldType(nameOrId, updateable, user);
127: }
128:
129: public DocumentType getDocumentTypeById(long id, boolean updateable)
130: throws RepositoryException {
131: return delegate.getDocumentTypeById(id, updateable, user);
132: }
133:
134: public DocumentType getDocumentTypeByName(String name,
135: boolean updateable) throws RepositoryException {
136: return delegate.getDocumentTypeByName(name, updateable, user);
137: }
138:
139: public DocumentType getDocumentType(String nameOrId,
140: boolean updateable) throws RepositoryException {
141: return delegate.getDocumentType(nameOrId, updateable, user);
142: }
143:
144: public void addListener(RepositorySchemaListener listener) {
145: delegate.addListener(listener);
146: }
147:
148: public void removeListener(RepositorySchemaListener listener) {
149: delegate.removeListener(listener);
150: }
151:
152: public LinkExtractorInfos getLinkExtractors()
153: throws RepositoryException {
154: return delegate.getLinkExtractors(user);
155: }
156: }
|