blob: b65811e99e2e9c5c1420f60b7bc2a4c17712c5ea [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
Filesystem Collection Adapter
Dependencies:
* Abdera Core, Parser, Protocol, Server modules
Using the Adapter:
The Filesystem adapter is based on Abdera Managed Adapter model. To deploy an
instance of the adapter, put a file called /abdera/adapter/[id].properties
in the classpath where [id] is the id of the service instance. For instance,
/abdera/adapter/fs.properties
Sample *.properties file
subUri=fs
adapterClassName=org.apache.abdera.protocol.server.adapters.filesystem.FilesystemAdapter
title=Filesystem Feed
author=james
configFile=dummyFileLocation
fs.root=/home/jasnell/tmp/fs
the fs.root property is required and must be set the location where the individual
entry documents will be stored
Then, deploy the AbderaServlet using the BasicProvider in your Web application environment:
Jetty deployment example:
Server server = new Server(9002);
Context context = new Context(server, "/", Context.SESSIONS);
ServletHolder servletHolder = new ServletHolder(new AbderaServlet());
servletHolder.setInitParameter(ServiceManager.PROVIDER, BasicProvider.class.getName());
context.addServlet(servletHolder, "/*");
server.start();
Using this example, the following resources will be served:
http://localhost:9002/ ==> Atompub Service Document
http://localhost:9002/fs ==> Atompub Collection Feed
http://localhost:9002/fs/{entry} ==> Entry document
Limitations:
The adapter does not support media collections.