org.apache.wsrp4j.producer.provider.driver
Class PortletRegistrationFilterImpl

java.lang.Object
  extended by org.apache.wsrp4j.producer.provider.driver.PortletRegistrationFilterImpl
All Implemented Interfaces:
PortletRegistrationFilter, PortletRegistrationFilterWriter

public class PortletRegistrationFilterImpl
extends java.lang.Object
implements PortletRegistrationFilter, PortletRegistrationFilterWriter

This class implements the interfaces PortletRegistrationFilter and PortletRegistrationFilterWriter.

Author:
Stefan Behl, Ralf Altrichter

Method Summary
static PortletRegistrationFilter createReader()
           
static PortletRegistrationFilterWriter createWriter()
           
 java.util.Iterator getAvailable(java.lang.String regHandle)
          Returns all portlet handles of portlets, a certain consumer (identified by regHandle) can utilize.
 boolean isAvailable(java.lang.String regHandle, java.lang.String portletHandle)
          Indicates whether a certain consumer is allowed to utilize the portlet identified by portletHandle or not.
 void makeAvailable(java.lang.String regHandle, java.util.Iterator portletHandles)
          Makes several portlets (identified by portletHandles) available to a certain consumer (identified by regHandle).
 void makeAvailable(java.lang.String regHandle, java.lang.String portletHandle)
          Makes a certain portlet (identified by portletHandle) available to a consumer (identified by regHandle).
 void remove(java.lang.String regHandle)
          Removes an entire entry for a certain consumer (identified by regHandle).
 void remove(java.lang.String regHandle, java.util.Iterator portletHandles)
          Abrogates the availability of several portlets (identified by portletHandles) regarding a certain consumer (identified by regHandle).
 void remove(java.lang.String regHandle, java.lang.String portletHandle)
          Abrogates the availability of a certain portlet (identified by portletHandle) regarding a certain consumer (identified by regHandle).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createWriter

public static PortletRegistrationFilterWriter createWriter()
Returns:
PortletRegistrationFilterWriter

createReader

public static PortletRegistrationFilter createReader()
Returns:
PortletRegistrationFilter

getAvailable

public java.util.Iterator getAvailable(java.lang.String regHandle)
Returns all portlet handles of portlets, a certain consumer (identified by regHandle) can utilize. Returns null if there are no entries for the provided regHandle.

Specified by:
getAvailable in interface PortletRegistrationFilter
Parameters:
regHandle - String representing the registration handle of a consumer
Returns:
Iterator of portlet handles

isAvailable

public boolean isAvailable(java.lang.String regHandle,
                           java.lang.String portletHandle)
Indicates whether a certain consumer is allowed to utilize the portlet identified by portletHandle or not. Returns false if there is no entry for the provided handles.

Specified by:
isAvailable in interface PortletRegistrationFilter
Parameters:
regHandle - String representing the registration handle of a consumer
portletHandle - String representing the portlet handle of an portlet
Returns:
boolean indicating whether the consumer corresponding to regHandle is allowed to use the portlet identified by portletHandle

makeAvailable

public void makeAvailable(java.lang.String regHandle,
                          java.lang.String portletHandle)
                   throws WSRPException
Makes a certain portlet (identified by portletHandle) available to a consumer (identified by regHandle). If there is no portlet in the portlet pool that corresponds to portletHandle, the method performs nothing.

Specified by:
makeAvailable in interface PortletRegistrationFilterWriter
Parameters:
regHandle - String representing the registration handle of a consumer
portletHandle - String representing the portlet handle of a consumer
Throws:
WSRPException

makeAvailable

public void makeAvailable(java.lang.String regHandle,
                          java.util.Iterator portletHandles)
                   throws WSRPException
Makes several portlets (identified by portletHandles) available to a certain consumer (identified by regHandle). For portlet handles that do not correspond to portlets kept within the portlet pool, the method makes no availability-entry.

Specified by:
makeAvailable in interface PortletRegistrationFilterWriter
Parameters:
regHandle - String representing the registration handle of a consumer
portletHandles - Iterator containing some portlet handles of portlets
Throws:
WSRPException

remove

public void remove(java.lang.String regHandle)
Removes an entire entry for a certain consumer (identified by regHandle). If there are no entries for the provided regHandle, the method performs nothing. The method is useful when a consumer deregisters.

Specified by:
remove in interface PortletRegistrationFilterWriter
Parameters:
regHandle - String representing the registration handle of a consumer

remove

public void remove(java.lang.String regHandle,
                   java.lang.String portletHandle)
            throws WSRPException
Abrogates the availability of a certain portlet (identified by portletHandle) regarding a certain consumer (identified by regHandle). If there is no entry for the provided regHandle and portletHandle, the method performs nothing.

Specified by:
remove in interface PortletRegistrationFilterWriter
Parameters:
regHandle - String representing the registration handle of a consumer
portletHandle - String representing the portlet handle of a consumer
Throws:
WSRPException

remove

public void remove(java.lang.String regHandle,
                   java.util.Iterator portletHandles)
            throws WSRPException
Abrogates the availability of several portlets (identified by portletHandles) regarding a certain consumer (identified by regHandle). For portlet handles that do not correspond to portlets kept within the portlet pool, the method performs nothing.

Specified by:
remove in interface PortletRegistrationFilterWriter
Parameters:
regHandle - String representing the registration handle of a consumer
portletHandles - Iterator containing some portlet handles of portlets
Throws:
WSRPException