portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raph...@apache.org
Subject cvs commit: jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/db cms-slide.properties cms-slide.script
Date Sat, 09 Nov 2002 19:02:53 GMT
raphael     2002/11/09 11:02:53

  Modified:    scratchpad/jetspeed-cms build.properties
               scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms
                        DefaultCmsService.java
               scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager
                        CmsManager.java CmsManagerSlideImpl.java
               scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/util/cms
                        CMSLink.java
               scratchpad/jetspeed-cms/webapp/WEB-INF/conf
                        CmsResources.properties Domain.xml
               scratchpad/jetspeed-cms/webapp/WEB-INF/db
                        cms-slide.properties cms-slide.script
  Added:       scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms
                        Catalog.java ContentItem.java Link.java
                        Permission.java Resource.java
               scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/slide
                        SlideCatalog.java SlideContentItem.java
                        SlideLink.java SlidePermission.java
                        SlideResource.java
               scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager
                        CmsFactory.java
  Removed:     scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/slide
                        Catalog.java ContentItem.java Link.java
                        Permission.java Resource.java
               scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager
                        CmsManagerFactory.java
  Log:
  Update of the slide integration code
  provided by Christophe Lombart <christophe.lombart@skynet.be>
  
  Revision  Changes    Path
  1.2       +2 -4      jakarta-jetspeed/scratchpad/jetspeed-cms/build.properties
  
  Index: build.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/build.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.properties	29 Oct 2002 16:05:25 -0000	1.1
  +++ build.properties	9 Nov 2002 19:02:52 -0000	1.2
  @@ -4,8 +4,6 @@
   #       comment it's home property. For example, if you don't want to run the
   #       tests on the Resin 1.2, comment out the "resin.home.12" property.
   
  -
  -tomcat.home.40=D:/MyApplication/Apache Tomcat 4.0
  -install.war=D:/MyApplication/Apache Tomcat 4.0/webapps
  -deploy.war=D:/MyApplication/Apache Tomcat 4.0/webapps
  +#install.war=D:/MyApplication/Apache Tomcat 4.0/webapps
  +install.war=D:/JavaProjects
   locale.default=en
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/Catalog.java
  
  Index: Catalog.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.jetspeed.om.cms;
  
  import java.util.Vector;
  import java.util.TreeMap;
  import java.util.Comparator;
  
  
  /**
   * <p> CMS om interface for Catalog.<br>
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public interface Catalog extends Resource
  {
  
  	public void addResource(String itemKey, Resource resource);
  
  	public Vector getItems();
  	
  	public String getKey();
  	
  	public void setLogicalName(String logicalName);
  	
  	public String getLogicalName();
  
  	public void setTitle(String title);
  
  	public String getTitle();
  
  	public void setParentUri(String parentUri);
  	
  	public String getParentUri();
  
  	public String getType();
  
  }
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/ContentItem.java
  
  Index: ContentItem.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.jetspeed.om.cms;
  
  import org.apache.turbine.util.Log;
  
  /**
   * <p> CMS om interface for for Content Item.<br>
   * Used to access to the content attributes
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  
  public interface ContentItem extends Resource
  {
  
  
  	public boolean contentTypeisURLPortal();
  
  	public boolean contentTypeisURLInternet();
  
  	public boolean contentTypeisHTML();
  
  	public boolean contentTypeisUpload();
  
  	public void setContentClass(String contentClass);
  
  	public String getContentClass();
  
  
  	public void setDescription(String description);
  
  	public String getDescription();
  
  	public void setContentType(String contentType);
  
  	public String getContentType();
  
  	public void setContentReference(String contentReference);
  
  	public String getContentReference();
  
  	public void setAuthor(String author);
  
  	public String getAuthor();
  
  	public void setCreationDate_year(Integer creationDate_year);
  
  	public Integer getCreationDate_year();
  
  	public void setCreationDate_month(Integer creationDate_month);
  
  	public Integer getCreationDate_month();
  	
  	public void setCreationDate_day(Integer creationDate_day);
  
  	public Integer getCreationDate_day();
  
  	public void setParentUri(String parentUri);
  	
  	public String getParentUri();
  	
  
  }
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/Link.java
  
  Index: Link.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package  org.apache.jetspeed.om.cms;
  
  /**
   * <p> Wrapper class for a link node.<br>
   * Used to access to the Link attributes
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public interface Link extends Resource
  {
  	
  
  	public void setTargetResourceUri(String newTargetResourceUri);
  
  	public String getTargetResourceUri();
  }
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/Permission.java
  
  Index: Permission.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package  org.apache.jetspeed.om.cms;
  
  /**
   * <p> Permission interface assign to a {@link Resource}
   *
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public interface Permission
  {
  
  	public String getActor();
  	
  	public void setActor(String actor);
  	
  	public void setAction(String action);
  	
  	public String getAction();
  	
  	public void setInheritable(boolean inheritable);
  	
  	public boolean isInheritable();
  	
  	public void setNegative(boolean negative);
  	
  	public boolean isNegative();
  	
  }
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/Resource.java
  
  Index: Resource.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package  org.apache.jetspeed.om.cms;
  
  import java.util.Vector;
  
  
  
  /**
   * <p> Ancestor interface used for all content management resource
   *
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public interface Resource
  {
  
  	public String getKey();
  
  	public String getTitle();
  	
  	public void setUri(String uri);
  
  	public String getUri();
  	
  	public String getType();
  	
  	public void setPermissions(Vector permissions);
  	
  	public Vector getPermissions();
  	
  	public void addPermission(Permission permission);
  	
  }
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/slide/SlideCatalog.java
  
  Index: SlideCatalog.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.jetspeed.om.cms.slide;
  
  import java.util.Vector;
  import java.util.TreeMap;
  import java.util.Comparator;
  
  import org.apache.jetspeed.om.cms.*;
  
  /**
   * <p> Wrapper class for a slide catalog resource (ObjectNode).<br>
   * Used to access to the catalog attributes
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public class SlideCatalog extends SlideResource implements Catalog 
  {
  
  	protected String logicalName = "";
  	private String title = "";
  	private String parentUri ="";
  	public static String TYPE="Catalog";
  	private TreeMap items = new TreeMap(new ItemComparator());
  
  	/**
  	* Constructor
  	*/
  	public SlideCatalog()
  	{
  		super();
  		descriptor.setProperty("resourcetype","<collection/>");
  	}
  
  	public void addResource(String itemKey, Resource resource)
  	{
  		items.put(itemKey, resource);
  	}
  
  	public Vector getItems()
  	{
  		return new Vector(items.values()); // return a vector of "Resource"
  	}
  
  	/**
  	* Use in the comparator class for the treemap
  	*
  	*/
  	public String getKey()
  	{
  		return "1" + this.getTitle( ); // "1" because the catalog should
                                      // before the contentItem reference
  	}
  
  	public void setLogicalName(String logicalName)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("logicalName", logicalName);
  		}
  
       	this.logicalName = logicalName;
  	}
  
  	public String getLogicalName()
  	{
  		if ((descriptor != null) && ((this.logicalName == null) || (this.logicalName.equals(""))))
  		{
  			this.logicalName = (String) this.getProperty("logicalName");
  		}
  
  		return this.logicalName;
  	}
  
  	public void setTitle(String title)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("title", title);
  		}
  
  		this.title = title;
  	}
  
  	public String getTitle()
  	{
  		if ((descriptor != null) && ((this.title == null) || (this.title.equals(""))))
  		{
  			this.title = (String) this.getProperty("title");
  		}
  
  		return this.title;
  	}
  
  
  	public void setParentUri(String parentUri)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("parentUri", parentUri);
  		}
  
  		this.parentUri = parentUri;
  	}
  
  	public String getParentUri()
  	{
  		if ((descriptor != null) && ((this.parentUri == null) || (this.parentUri.equals(""))))
  		{
  			this.parentUri = (String) this.getProperty("parentUri");
  		}
  
  		return this.parentUri;
  	}
  
  	public String getType()
  	{
  		return SlideCatalog.TYPE;
  	}
  
  	class ItemComparator implements Comparator
  	{
  		public int compare (Object key1, Object key2)
  		{
          	return ((String) key1).compareTo((String)key2);
  		}
  	}
  }
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/slide/SlideContentItem.java
  
  Index: SlideContentItem.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.jetspeed.om.cms.slide;
  
  import org.apache.turbine.util.Log;
  
  import org.apache.jetspeed.om.cms.*;
  
  
  /**
   * <p> Wrapper class for a content Item (ObjectNode).<br>
   * Used to access to the content attributes
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  
  public class SlideContentItem extends SlideResource implements ContentItem
  {
  	private String logicalName = "";
  	private String description = "";
  	private String contentType= "";            // URL, HTML Text or upload// if contentType = URL => external or portal link
  	private String contentReference = "";  // url or HTML content
  	private String contentClass="" ; // Application or Document
  	private String title = "";
  	private String author = "";
  	private Integer creationDate_year;
  	private Integer creationDate_month;
  	private Integer creationDate_day;
  	private String parentUri;
  
  	public static String TYPE = "ContentItem";
  
  	/**
  	* getKey() : use in the comparator defined in the Catalog.java class
  	*/
  	public String getKey()
  	{
  		return "2" + this.getTitle( ); // "2" because the contentItem should
  									 // after the catalogs reference
  	}
  
  	public boolean contentTypeisURLPortal()
  	{
  		String type = this.getContentType();
  
  		if (type == null)
  		{
  			return false;
  		}
  
  		return type.equals("URLPORT");
  	}
  
  	public boolean contentTypeisURLInternet()
  	{
  		String type = this.getContentType();
  
  		if (type == null)
  		{
  			return false;
  		}
  
  		return type.equals("URLINT");
  	}
  
  	public boolean contentTypeisHTML()
  	{
  		String type = this.getContentType();
  
  		if (type == null)
  		{
  			return false;
  		}
  
  		return type.equals("HTML");
  	}
  
  	public boolean contentTypeisUpload()
  	{
  		String type = this.getContentType();
  
  		if (type == null)
  		{
  			return false;
  		}
  
  		return type.equals("UPLOAD");
  	}
  
  	public void setContentClass(String contentClass)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("contentClass", contentClass);
  		}
  
   		this.contentClass = contentClass;
  	}
  
  	public String getContentClass()
  	{
  		if ((descriptor != null) && ((this.contentClass == null) || (this.contentClass.equals(""))))
  		{
  			this.contentClass = (String) this.getProperty("contentClass");
  		}
  
  		return this.contentClass;
  	}
  
  	public void setLogicalName(String logicalName)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("logicalName", logicalName);
  		}
  
  		this.logicalName = logicalName;
  	}
  
  	public String getLogicalName()
  	{
  
  		if (Log.getLogger().isDebugEnabled())
  		{
  			Log.debug("ContentItem.getLogicalName() :" + this.uri);
  		}
  
  		if ((descriptor != null) && ((this.logicalName == null) || (this.logicalName.equals(""))))
  		{
  			this.logicalName = (String) this.getProperty("logicalName");
  		}
  
  		return this.logicalName;
  	}
  
  	public void setDescription(String description)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("description", description);
  		}
  
  		this.description = description;
  	}
  
  	public String getDescription()
  	{
  		if ((descriptor != null) && ((this.description == null) || (this.description.equals(""))))
  		{
  			this.description = (String) this.getProperty("description");
  		}
  
  		return this.description;
  	}
  
  	public void setContentType(String contentType)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("contentType", contentType);
  		}
  
  		this.contentType = contentType;
  	}
  
  	public String getContentType()
  	{
  		if ((descriptor != null) && ((this.contentType == null) || (this.contentType.equals(""))))
  		{
  			this.contentType = (String) this.getProperty("contentType");
  		}
  
  		return this.contentType;
  	}
  
  	public void setContentReference(String contentReference)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("contentReference", contentReference);
  		}
  	  this.contentReference = contentReference;
  	}
  
  	public String getContentReference()
  	{
  		if ((descriptor != null) && ((this.contentReference == null) || (this.contentReference.equals(""))))
  		{
  			this.contentReference = (String) this.getProperty("contentReference");
  		}
  
  		return this.contentReference;
  	}
  
  	public void setTitle(String title)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("title", title);
  		}
  
  		this.title = title;
  	}
  
  	public String getTitle()
  	{
  		if ((descriptor != null) && ((this.title == null) || (this.title.equals(""))))
  		{
  			this.title = (String) this.getProperty("title");
  		}
  
  		return this.title;
  	}
  
  	public void setAuthor(String author)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("author", author);
  		}
  
  		this.author = author;
  	}
  
  	public String getAuthor()
  	{
  		if ((descriptor != null) && ((this.author == null) || (this.author.equals(""))))
  		{
  			this.author = (String) this.getProperty("author");
  		}
  
  		return this.author;
  	}
  
  	public void setCreationDate_year(Integer creationDate_year)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("creationDate_year", creationDate_year);
  		}
  
  		this.creationDate_year = creationDate_year;
  	}
  
  	public Integer getCreationDate_year()
  	{
  		if ((descriptor != null) && ((this.creationDate_year == null)))
  		{
  			this.creationDate_year = (Integer)this.getProperty("creationDate_year");
  		}
  
  		return this.creationDate_year;
  	}
  
  	public void setCreationDate_month(Integer creationDate_month)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("creationDate_month", creationDate_month);
  		}
  
  		this.creationDate_month = creationDate_month;
  	}
  
  	public Integer getCreationDate_month()
  	{
  		if ((descriptor != null) && ((this.creationDate_month == null)))
  		{
  			this.creationDate_month = (Integer) this.getProperty("creationDate_month");
  		}
  
  		return this.creationDate_month;
  	}
  
  	public void setCreationDate_day(Integer creationDate_day)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("creationDate_day", creationDate_day);
  		}
  
  		this.creationDate_day = creationDate_day;
  	}
  
  	public Integer getCreationDate_day()
  	{
  		if ((descriptor != null) && ((this.creationDate_day == null)))
  		{
  			this.creationDate_day = (Integer)this.getProperty("creationDate_day");
  		}
  
  		return this.creationDate_day;
  	}
  
  	public void setParentUri(String parentUri)
  	{
  		if (descriptor != null)
  		{
  			descriptor.setProperty("parentUri", parentUri);
  		}
  
  		this.parentUri = parentUri;
  	}
  
  	public String getParentUri()
  	{
  		if ((descriptor != null) && ((this.parentUri == null) || (this.parentUri.equals(""))))
  		{
  			this.parentUri = (String) this.getProperty("parentUri");
  		}
  
  		return this.parentUri;
  	}
  
  	public String getType()
  	{
  		return SlideContentItem.TYPE;
  	}
  }
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/slide/SlideLink.java
  
  Index: SlideLink.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  
  package  org.apache.jetspeed.om.cms.slide;
  
  import org.apache.jetspeed.om.cms.*;
  
  /**
   * <p> Wrapper class for a link node.<br>
   * Used to access to the Link attributes
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public class SlideLink extends SlideResource implements Link
  {
  	private String targetResourceUri;
  	public transient static String TYPE="Link";
  
  	public String getType()
  	{
  		return SlideLink.TYPE;
  	}
  
  	public void setTargetResourceUri(String newTargetResourceUri)
  	{
  		targetResourceUri = newTargetResourceUri;
  	}
  
  	public String getTargetResourceUri()
  	{
  		return targetResourceUri;
  	}
  }
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/slide/SlidePermission.java
  
  Index: SlidePermission.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package  org.apache.jetspeed.om.cms.slide;
  
  import org.apache.jetspeed.om.*;
  import org.apache.jetspeed.om.cms.Permission;
  /**
   * <p> Permission assign to a {@link Resource}
   *
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public class SlidePermission implements Permission
  {
  
  	private String actor;
  	private String action;
  	private boolean inheritable;
  	private boolean negative;
  
  	public String getActor()
  	{
  		return actor;
  	}
  
  	public void setActor(String actor)
  	{
  		this.actor = actor;
  	}
  
  	public void setAction(String action)
  	{
  		this.action = action;
  	}
  
  	public String getAction()
  	{
  		return action;
  	}
  
  	public void setInheritable(boolean inheritable)
  	{
  		this.inheritable = inheritable;
  	}
  
  	public boolean isInheritable()
  	{
  		return inheritable;
  	}
  
  	public void setNegative(boolean negative)
  	{
  		this.negative = negative;
  	}
  
  	public boolean isNegative()
  	{
  		return negative;
  	}
  }
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/om/cms/slide/SlideResource.java
  
  Index: SlideResource.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package  org.apache.jetspeed.om.cms.slide;
  
  import java.util.Vector;
  import org.apache.slide.content.NodeRevisionDescriptor;
  
  import org.apache.jetspeed.om.cms.*;
  /**
   * <p> Ancestor class used for all content management resource
   *
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   *
   */
  public class SlideResource implements Resource
  {
  	public static String TYPE="Resource";
  	protected String uri;
  	protected NodeRevisionDescriptor descriptor;
  	protected Vector permissions;
  
  	public SlideResource ()
  	{
  		descriptor = new NodeRevisionDescriptor(0);
  		permissions = new Vector();
  	}
  
  	public void setDescriptor(NodeRevisionDescriptor descriptor)
  	{
  		this.descriptor = descriptor ;
  	}
  
  	public NodeRevisionDescriptor getDesciptor()
  	{
  		return descriptor;
  	}
  
  	public String getKey()
  	{
  		return "";
  	} // has to be defined in descendents
  
  	public String getTitle()
  	{
  		return "";
  	} // has to be defined in descendents
  
  	public void setUri(String uri)
  	{
  		this.uri = uri;
  	}
  
  	public String getUri()
  	{
  		return this.uri;
  	}
  
  	public String getType()
  	{
  		return SlideResource.TYPE;
  	}
  
  	public void setPermissions(Vector permissions)
  	{
  		this.permissions = permissions;
  	}
  
  	public Vector getPermissions()
  	{
  		return this.permissions;
  	}
  
  	public void addPermission(Permission permission)
  	{
  		permissions.add(permission);
  	}
  
  	protected Object getProperty(String propertyName)
  	{
  		try
  		{
  			return descriptor.getProperty(propertyName).getValue();
  		}
  		catch (Exception e)
  		{ //return null if the propertuy doesn't exits
  			return null;
  		}
  	}
  }
  
  
  
  1.2       +4 -4      jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/DefaultCmsService.java
  
  Index: DefaultCmsService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/DefaultCmsService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultCmsService.java	29 Oct 2002 16:05:26 -0000	1.1
  +++ DefaultCmsService.java	9 Nov 2002 19:02:52 -0000	1.2
  @@ -61,10 +61,10 @@
   
   // Tubine
   import org.apache.turbine.services.*;
  -import org.apache.turbine.services.resources.*;
  +//import org.apache.turbine.services.resources.*;
   
   // Jetspeed
  -import org.apache.jetspeed.services.cms.manager.CmsManagerFactory;
  +import org.apache.jetspeed.services.cms.manager.CmsFactory;
   import org.apache.jetspeed.services.cms.manager.CmsManager;
   import org.apache.jetspeed.services.cms.JetspeedCMSException;
   
  @@ -90,7 +90,7 @@
       /**
        * Default namespace value.
        */
  -    private final static String DEFAULT_NAMESPACE_VALUE = "jetspeed-content";
  +    private final static String DEFAULT_NAMESPACE_VALUE = "jetspeed";
   
       /**
        * Initialize the CMS Service.
  @@ -126,7 +126,7 @@
   
   			if (cms == null)
   			{
  -				cms = CmsManagerFactory.getInstance(nameSpace);
  +				cms = CmsFactory.getCmsManagerInstance(nameSpace);
   				cmsRepositories.put(nameSpace, cms);
   			}
   		}
  
  
  
  1.2       +1 -1      jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager/CmsManager.java
  
  Index: CmsManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager/CmsManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CmsManager.java	29 Oct 2002 16:05:26 -0000	1.1
  +++ CmsManager.java	9 Nov 2002 19:02:53 -0000	1.2
  @@ -59,7 +59,7 @@
   
   //Jetspeed
   import org.apache.jetspeed.services.cms.JetspeedCMSException;
  -import org.apache.jetspeed.om.cms.slide.*;
  +import org.apache.jetspeed.om.cms.*;
   import org.apache.turbine.util.upload.FileItem;
   
   /**
  
  
  
  1.2       +17 -22    jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager/CmsManagerSlideImpl.java
  
  Index: CmsManagerSlideImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager/CmsManagerSlideImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CmsManagerSlideImpl.java	29 Oct 2002 16:05:26 -0000	1.1
  +++ CmsManagerSlideImpl.java	9 Nov 2002 19:02:53 -0000	1.2
  @@ -68,7 +68,7 @@
   
   // Turbine
   import org.apache.turbine.services.TurbineServices;
  -import org.apache.turbine.services.resources.ResourceService;
  +import org.apache.turbine.services.resources.TurbineResources;
   import org.apache.turbine.util.upload.FileItem;
   import org.apache.turbine.util.Log;
   
  @@ -84,12 +84,13 @@
   import org.apache.slide.security.AccessDeniedException;
   
   // Jetspeed
  -import org.apache.jetspeed.om.cms.slide.*;
  +import org.apache.jetspeed.om.cms.*;
  +import org.apache.jetspeed.om.cms.slide.SlideResource;
   import org.apache.jetspeed.services.cms.CmsService;
   import org.apache.jetspeed.services.cms.JetspeedCMSException;
   
   
  -public class CmsManagerSlideImpl
  +public class CmsManagerSlideImpl implements CmsManager
   {
   
   	private NamespaceAccessToken token = null;
  @@ -105,14 +106,12 @@
   	* @param nameSpace used assigned to the CmsManager. This namespace can be
   	* used to read parameters assigned to this namespace in the JR.prop
   	*/
  -	void init (String namespace)
  +	public void init (String namespace)
   			throws JetspeedCMSException
   	{
   		try
   		{
  -			ResourceService serviceConf = ((TurbineServices)TurbineServices.getInstance())
  -															.getResources(CmsService.SERVICE_NAME);
  -			String domainFile = serviceConf.getString("CmsManager." + namespace + ".domainfile");
  +            String domainFile =TurbineResources.getString("services.CmsService.CmsManager." + namespace + ".domainfile");
   			Domain.init(new FileInputStream(domainFile));
   		}
   		catch (Exception e)
  @@ -264,7 +263,7 @@
   		   throws JetspeedCMSException
   	{
   
  -		Resource resource = null;
  +		SlideResource resource = null;
   
   		try
   		{
  @@ -285,7 +284,7 @@
   			// (based on the property class name) & an create an object for this resource
   			NodeProperty p = revisionDescriptor.getProperty(PROPERTY_CLASS_NAME);
   			String className = (String) p.getValue();
  -			resource = (Resource) Class.forName( className ).newInstance();
  +			resource = (SlideResource) Class.forName( className ).newInstance();
   			resource.setUri(uri);
   			// Populate the resource properties
   			resource.setDescriptor(revisionDescriptor);
  @@ -305,8 +304,7 @@
   			// Trigger when the objectNode has not the correct properties
   			// eg. :  for a User or Action node in Slide. These type of node are mapped to Catalog
   
  -			Catalog catalog = new Catalog();
  -			catalog.setUri(uri);
  +			Catalog catalog = (Catalog) CmsFactory.getCmsOmInstance("Catalog");
			catalog.setUri(uri);
   			catalog.setLogicalName(uri);
   			catalog.setTitle(uri);
   			return catalog;
  @@ -322,21 +320,18 @@
   			// But in our case, we need different properties defined via the
   			// NodeRevisionDescriptor like the title, logical name, ...
   
  -		   ResourceService serviceConf = ((TurbineServices)TurbineServices.getInstance())
  -												 .getResources(CmsService.SERVICE_NAME);
  -
  -			if (uri.equals(serviceConf.getString("catalog.root.uri")))
  +		    if (uri.equals(TurbineResources.getString("services.CmsService.catalog.root.uri")))
   			{
  -				Catalog catalog = new Catalog();
  +				Catalog catalog =  (Catalog) CmsFactory.getCmsOmInstance("Catalog");
   				catalog.setUri(uri);
  -				catalog.setLogicalName(serviceConf.getString("catalog.root.logicalame"));
  -				catalog.setTitle(serviceConf.getString("catalog.root.title"));
  +				catalog.setLogicalName(TurbineResources.getString("services.CmsService.catalog.root.logicalname"));
  +				catalog.setTitle(TurbineResources.getString("services.CmsService.catalog.root.title"));
   				return catalog;
   			}
   			else
   			{
   				// getResource called for a user/action ...
  -				Catalog catalog = new Catalog();
  +				Catalog catalog =  (Catalog) CmsFactory.getCmsOmInstance("Catalog");
   				catalog.setUri(uri);
   				catalog.setLogicalName(uri);
   				catalog.setTitle(uri);
  @@ -416,7 +411,7 @@
   			{
   				org.apache.slide.security.NodePermission node =
   					(org.apache.slide.security.NodePermission) e.nextElement();
  -				Permission p = new Permission();
  +				Permission p = (Permission) CmsFactory.getCmsOmInstance("Permission");
   				p.setAction(node.getActionUri());
   				p.setActor(node.getSubjectUri());
   				p.setInheritable(node.isInheritable());
  @@ -497,7 +492,7 @@
   			structure.create(slideToken, subject, resource.getUri());
   
   			// ---- Create the new content revision descriptor
  -			NodeRevisionDescriptor descriptor = resource.getDesciptor();
  +			NodeRevisionDescriptor descriptor = (( SlideResource )resource).getDesciptor();
   			descriptor.setProperty(this.PROPERTY_CLASS_NAME,
   									 resource.getClass().getName());
   
  @@ -597,7 +592,7 @@
   			structure.create(slideToken, subject, resource.getUri());
   
   			// Create the new content revision descriptor
  -			NodeRevisionDescriptor descriptor = resource.getDesciptor();
  +			NodeRevisionDescriptor descriptor = ((SlideResource) resource).getDesciptor();
   	   		descriptor.setProperty(this.PROPERTY_CLASS_NAME,
   								   resource.getClass().getName());
   
  
  
  
  1.1                  jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/services/cms/manager/CmsFactory.java
  
  Index: CmsFactory.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.jetspeed.services.cms.manager;
  
  // JDK
  import java.util.Hashtable;
  
  // Turbine
  import org.apache.turbine.services.TurbineServices;
  import org.apache.turbine.util.TurbineException;
  import org.apache.turbine.services.resources.TurbineResources;
  
  
  //Jetspeed
  import org.apache.jetspeed.services.cms.CmsService;
  import org.apache.jetspeed.services.cms.JetspeedCMSException;
  import org.apache.jetspeed.om.cms.Resource;
  
  /**
   * Factory class for creating Jetspeed CmsManager & CMS om classes
   * The Cms classes are configured in the JR.p
   *
   * @author <a href="mailto:christophe.lombart@skynet.be">Christophe Lombart</a>
   */
  public class CmsFactory
  {
  
      private static String cmsManagerClassName = null;
      private static Class cmsManagerClass = null;
      private static Hashtable omClasses = new Hashtable();
      
  
      /**
       * Factory method to create CmsManager instances.
       *
       * @param namespace associated to a CMS repository
       * @throws Exception when the cmsManager instance can't be created.
       * @return CmsManager a new created cmsManager.
       */
      public static CmsManager getCmsManagerInstance(String namespace)
          throws JetspeedCMSException
  
      {
          CmsManager cmsManager = null;
  
          if (null == cmsManagerClassName)
          {
              try
              {
              	cmsManagerClassName = TurbineResources.getString(
                                   "services.CmsService.CmsManager." + namespace + ".class");
                                   
                  cmsManagerClass = Class.forName(cmsManagerClassName);
              }
              catch(Exception e)
              {
                  throw new JetspeedCMSException(
                      "CmsFactory: Failed to create a CmsManager object for CMS implementation: " + e.toString());
              }
          }
  
          try
          {
              cmsManager = (CmsManager) cmsManagerClass.newInstance();
              cmsManager.init(namespace);
  
          }
          catch(Exception e)
          {
              throw new JetspeedCMSException("Failed instantiate an CmsManager implementation object: " + e.toString());
          }
  
          return cmsManager;
      }
  
      /**
       * Factory method to create Cms objects.<br>
       * It is a generic factory used to create all CMS objects.
       * The parameter is used to get the matching classe define in the JR.prop.
       * 
       * @param CmsOmName Cms object interface name
       * @throws Exception when the cms object instance can't be created.
       * @return Resource a new created cmsManager.
       */
      public static Resource getCmsOmInstance(String CmsOmName)
           throws JetspeedCMSException
      {
          Resource resource = null;
          Class omClass = (Class) omClasses.get(CmsOmName);
          
          if (null == omClass)
          {
              try
              {
              	String omClassName = TurbineResources.getString(
                                   "services.CmsService.om." + CmsOmName + ".class");
                                   
                  omClass = Class.forName(omClassName);
                  omClasses.put(CmsOmName, omClass);
              }
              catch(Exception e)
              {
                  throw new JetspeedCMSException(
                      "CmsFactory: Failed to create a Cms object for : " + e.toString());
              }
          }
  
          try
          {
              resource = (Resource) omClass.newInstance();
  
          }
          catch(Exception e)
          {
              throw new JetspeedCMSException("Failed to instantiate an Cms implementation object: " + e.toString());
          }
  
          return resource;
      
      }
  
  }
  
  
  1.2       +2 -2      jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/util/cms/CMSLink.java
  
  Index: CMSLink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/src/java/org/apache/jetspeed/util/cms/CMSLink.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CMSLink.java	29 Oct 2002 16:05:26 -0000	1.1
  +++ CMSLink.java	9 Nov 2002 19:02:53 -0000	1.2
  @@ -60,7 +60,7 @@
   import org.apache.turbine.services.TurbineServices;
   import java.util.Vector;
   
  -import org.apache.jetspeed.om.cms.slide.*;
  +import org.apache.jetspeed.om.cms.*;
   import org.apache.jetspeed.services.cms.JetspeedCMSException;
   import org.apache.jetspeed.services.cms.repository.slide.Utility;
   import org.apache.jetspeed.services.cms.CmsService;
  
  
  
  1.2       +8 -2      jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/conf/CmsResources.properties
  
  Index: CmsResources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/conf/CmsResources.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CmsResources.properties	29 Oct 2002 16:05:27 -0000	1.1
  +++ CmsResources.properties	9 Nov 2002 19:02:53 -0000	1.2
  @@ -8,8 +8,14 @@
   services.CmsService.classname=org.apache.jetspeed.services.cms.DefaultCmsService
   
   # CmsManager implementation used for the namespace 'Jetspeed'
  -services.CmseService.CmsManager.jetspeed.class = org.apache.jetspeed.services.cms.manager.CmsManagerSlideImpl
  -services.CmseService.CmsManager.jetspeed.domainfile = D://JavaProjects/jetspeed-cms/webapp/WEB-INF/conf/domain.xml
  +services.CmsService.CmsManager.jetspeed.class = org.apache.jetspeed.services.cms.manager.CmsManagerSlideImpl
  +services.CmsService.CmsManager.jetspeed.domainfile = D://JavaProjects/jetspeed-cms/webapp/WEB-INF/conf/domain.xml
  +
  +# Cms om implementation 
  +services.CmsService.om.Catalog.class=org.apache.jetspeed.om.cms.slide.SlideCatalog
  +services.CmsService.om.ContentItem.class=org.apache.jetspeed.om.cms.slide.SlideContentItem
  +services.CmsService.om.Link.class=org.apache.jetspeed.om.cms.slide.SlideLink
  +services.CmsService.om.Permission.class=org.apache.jetspeed.om.cms.slide.SlidePermission
   
   
   # Root catalog information
  
  
  
  1.2       +2 -2      jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/conf/Domain.xml
  
  Index: Domain.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/conf/Domain.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Domain.xml	29 Oct 2002 16:05:27 -0000	1.1
  +++ Domain.xml	9 Nov 2002 19:02:53 -0000	1.2
  @@ -3,7 +3,7 @@
   <slide logger="org.apache.slide.util.logger.SimpleLogger" logger-level="6"
    default="slide">
     
  -  <namespace name="jetspeed-content">
  +  <namespace name="jetspeed">
       
   
       <definition>
  @@ -12,7 +12,7 @@
           
   	<nodestore classname="org.apache.jetspeed.services.cms.repository.slide.JDBCDescriptorsStore">
            <parameter name="driver">org.hsql.jdbcDriver</parameter>
  -         <parameter name="url">jdbc:HypersonicSQL:D:/MyApplication/Apache Tomcat 4.0/webapps/jetspeed/WEB-INF/db/cms-slide</parameter>
  +         <parameter name="url">jdbc:HypersonicSQL:D:/JavaProjects/jetspeed-cms/webapp/WEB-INF/db/cms-slide</parameter>
            <parameter name="user">sa</parameter>
            <parameter name="password"></parameter>
           </nodestore>
  
  
  
  1.2       +2 -2      jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/db/cms-slide.properties
  
  Index: cms-slide.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/db/cms-slide.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- cms-slide.properties	29 Oct 2002 16:05:27 -0000	1.1
  +++ cms-slide.properties	9 Nov 2002 19:02:53 -0000	1.2
  @@ -1,4 +1,4 @@
   #Hypersonic SQL database
  -#Sat Oct 19 00:19:36 CEST 2002
  +#Thu Nov 07 22:28:53 CET 2002
   version=1.4
  -modified=no
  +modified=yes
  
  
  
  1.2       +2 -0      jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/db/cms-slide.script
  
  Index: cms-slide.script
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/scratchpad/jetspeed-cms/webapp/WEB-INF/db/cms-slide.script,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- cms-slide.script	29 Oct 2002 16:05:27 -0000	1.1
  +++ cms-slide.script	9 Nov 2002 19:02:53 -0000	1.2
  @@ -82,3 +82,5 @@
   INSERT INTO OBJECTS VALUES('/catalog','org.apache.slide.structure.SubjectNode')
   INSERT INTO PERMISSIONS VALUES('/catalog',NULL,'+/users/turbine/groups/Jetspeed','/actions',1,NULL)
   INSERT INTO REVISIONS VALUES('/catalog',0,'1.0')
  +/*C2*/CONNECT USER sa PASSWORD ""
  +SET AUTOCOMMIT FALSE
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message