]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.server.jackrabbit/src/org/argeo/jackrabbit/remote/IOManagerBean.java
Merge adaptations related to the new third parties.
[lgpl/argeo-commons.git] / org.argeo.server.jackrabbit / src / org / argeo / jackrabbit / remote / IOManagerBean.java
1 /*
2 * Copyright (C) 2007-2012 Argeo GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.jackrabbit.remote;
17
18 import java.io.IOException;
19 import java.util.ArrayList;
20 import java.util.List;
21
22 import org.apache.jackrabbit.server.io.ExportContext;
23 import org.apache.jackrabbit.server.io.IOHandler;
24 import org.apache.jackrabbit.server.io.IOManager;
25 import org.apache.jackrabbit.server.io.ImportContext;
26 import org.apache.jackrabbit.webdav.DavResource;
27 import org.apache.tika.detect.Detector;
28
29 /** {@link IOManager} that can easily be configured as a bean. */
30 public class IOManagerBean implements IOManager {
31 private Detector detector = null;
32 private List<IOHandler> ioHandlers = new ArrayList<IOHandler>();
33
34 public boolean importContent(ImportContext context, boolean isCollection)
35 throws IOException {
36 // TODO Auto-generated method stub
37 return false;
38 }
39
40 public boolean importContent(ImportContext context, DavResource resource)
41 throws IOException {
42 // TODO Auto-generated method stub
43 return false;
44 }
45
46 public boolean exportContent(ExportContext context, boolean isCollection)
47 throws IOException {
48 // TODO Auto-generated method stub
49 return false;
50 }
51
52 public boolean exportContent(ExportContext context, DavResource resource)
53 throws IOException {
54 // TODO Auto-generated method stub
55 return false;
56 }
57
58 public synchronized void addIOHandler(IOHandler ioHandler) {
59 ioHandlers.add(ioHandler);
60 }
61
62 public synchronized IOHandler[] getIOHandlers() {
63 return ioHandlers.toArray(new IOHandler[ioHandlers.size()]);
64 }
65
66 public Detector getDetector() {
67 return detector;
68 }
69
70 public void setDetector(Detector detector) {
71 this.detector = detector;
72 }
73
74 public synchronized List<IOHandler> getIoHandlers() {
75 return ioHandlers;
76 }
77
78 public synchronized void setIoHandlers(List<IOHandler> ioHandlers) {
79 this.ioHandlers = ioHandlers;
80 }
81
82 }