You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2004/06/05 07:10:46 UTC

cvs commit: jakarta-jetspeed-2/commons project.xml

taylor      2004/06/04 22:10:46

  Modified:    commons  project.xml
  Added:       jetspeed-api/src/java/org/apache/jetspeed/om/common/servlet
                        MutableWebApplication.java
                        MutableSecurityRoleSet.java
                        MutableSecurityRole.java
               jetspeed-api/src/java/org/apache/jetspeed/om/common/preference
                        PreferenceComposite.java PreferenceValue.java
                        PreferenceSetComposite.java
               jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet
                        ContentTypeComposite.java MutablePortletEntity.java
                        MutablePortletApplication.java
                        ContentTypeSetComposite.java
                        PortletDefinitionComposite.java
  Removed:     commons/src/java/org/apache/jetspeed/om/common/servlet
                        MutableWebApplication.java
                        MutableSecurityRoleSet.java
                        MutableSecurityRole.java
               commons/src/java/org/apache/jetspeed/om/common/preference
                        PreferenceSetComposite.java
                        PreferenceComposite.java PreferenceValue.java
               commons/src/java/org/apache/jetspeed/om/common
                        GenericMetadata.java SecurityRoleRefComposite.java
                        MutableDisplayNameSet.java MutableDescription.java
                        MutableDisplayName.java MutableLanguage.java
                        LocalizedField.java ParameterComposite.java
                        MutableDescriptionSet.java UserAttribute.java
                        DublinCore.java
               commons/src/java/org/apache/jetspeed/om/common/portlet
                        MutablePortletApplication.java
                        ContentTypeComposite.java
                        PortletDefinitionComposite.java
                        ContentTypeSetComposite.java
  Log:
  move all commons OM interfaces into public API as part of JS2-37
  
  http://nagoya.apache.org/jira/browse/JS2-37
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/servlet/MutableWebApplication.java
  
  Index: MutableWebApplication.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.servlet;
  
  import java.io.Serializable;
  import java.util.Locale;
  
  import org.apache.pluto.om.common.DescriptionSet;
  import org.apache.pluto.om.common.DisplayNameSet;
  import org.apache.pluto.om.common.SecurityRole;
  import org.apache.pluto.om.servlet.WebApplicationDefinition;
  
  /**
   * 
   * WebApplicationComposite
   * This interface is a combination of the two interface classes 
   * used to identify a web application.  It has additional methods
   * to make it easier to use/test within Jetspeed.
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: MutableWebApplication.java,v 1.1 2004/06/05 05:10:44 taylor Exp $
   *
   */
  
  public interface MutableWebApplication extends WebApplicationDefinition, Serializable
  {
      void setContextRoot(String contextRoot);
      
      void setId(String id);
  
      void setDescriptionSet(DescriptionSet descriptions);
  
      void setDisplayNameSet(DisplayNameSet names);
  
      void addDisplayName(Locale locale, String name);
  
      void addDescription(Locale locale, String description);
      
      void addSecurityRole(SecurityRole securityRole);
      
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/servlet/MutableSecurityRoleSet.java
  
  Index: MutableSecurityRoleSet.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.servlet;
  
  import org.apache.pluto.om.common.SecurityRole;
  import org.apache.pluto.om.common.SecurityRoleSet;
  
  /**
   * MutableSecurityRoleSet
   *
   * @author <a href="mailto:ate@douma.nu">Ate Douma</a>
   * @version $Id: MutableSecurityRoleSet.java,v 1.1 2004/06/05 05:10:44 taylor Exp $
   *
   */
  public interface MutableSecurityRoleSet extends SecurityRoleSet
  {
      /**
       * Adds a SecurityRole to the set
       *
       * @param securityRole the security-role to be added
       *
       * @return the new SecurityRole
       */
      public SecurityRole add(SecurityRole securityRole);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/servlet/MutableSecurityRole.java
  
  Index: MutableSecurityRole.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.servlet;
  
  import org.apache.pluto.om.common.SecurityRole;
  
  /**
   * MutableSecurityRole
   *
   * @author <a href="mailto:ate@douma.nu">Ate Douma</a>
   * @version $Id: MutableSecurityRole.java,v 1.1 2004/06/05 05:10:44 taylor Exp $
   *
   */
  public interface MutableSecurityRole extends SecurityRole
  {
      void setDescription(String description);
  
      void setRoleName(String roleName);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/preference/PreferenceComposite.java
  
  Index: PreferenceComposite.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.preference;
  
  import java.io.Serializable;
  import java.util.Locale;
  
  import org.apache.pluto.om.common.Description;
  import org.apache.pluto.om.common.Preference;
  import org.apache.pluto.om.common.PreferenceCtrl;
  
  /**
   * 
   * PreferenceComposite
   * 
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: PreferenceComposite.java,v 1.1 2004/06/05 05:10:45 taylor Exp $
   *
   */
  public interface PreferenceComposite extends PreferenceCtrl, Preference, Serializable
  {
  	String DEFAULT_PREFERENCE = "org.apache.pluto.om.common.Preference.default";
  	String USER_PREFERENCE = "org.apache.pluto.om.common.Preference.default.user";
  	
      void addDescription(Locale locale, String Description);
  
      Description getDescription(Locale locale);    
  
      /**
       * @throws java.lang.ArrayIndexOutofBounds if index is outside the constraints
       * @param index
       * @return The String value at the specified index or <code>null</code>
       * if no values are present.
       */
      String getValueAt(int index);
  
      /**
       * 
       * <p>
       * setValueAt
       * </p>
       * Sets the current Preference's value at <code>index</code>
       * to the specified <code>value</code> 
       * 
       * @param index Index hows value will be set.
       * @param value Value to set
       *
       */
      void setValueAt(int index, String value);
  
      /**
       * 
       * <p>
       * addValue
       * </p>
       * Adds a new value to this Preference.
       * @param value Vale to add to the preference
       *
       */
      void addValue(String value);
  
      /**
       * 
       * @return
       */
      String[] getValueArray();
  
      /**
       * 
       * <p>
       * setValues
       * </p>
       * 
       * Replaces the current set of values of this preference
       * with this one. 
       * 
       * @param stringValues 
       *
       */
      void setValues(String[] stringValues);
  
      /**
       * @return
       */
      String getType();
      /**
       * @param string
       */
      void setType(String string);
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/preference/PreferenceValue.java
  
  Index: PreferenceValue.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.preference;
  
  /**
   * PreferenceValue
   * <br />
   * Represents an individual value for a preference which could
   * either be the default preferences from a portlet's deployment descriptor
   * or a preference value for a specific user.  This class should only be
   * accessed by Jetspeed internals as Preference values are really
   * only String values.  The use of preference value objects helps
   * facilitate the use object relational tools in terms of persistence operations. 
   * 
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: PreferenceValue.java,v 1.1 2004/06/05 05:10:45 taylor Exp $
   *
   */
  public interface PreferenceValue
  {
      /**
       * @return
       */
      public abstract String getValue();
      /**
       * @param string
       */
      public abstract void setValue(String string);   
      
  }
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/preference/PreferenceSetComposite.java
  
  Index: PreferenceSetComposite.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.preference;
  
  import java.util.Set;
  
  import javax.portlet.PreferencesValidator;
  
  import org.apache.pluto.om.common.PreferenceSet;
  import org.apache.pluto.om.common.PreferenceSetCtrl;
  
  /**
   * <p>
   * PreferenceSetComposite
   * </p>
   * 
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: PreferenceSetComposite.java,v 1.1 2004/06/05 05:10:45 taylor Exp $
   *
   */
  public interface PreferenceSetComposite extends PreferenceSet, PreferenceSetCtrl
  {
      Set getNames();
  
      int size();
  
      void setPreferenceValidator(PreferencesValidator validator);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/ContentTypeComposite.java
  
  Index: ContentTypeComposite.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.portlet;
  
  import java.io.Serializable;
  import java.util.Collection;
  
  import javax.portlet.PortletMode;
  
  import org.apache.pluto.om.portlet.ContentType;
  /**
   * 
   * ContentTypeComposite
   * 
   * Combines the <code>org.apache.pluto.common.ContentType</code>
   * and <code>org.apache.pluto.common.ContentTypeCtrl</code> interfaces
   * into single interface for use in Jetspeed.
   * 
   * 
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: ContentTypeComposite.java,v 1.1 2004/06/05 05:10:46 taylor Exp $
   *
   */
  public interface ContentTypeComposite extends ContentType, Serializable
  {
      void setPortletModes(Collection modes);
  
      /**
       * Adds a mode to be supported by this <code>ContentType</code>.  If the mode
       * already exists, the same mode is NOT added again.
       * @param mode portlet mode to add.
       */
      void addPortletMode(PortletMode mode);
  
      /**
       * Checks whether or not the <code>mode</code>
       * is supported by this <code>ContentType</code>
       * @param mode portlet mode to check
       * @return <code>true</code> if the <code>mode</code> is
       * supported, otherwise <code>false</code>.
       */
      boolean supportsPortletMode(PortletMode mode);
  
      /**
       * 
       * @param contentType
       */
      void setContentType(String contentType);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/MutablePortletEntity.java
  
  Index: MutablePortletEntity.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.portlet;
  
  import org.apache.pluto.om.entity.PortletEntity;
  import org.apache.pluto.om.entity.PortletEntityCtrl;
  
  
  /**
   * MutablePortletEntity
   *
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: MutablePortletEntity.java,v 1.1 2004/06/05 05:10:46 taylor Exp $
   */
  public interface MutablePortletEntity 
      extends 
          PortletEntity, 
          PortletEntityCtrl
  {
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/MutablePortletApplication.java
  
  Index: MutablePortletApplication.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.portlet;
  
  import java.io.Serializable;
  import java.util.Collection;
  
  import org.apache.jetspeed.om.common.GenericMetadata;
  import org.apache.jetspeed.om.common.UserAttribute;
  import org.apache.pluto.om.portlet.PortletApplicationDefinition;
  import org.apache.pluto.om.portlet.PortletDefinition;
  import org.apache.pluto.om.portlet.PortletDefinitionList;
  import org.apache.pluto.om.servlet.WebApplicationDefinition;
  
  /**
   * MutablePortletApplication
   *
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: MutablePortletApplication.java,v 1.1 2004/06/05 05:10:46 taylor Exp $
   */
  /**
   *
   * MutablePortletApplication
   *
   * Extends the <code>org.apache.pluto.om.portlet.PortletApplicationDefinition</code>
   * interface adding mutator methods for those attributes that do not have them
   * so as to make manipulating the portlet OM easier.
   * It has additional methods to make it easier to use within Jetspeed.
   *
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: MutablePortletApplication.java,v 1.1 2004/06/05 05:10:46 taylor Exp $
   *
   */
  public interface MutablePortletApplication extends PortletApplicationDefinition, Serializable
  {
      public GenericMetadata getMetadata();
      
      public void setMetadata(GenericMetadata metadata);
      
      void setWebApplicationDefinition(WebApplicationDefinition wad);
  
      void setName(String name);
  
      String getName();
  
      void addPortletDefinition(PortletDefinition pd);
  
      Collection getPortletDefinitions();
  
      PortletDefinition getPortletDefinitionByName(String name);
  
      void setPortletDefinitionList(PortletDefinitionList portlets);
  
      /**
       * <p>Adds a user attribute to the user attribute set.</p>
       * @param name The user attribute name.
       * @param description The user attribute description.
       */
      void addUserAttribute(String name, String description);
  
      /**
       * <p>Adds a user attribute to the user attribute set.</p>
       * @param userAttribute The user attribute.
       */
      void addUserAttribute(UserAttribute userAttribute);
  
      /**
       * <p>Sets a user-attribute to the collection of user attributes associated
       * with this portlet application.</p>
       */
      void setUserAttributes(Collection userAttributes);
      
      /**
       * <p>Gets the collection of user attributes associated
       * with this portlet application.</p>
       */
      Collection getUserAttributes();
  
      void setApplicationIdentifier(String applicationIndentifier);
  
      String getApplicationIdentifier();
  
      /**
       * @return
       */
      String getDescription();
  
      /**
       * @param string
       */
      void setDescription(String string);
  
      /**
       * @param objectID
       */
      void setId(String objectID);
  
      /**
       *
       * @param version
       */
      void setVersion(String version);
  
      /**
       * Sets the Portlet Application type.
       * Valid values are:
       * <p>
       *      {@link MutablePortletApplication#WEBAPP} - A standard web application, stored in the web application
       *               server's web application space.
       * <p>
       *      {@link MutablePortletApplication#LOCAL} - A local portlet application stored within Jetspeed's web application.
       * <p>
       * @param type The type of portlet application.
       */
      void setApplicationType(int type);
  
      /**
       * Gets the Portlet Application type.
       * Valid values are:
       * <p>
       *      {@link MutablePortletApplication#WEBAPP} - A standard web application, stored in the web application
       *               server's web application space.
       * <p>
       *      {@link MutablePortletApplication#LOCAL} - A local portlet application stored within Jetspeed's web application.
       * <p>
       * @return The type of portlet application.
       */
      int getApplicationType();
  
      /**
       * Marks this application as a standard web application,
       * stored in the web application server's web application space.
       */
      public static final int WEBAPP = 0;
  
      /**
       * Marks this application as a LOCAL portlet application,
       * stored in Jetspeed managed portlet application space.
       */
      public static final int LOCAL = 1;
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/ContentTypeSetComposite.java
  
  Index: ContentTypeSetComposite.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.portlet;
  
  import java.io.Serializable;
  
  import org.apache.pluto.om.portlet.ContentType;
  import org.apache.pluto.om.portlet.ContentTypeSet;
  
  /**
   * 
   * ContentTypeSetComposite
   * 
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: ContentTypeSetComposite.java,v 1.1 2004/06/05 05:10:46 taylor Exp $
   *
   */
  public interface ContentTypeSetComposite extends ContentTypeSet, Serializable
  {
      void addContentType(ContentType contentType);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/om/common/portlet/PortletDefinitionComposite.java
  
  Index: PortletDefinitionComposite.java
  ===================================================================
  /*
   * 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.jetspeed.om.common.portlet;
  
  import java.io.Serializable;
  import java.util.Locale;
  
  import org.apache.jetspeed.om.common.GenericMetadata;
  import org.apache.jetspeed.om.common.ParameterComposite;
  import org.apache.jetspeed.om.common.preference.PreferenceComposite;
  import org.apache.pluto.om.common.DescriptionSet;
  import org.apache.pluto.om.common.DisplayName;
  import org.apache.pluto.om.common.Language;
  import org.apache.pluto.om.common.LanguageSet;
  import org.apache.pluto.om.common.ParameterSet;
  import org.apache.pluto.om.common.Preference;
  import org.apache.pluto.om.common.PreferenceSet;
  import org.apache.pluto.om.common.SecurityRoleRef;
  import org.apache.pluto.om.common.SecurityRoleRefSet;
  import org.apache.pluto.om.portlet.ContentType;
  import org.apache.pluto.om.portlet.ContentTypeSet;
  import org.apache.pluto.om.portlet.PortletApplicationDefinition;
  import org.apache.pluto.om.portlet.PortletDefinition;
  import org.apache.pluto.om.portlet.PortletDefinitionCtrl;
  
  /**
   * 
   * PortletDefinitionComposite
   * 
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: PortletDefinitionComposite.java,v 1.1 2004/06/05 05:10:46 taylor Exp $
   *
   */
  public interface PortletDefinitionComposite extends PortletDefinition, PortletDefinitionCtrl, Serializable
  {
      GenericMetadata getMetadata();
      
      void setMetadata(GenericMetadata metadata);
      
      void addLanguage(Language lang);
  
      void addContentType(ContentType cType);
  
      void setLanguageSet(LanguageSet languages);
  
      /**
       * The PreferenceSet is a collection user-defineable preferences
       * that this portlet can use to process its logic.
       * 
       * @param preferences
       */
      void setPreferenceSet(PreferenceSet preferences);
  
      void setInitParameterSet(ParameterSet parameters);
  
      void setContentTypeSet(ContentTypeSet contentTypes);
  
      void setInitSecurityRoleRefSet(SecurityRoleRefSet securityRefs);
      
      /**
       * Convenience method for directly adding init parameters
       * to this <code>PortletDefinition.</code>.  This has the
       * same affect as 
       * <code>((ParameterSetCtrl)PortletDefinition.getInitParamaterSet()).add()</code>
       * @param name Name of parameter to set
       * @param value new value of said parameter
       * @return ParameterComposite newly created parameter
       */
      ParameterComposite addInitParameter(String name, String value);
  
      /**
       * Same as <code>setInitParameter(name, title) plus allows a
       * description to inlcuded.
       * @see org.apache.jetspeed.om.common.portlet.PortletApplicationComposite#addInitParameter(java.lang.String, java.lang.String)
       * @param name Name of parameter to set
       * @param value new value of the parameter
       * @param DescriptionSet containing locale-specific descriptions of the parameter
       * @return ParameterComposite newly created parameter
       */
      ParameterComposite addInitParameter(String name, String value, DescriptionSet description);
  
      /**
       * Same as <code>setInitParameter(name, title) plus allows you 
       * to define one initial localized desription.
       * 
       * @see org.apache.jetspeed.om.common.portlet.PortletApplicationComposite#addInitParameter(java.lang.String, java.lang.String)
       * @param name Name of parameter to set
       * @param value new value of the parameter
       * @param description A description for this parameter
       * @param locale The locale the description
       * @return ParameterComposite newly created parameter
       */
      ParameterComposite addInitParameter(String name, String value, String description, Locale locale);
  
      /**
       * Setter for setting expiration cache time for this portlet     
       */
      void setExpirationCache(String cache);
  
      void setPortletApplicationDefinition(PortletApplicationDefinition pad);
  
      PreferenceComposite addPreference(String name, String[] values);
  
      void addPreference(Preference preference);
  
      void setPortletIdentifier(String portletIndentifier);
  
      String getPortletIdentifier();
  
      /**
       * A portlet's unique name is a string formed by the combination of a portlet's
       * unique within it's parent application plus the parent application's
       * unique name within the portlet container using ":" as a delimiter. 
       * <br/>
       * <strong>FORMAT: </strong> <i>application name</i>:<i>portlet name</i>
       * <br/>
       * <strong>EXAMPLE: </strong> com.myapp.portletApp1:weather-portlet
       * 
       
       * @return Name that uniquely indetifies this portlet within the container.  If
       * either the name of the portlet is <code>null</code> or this portlet has not
       * yet been assigned to an portlet application, <code>null</code> is returned.
       */
      String getUniqueName();
  
      /**
       * Returns localized text of this PortletDefinitions display name.
       * 
       * @param locale Locale to get the display name for
       * @return Localized text string of the display name or <code>null</code>
       * if no DisplayName exists for this locale
       */
      String getDisplayNameText(Locale locale);
  
      /**
       * Returns localized text of this PortletDefinitions description.
       * 
       * @param locale Locale to get the description for
       * @return Localized text string of the display name or <code>null</code>
       * if no Description exists for this locale
       */
      String getDescriptionText(Locale locale);
  
      void addDescription(Locale locale, String description);
  
      void addDisplayName(Locale locale, String displayName);
  
      /**
       * 
       * <p>
       * addDisplayName
       * </p>
       * 
       * @param displayName
       *
       */
      void addDisplayName(DisplayName displayName);
  
      String getPreferenceValidatorClassname();
  
      void setPreferenceValidatorClassname(String classname);
  
      /**
       * 
       * <p>
       * addSecurityRoleRef
       * </p>
       * 
       * Adds the <code>securityRef</code> to the existing
       * set of SecurityRoleRefs of this PortletDefinition
       * 
       * @param securityRef SecurityRoleRef to add.
       *
       */
      void addSecurityRoleRef(SecurityRoleRef securityRef);
  
  }
  
  
  
  1.17      +7 -0      jakarta-jetspeed-2/commons/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/commons/project.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- project.xml	1 Jun 2004 05:25:43 -0000	1.16
  +++ project.xml	5 Jun 2004 05:10:46 -0000	1.17
  @@ -46,6 +46,13 @@
           <war.bundle.jar>true</war.bundle.jar>
         </properties>
       </dependency>
  +     <dependency>
  +      <id>jetspeed2:jetspeed-api</id>
  +      <version>2.0-a1-dev</version>
  +      <properties>
  +        <war.bundle.jar>true</war.bundle.jar>
  +      </properties>
  +    </dependency>        
       <dependency>
         <id>commons-lang</id>
         <version>2.0</version>
  
  
  

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