]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/remote/IOManagerBean.java
51a4726b158fcb14e20f9ceb7ecff499a4e41d58
2 * Copyright (C) 2007-2012 Mathieu Baudier
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org
.argeo
.jackrabbit
.remote
;
18 import java
.io
.IOException
;
19 import java
.util
.ArrayList
;
20 import java
.util
.List
;
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
;
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
>();
34 public boolean importContent(ImportContext context
, boolean isCollection
)
36 // TODO Auto-generated method stub
40 public boolean importContent(ImportContext context
, DavResource resource
)
42 // TODO Auto-generated method stub
46 public boolean exportContent(ExportContext context
, boolean isCollection
)
48 // TODO Auto-generated method stub
52 public boolean exportContent(ExportContext context
, DavResource resource
)
54 // TODO Auto-generated method stub
58 public synchronized void addIOHandler(IOHandler ioHandler
) {
59 ioHandlers
.add(ioHandler
);
62 public synchronized IOHandler
[] getIOHandlers() {
63 return ioHandlers
.toArray(new IOHandler
[ioHandlers
.size()]);
66 public Detector
getDetector() {
70 public void setDetector(Detector detector
) {
71 this.detector
= detector
;
74 public synchronized List
<IOHandler
> getIoHandlers() {
78 public synchronized void setIoHandlers(List
<IOHandler
> ioHandlers
) {
79 this.ioHandlers
= ioHandlers
;