taylor 2004/06/04 22:09:29
Added: jetspeed-api/src/java/org/apache/jetspeed/components/portletentity
PortletEntityAccessComponent.java
PortletEntityNotDeletedException.java
PortletEntityNotStoredException.java
jetspeed-api/src/java/org/apache/jetspeed/components/portletregistry
PortletRegistryComponent.java
RegistryException.java
Log:
move portlet entity and portlet registry component interfaces into public jetspeed
api
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/components/portletentity/PortletEntityAccessComponent.java
Index: PortletEntityAccessComponent.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.components.portletentity;
import org.apache.jetspeed.om.common.portlet.MutablePortletEntity;
import org.apache.pluto.om.common.ObjectID;
import org.apache.pluto.om.entity.PortletEntity;
import org.apache.pluto.om.portlet.PortletDefinition;
/**
* <p>
* PortletEntityAccessComponent
* </p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: PortletEntityAccessComponent.java,v 1.1 2004/06/05 05:09:29 taylor
Exp $
*
*/
public interface PortletEntityAccessComponent
{
MutablePortletEntity getPortletEntity(ObjectID id);
// MutablePortletEntity getPortletEntity(PortletDefinition portletDefinition,
String portletName);
MutablePortletEntity newPortletEntityInstance(PortletDefinition
portletDefinition);
void removePortletEntity(PortletEntity portletEntity) throws
PortletEntityNotDeletedException;
void storePortletEntity(PortletEntity portletEntity) throws
PortletEntityNotStoredException;
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/components/portletentity/PortletEntityNotDeletedException.java
Index: PortletEntityNotDeletedException.java
===================================================================
/**
* Created on Nov 26, 2003
*
*
* @author
*/
package org.apache.jetspeed.components.portletentity;
import org.apache.jetspeed.exception.JetspeedException;
/**
* <p>
* PortletEntityNotDeletedException
* </p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: PortletEntityNotDeletedException.java,v 1.1 2004/06/05 05:09:29
taylor Exp $
*
*/
public class PortletEntityNotDeletedException extends JetspeedException
{
/**
*
*/
public PortletEntityNotDeletedException()
{
super();
}
/**
* @param message
*/
public PortletEntityNotDeletedException(String message)
{
super(message);
}
/**
* @param nested
*/
public PortletEntityNotDeletedException(Throwable nested)
{
super(nested);
}
/**
* @param msg
* @param nested
*/
public PortletEntityNotDeletedException(String msg, Throwable nested)
{
super(msg, nested);
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/components/portletentity/PortletEntityNotStoredException.java
Index: PortletEntityNotStoredException.java
===================================================================
/*
* Copyright 2000-2001,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.components.portletentity;
import org.apache.jetspeed.exception.JetspeedException;
/**
* <p>
* PortletEntityNotStoredException
* </p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $Id: PortletEntityNotStoredException.java,v 1.1 2004/06/05 05:09:29
taylor Exp $
*
*/
public class PortletEntityNotStoredException extends JetspeedException
{
/**
*
*/
public PortletEntityNotStoredException()
{
super();
}
/**
* @param message
*/
public PortletEntityNotStoredException(String message)
{
super(message);
}
/**
* @param nested
*/
public PortletEntityNotStoredException(Throwable nested)
{
super(nested);
}
/**
* @param msg
* @param nested
*/
public PortletEntityNotStoredException(String msg, Throwable nested)
{
super(msg, nested);
}
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/components/portletregistry/PortletRegistryComponent.java
Index: PortletRegistryComponent.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.components.portletregistry;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import org.apache.jetspeed.components.persistence.store.PersistenceStore;
import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
import org.apache.pluto.om.common.Language;
import org.apache.pluto.om.common.ObjectID;
import org.apache.pluto.om.portlet.PortletApplicationDefinition;
/**
* <p>
* PortletRegistryComponentImpl
* </p>
*
*
* @
* @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
* @version $ $
*
*/
public interface PortletRegistryComponent
{
Language createLanguage(
Locale locale,
String title,
String shortTitle,
String description,
Collection keywords) throws RegistryException;
List getAllPortletDefinitions();
/**
* Retreives a PortletApplication by it's unique ObjectID.
* The unqiue ObjectID is generally a function of the native
* storage mechanism of the container whether it be auto-generated
* by an RDBMS, O/R tool or some other mechanism.
* This is different than the portlet applaiction's unique indentfier
* which is specified within the portlet.xml
* @param id
* @return
*/
MutablePortletApplication getPortletApplication(ObjectID id);
/**
* Retreives a PortletApplication by it's unique name. We use
* PortletApplicationComposite interface which extends the PortletApplication
* and adds additional functionallity to it.
* @param id
* @return PortletApplicationComposite
*/
MutablePortletApplication getPortletApplication(String name);
/**
* Locates a portlet application using it's unique <code>identifier</code>
* field.
* @param identifier Unique id for this portlet application
* @return portlet application matching this unique id.
*/
MutablePortletApplication getPortletApplicationByIdentifier(String identifier);
List getPortletApplications();
/**
* Locates a portlet using it's unique <code>identifier</code>
* field.
* <br/>
* This method automatically calls [EMAIL PROTECTED]
getStoreableInstance(PortletDefinitionComposite portlet)}
* on the returned <code>PortletEntityInstance</code>
* @param identifier Unique id for this portlet
* @return Portlet matching this unique id.
* @throws java.lang.IllegalStateException If <code>PortletDefinitionComposite
!= null</code> AND
* <code>PortletDefinitionComposite.getPortletApplicationDefinition() ==
null</code>.
* The reason for this is that every PortletDefinition is required to
* have a parent PortletApplicationDefinition
*/
PortletDefinitionComposite getPortletDefinitionByIdentifier(String identifier);
/**
* 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
* <br/>
* This methos automatically calls [EMAIL PROTECTED]
getStoreableInstance(PortletDefinitionComposite portlet)}
* on the returned <code>PortletEntityInstance</code>
* @param name portlets unique name.
* @return Portlet that matches the unique name
* @throws java.lang.IllegalStateException If <code>PortletDefinitionComposite
!= null</code> AND
* <code>PortletDefinitionComposite.getPortletApplicationDefinition() ==
null</code>.
* The reason for this is that every PortletDefinition is required to
* have a parent PortletApplicationDefinition
*
*/
PortletDefinitionComposite getPortletDefinitionByUniqueName(String name);
/**
* Checks whether or not a portlet application with this identity has all ready
* been registered to the container.
* @param appIdentity portlet application indetity to check for.
* @return boolean <code>true</code> if a portlet application with this identity
* is alreay registered, <code>false</code> if it has not.
*/
boolean portletApplicationExists(String appIentity);
/**
* Checks whether or not a portlet with this identity has all ready
* been registered to the container.
* @param portletIndentity portlet indetity to check for.
* @return boolean <code>true</code> if a portlet with this identity
* is alreay registered, <code>false</code> if it has not.
*/
boolean portletDefinitionExists(String portletIndentity);
/**
* Checks whether or not a portlet with this identity has all ready
* been registered to the PortletApplication.
* @param portletIndentity portlet indetity to check for.
* @param app PortletApplication to check .
* @return boolean <code>true</code> if a portlet with this identity
* is alreay registered, <code>false</code> if it has not.
*/
boolean portletDefinitionExists(String portletName, MutablePortletApplication
app);
/**
* Creates a new <code>PortletApplicationDefinition</code>
* within the Portal.
* @param newApp
*/
void registerPortletApplication(PortletApplicationDefinition newApp) throws
RegistryException;
void removeApplication(PortletApplicationDefinition app) throws
RegistryException;
/**
* Makes any changes to the <code>PortletApplicationDefinition</code>
* persistent.
* @param app
*/
void updatePortletApplication(PortletApplicationDefinition app) throws
RegistryException;
/**
*
* <p>
* getStoreableInstance
* </p>
* Wraps the <code>PortletDefinitionComposite</code>
* in an instance that correctly implements the
* <code>store()</code> method;
*
* @param portlet
* @return
*
*/
PortletDefinitionComposite getStoreableInstance(PortletDefinitionComposite
portlet);
/**
*
* <p>
* getPersistenceStore
* </p>
*
* @return the PersistenceStore sued to persist registry
* information.
*
*/
PersistenceStore getPersistenceStore();
}
1.1
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/components/portletregistry/RegistryException.java
Index: RegistryException.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.components.portletregistry;
import org.apache.jetspeed.exception.JetspeedException;
/**
Occurs when anything unexpected happens within Jetspeed and its Registry. Any
@author <a href="mailto:[EMAIL PROTECTED]">Kevin A. Burton</a>
@version $Id: RegistryException.java,v 1.1 2004/06/05 05:09:29 taylor Exp $
*/
public class RegistryException extends JetspeedException
{
public static final String REGISTRY_NOT_FOUND
= "The specified registry does not exist.";
public RegistryException()
{
super();
}
public RegistryException( String message )
{
super( message );
}
public RegistryException(Throwable nested)
{
super(nested);
}
public RegistryException(String msg, Throwable nested)
{
super(msg, nested);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]