ProxyPortletManager Interface
- public interface ProxyPortletManager
Manages proxy portlets for one or more producers.
public void |
-
clearDestroyErrors (int[] proxyPortletIds)
- Clears the delete errors associated with proxy portlets
thus making them deletable.
|
public int |
-
createProxyPortlet (String producerHandle, PortletDescription portletDescription, Locale locale, HttpServletRequest httpRequest, String webAppName)
Creates a proxy portlet.
|
public byte[] |
-
getPortletState (int portletInstanceId)
- Retrieves the portlet state byte array.
|
public ProxyPortletInfo [] |
-
getProxyPortletsWithDestroyErrors (String webAppName, String producerHandle)
- Returns
PortletDescription s for proxy portlets
that had errors on delete for a given producer.
|
public Map |
-
getRemovableProxyPortlets (String webAppName)
- Returns a map of ProxyPortletInfo arrays that are removable keyed by
Integer producer ids.
|
public int[] |
-
listAddedProxyPortlets (String webAppName, String producerHandle)
Lists all portlets that have been added for the specified producer.
|
public int[] |
-
listCustomizedProxyPortlets (String webAppName, String producerHandle)
Lists all portlets that have been customized for the specified
producer.
|
public int |
-
removeProxyPortlets (String webAppName, int[] proxyPortletIds)
Removes proxy portlets marked for delete for a given webApp.
|
public int |
-
removeProxyPortlets (String webAppName, int producerId, boolean removePrimaryInstances)
- Deletes ProxyPortlets for a given producer and web app.
|
public void |
-
setDestroyErrors (Map errorCauses)
- Sets delete error causes on a set of proxy portlets
Note: This method will fail silently for proxy portlets
that don't exist.
|
public int |
-
updateProxyPortlet (HttpServletRequest httpRequest, String webAppName, String portalPath, String desktopPath, int portletInstanceId, String portletHandle, byte stateChangeFlag, byte[] portletState, boolean ensureSuccessor)
- Updates specific attributes of a proxy portlet.
|
clearDestroyErrors(int[]) Method
public void clearDestroyErrors(int[] proxyPortletIds)
throws IllegalArgumentException
, ProxyPortletManagerException
Clears the delete errors associated with proxy portlets
thus making them deletable.
Parameters
-
proxyPortletIds
- unique IDs for proxy portlets under
consideration
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
createProxyPortlet(String, PortletDescription, Locale, HttpServletRequest, String) Method
public int createProxyPortlet(String
producerHandle,
PortletDescription
portletDescription,
Locale
locale,
HttpServletRequest
httpRequest,
String
webAppName)
throws IllegalArgumentException
, ProxyPortletManagerException
Creates a proxy portlet.
Parameters
-
producerHandle
- producer handle
-
portletDescription
- portlet description
-
locale
- name of the webapp in which proxy portlets reside
Returns
- portlet definition ID for the proxy portlet
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
getPortletState(int) Method
public byte[] getPortletState(int portletInstanceId)
throws IllegalArgumentException
, ProxyPortletManagerException
Retrieves the portlet state byte array.
Parameters
-
portletInstanceId
- unique ID of proxy portlet
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
getProxyPortletsWithDestroyErrors(String, String) Method
public ProxyPortletInfo
[] getProxyPortletsWithDestroyErrors(String
webAppName,
String
producerHandle)
throws IllegalArgumentException
, ProxyPortletManagerException
Returns PortletDescription
s for proxy portlets
that had errors on delete for a given producer.
Parameters
-
webAppName
- web application name
-
producerHandle
- consumer specific unique handle for a
producer
Returns
ProxyPortletInfo
representing proxy portlets
that encountered errors on destroy
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
getRemovableProxyPortlets(String) Method
public Map
getRemovableProxyPortlets(String
webAppName)
throws IllegalArgumentException
, ProxyPortletManagerException
Returns a map of ProxyPortletInfo arrays that are removable keyed by
Integer producer ids. Also locally removes primary portlet instances
that are removable so that an a destroy is not attempted on a producer
offered portlet.
Parameters
-
webAppName
- web application name
Returns
Map
of removable portlets keyed by producers
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
listAddedProxyPortlets(String, String) Method
public int[] listAddedProxyPortlets(String
webAppName,
String
producerHandle)
throws IllegalArgumentException
, ProxyPortletManagerException
Lists all portlets that have been added for the specified producer.
Returns an empty array if no portlets have been added.
Parameters
-
webAppName
- webApp name
-
producerHandle
- handle for the producer being queried
Returns
- an array of portlet definition IDs representing portlets
that have been added for the specified producer
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
listCustomizedProxyPortlets(String, String) Method
public int[] listCustomizedProxyPortlets(String
webAppName,
String
producerHandle)
throws IllegalArgumentException
, ProxyPortletManagerException
Lists all portlets that have been customized for the specified
producer. Returns an empty array if no portlets have been customized.
Parameters
-
webAppName
- web application name
-
producerHandle
- handle for the producer being queried
Returns
- an array of portlet instance IDs representing the portlets
that have been customized for the specified producer
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
removeProxyPortlets(String, int[]) Method
public int removeProxyPortlets(String
webAppName,
int[] proxyPortletIds)
throws IllegalArgumentException
, ProxyPortletManagerException
Removes proxy portlets marked for delete for a given webApp.
Parameters
-
webAppName
- web application name
-
proxyPortletIds
- IDs for proxy portlets to be removed
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
removeProxyPortlets(String, int, boolean) Method
public int removeProxyPortlets(String
webAppName,
int producerId,
boolean removePrimaryInstances)
throws IllegalArgumentException
, ProxyPortletManagerException
Deletes ProxyPortlets for a given producer and web app.
Parameters
-
webAppName
- web application name
-
producerId
- unique consumer specific producer ID
-
removePrimaryInstances
- Removes primary instances also if
set to true
Returns
- number of proxy portlets removed
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
setDestroyErrors(Map) Method
public void setDestroyErrors(Map
errorCauses)
throws IllegalArgumentException
, ProxyPortletManagerException
Sets delete error causes on a set of proxy portlets
Note: This method will fail silently for proxy portlets
that don't exist.
Parameters
-
errorCauses
- A map of string error causes keyed by Integer
proxyPortletIds
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered
updateProxyPortlet(HttpServletRequest, String, String, String, int, String, byte, byte[], boolean) Method
public int updateProxyPortlet(HttpServletRequest
httpRequest,
String
webAppName,
String
portalPath,
String
desktopPath,
int portletInstanceId,
String
portletHandle,
byte stateChangeFlag,
byte[] portletState,
boolean ensureSuccessor)
throws IllegalArgumentException
, ProxyPortletManagerException
Updates specific attributes of a proxy portlet.
Parameters
-
httpRequest
- HttpServletRequest
-
webAppName
- web application name
-
portalPath
- portal path of desktop under consideration
-
desktopPath
- desktop path of desktop under consideration
-
portletInstanceId
- portlet instance id
-
portletHandle
- portlet handle
-
stateChangeFlag
- portlet state change flag
-
portletState
- portlet state
-
ensureSuccessor
- boolean to specify if a successor needs to
be created
Returns
- instanceId of the portlet - new one if a successor was
created
Exceptions
-
IllegalArgumentException
- thrown when input arguments are
not valid
-
ProxyPortletManagerException
- thrown when a general error
is encountered