com.plumtree.remote.prc
Interface IPortletBase

All Superinterfaces:
IObject
All Known Subinterfaces:
IPortlet, IPortletTemplate

public interface IPortletBase
extends IObject

Superinterface that represents both Portlets and Portlet Templates. Portlet interfaces representing new and existing Portlets can be obtained from the IPortletManager object. Note: No changes made to this object will be saved to the portal until the save() method is called. At least an object name and an alignment must be set prior to saving.


Method Summary
 void addAdminSetting(java.lang.String name, java.lang.String value)
          Adds an Administrative setting for this Portlet.
 java.lang.String createGatewayLink(int communityID, java.lang.String URL)
          Creates a link in this Portlet's gateway space.
 java.lang.String getAdminSetting(java.lang.String name)
          Gets the value for a particular Administrative setting for this Portlet.
 java.util.Enumeration getAdminSettingNames()
          Gets an enumeration of the names of current Administrative settings for this Portlet.
 Alignment getAlignment()
          Gets the currently set alignment for this Portlet.
 int getWebServiceID()
          Gets the ID for the Web Service object with which this Portlet is associated.
 void removeAdminSetting(java.lang.String name)
          Removes an Administrative setting for this Portlet.
 void setAlignment(Alignment align)
          Sets the alignment of the Portlet.
 
Methods inherited from interface com.plumtree.remote.prc.IObject
getDescription, getID, getName, getParentFolderID, save, setDescription, setName
 

Method Detail

setAlignment

public void setAlignment(Alignment align)
Sets the alignment of the Portlet. Alignment establishes where on a page a Portlet can be placed. Note: This setting will not be saved in the portal until save() is called.

Parameters:
align - the alignment for the portlet

getAlignment

public Alignment getAlignment()
Gets the currently set alignment for this Portlet.

Returns:
the current alignment

getWebServiceID

public int getWebServiceID()
                    throws java.net.MalformedURLException
Gets the ID for the Web Service object with which this Portlet is associated.

Returns:
the ID of the Web Service object with which this Portlet is associated
Throws:
java.net.MalformedURLException - if the query interface URL is not valid

addAdminSetting

public void addAdminSetting(java.lang.String name,
                            java.lang.String value)
                     throws java.net.MalformedURLException,
                            PortalException,
                            java.rmi.RemoteException
Adds an Administrative setting for this Portlet. Administrative settings are shared by all users and all Communities. If there is already an Admininstrative setting of the same name, this method will overwrite it. Note: This setting will not be saved in the portal until save() is called.

Parameters:
name - the name of the new setting to add
value - the value of the setting to add
Throws:
java.lang.IllegalArgumentException - if the setting has an invalid (blank) name
java.net.MalformedURLException - if the query interface URL is not valid
PortalException - if the operation resulted in an error in the portal
java.rmi.RemoteException - if there was a communication problem during the execution of the remote method call

removeAdminSetting

public void removeAdminSetting(java.lang.String name)
                        throws java.net.MalformedURLException,
                               PortalException,
                               java.rmi.RemoteException
Removes an Administrative setting for this Portlet. If the Administrative setting was not set for the Portlet previously, this method will have no effect. Note: This setting will not be removed from the portal until save() is called.

Parameters:
name - the name of the setting to remove
Throws:
java.net.MalformedURLException - if the query interface URL is not valid
PortalException - if the operation resulted in an error in the portal
java.rmi.RemoteException - if there was a communication problem during the execution of the remote method call

getAdminSettingNames

public java.util.Enumeration getAdminSettingNames()
                                           throws java.net.MalformedURLException,
                                                  PortalException,
                                                  java.rmi.RemoteException
Gets an enumeration of the names of current Administrative settings for this Portlet.

Returns:
an enumeration of admin setting names
Throws:
java.net.MalformedURLException - if the query interface URL is not valid
PortalException - if the operation resulted in an error in the portal
java.rmi.RemoteException - if there was a communication problem during the execution of the remote method call

getAdminSetting

public java.lang.String getAdminSetting(java.lang.String name)
                                 throws java.net.MalformedURLException,
                                        PortalException,
                                        java.rmi.RemoteException
Gets the value for a particular Administrative setting for this Portlet.

Parameters:
name - the setting name
Returns:
the setting value
Throws:
java.net.MalformedURLException - if the query interface URL is not valid
PortalException - if the operation resulted in an error in the portal
java.rmi.RemoteException - if there was a communication problem during the execution of the remote method call

createGatewayLink

public java.lang.String createGatewayLink(int communityID,
                                          java.lang.String URL)
                                   throws java.net.MalformedURLException,
                                          PortalException,
                                          java.rmi.RemoteException
Creates a link in this Portlet's gateway space. Note: This method will fail if the Portlet is new and has not been saved (if the Portlet was obtained by a call to createPortletInstance() and save() has not been called).

 IPortlet portlet = ...
 String gatewayLink = portlet.createGatewayLink(communityID, "http://www.google.com");
 
Yields this example gatewayLink: http://sinistar.plumtree.com:8080/portal/server.pt/gateway/PTARGS_0_272_202_0_43/http://www.google.com Note that the structure of the gateway URLs is subject to change; do not rely on the format of the structure of PTARGS or the format of the gateway URL.

Parameters:
communityID - the ID of the Community in which to create the link. Use 0 if not using a community. The communityID is used to send community preferences to the gateway page if it is accessed through the community portlet.
URL - the URL to transform (gateway)
Returns:
a gatewayed URL for this Portlet, the specified Community, and the specified URL
Throws:
java.net.MalformedURLException - if the query interface URL is not valid
PortalException - if the operation resulted in an error in the portal
java.rmi.RemoteException - if there was a communication problem during the execution of the remote method call


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.