You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by ta...@apache.org on 2005/01/20 22:48:46 UTC
svn commit: r125828 - in incubator/graffito/trunk/components/src/java/org/apache/portals/graffito: impl model/impl persistence
Author: taylor
Date: Thu Jan 20 14:48:45 2005
New Revision: 125828
URL: http://svn.apache.org/viewcvs?view=rev&rev=125828
Log:
- new api to create a FileSystem Server on ContentServerService
- implementation of FileSystemServer
Added:
incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/FileSystemServerImpl.java
Modified:
incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentServerServiceImpl.java
incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/ContentPersistenceService.java
Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentServerServiceImpl.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentServerServiceImpl.java?view=diff&rev=125828&p1=incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentServerServiceImpl.java&r1=125827&p2=incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentServerServiceImpl.java&r2=125828
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentServerServiceImpl.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/impl/ContentServerServiceImpl.java Thu Jan 20 14:48:45 2005
@@ -105,7 +105,32 @@
return server;
}
+ // ========================================================================
+ // F I L E S Y S T E M S E R V E R
+ // ========================================================================
+ /**
+ *
+ * @see ContentServerService#createFileSystemServer()
+ *
+ */
+ public FileSystemServer createFileSystemServer() throws ContentManagementException
+ {
+ FileSystemServer server = null;
+ try
+ {
+ server = (FileSystemServer) persistence.createObject(ContentPersistenceService.FILE_SYSTEM_SERVER);
+ }
+ catch (CmsInstantiateException e)
+ {
+ String message = "Failed to create File System store server object in ContentServerServiceImpl";
+ logger.error(message, e);
+ throw new ContentManagementException(message, e);
+ }
+ return server;
+ }
+
+
// ========================================================================
// S E R V E R
// ========================================================================
Added: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/FileSystemServerImpl.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/FileSystemServerImpl.java?view=auto&rev=125828
==============================================================================
--- (empty file)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/FileSystemServerImpl.java Thu Jan 20 14:48:45 2005
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2000-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.portals.graffito.model.impl;
+
+import org.apache.portals.graffito.model.FileSystemServer;
+
+
+/**
+ * File System Server
+ *
+ * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+ * @version $Id: $
+ */
+public class FileSystemServerImpl extends ServerImpl implements FileSystemServer
+{
+ private static final long serialVersionUID = 1;
+ String root;
+
+ /**
+ * @return Returns the root.
+ */
+ public String getRoot()
+ {
+ return root;
+ }
+ /**
+ * @param root The root to set.
+ */
+ public void setRoot(String root)
+ {
+ this.root = root;
+ }
+}
Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/ContentPersistenceService.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/ContentPersistenceService.java?view=diff&rev=125828&p1=incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/ContentPersistenceService.java&r1=125827&p2=incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/ContentPersistenceService.java&r2=125828
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/ContentPersistenceService.java (original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/persistence/ContentPersistenceService.java Thu Jan 20 14:48:45 2005
@@ -62,6 +62,9 @@
/** Graffito Store Interface name - use to instantiate GraffitoServer reference */
public final static String GRAFFITO_SERVER = "GraffitoServer";
+ /** File System Store Interface name - use to instantiate FileSystem Server reference */
+ public final static String FILE_SYSTEM_SERVER = "FileSystemServer";
+
/**
* Factory method to create cms objects. It is a generic factory used to
* create all CMS related objects like Document, Folder but also Server, HistoryElement, ... .