Liferay 6.2-ce-ga5

com.liferay.portal.model
Class PortletConstants

java.lang.Object
  extended by com.liferay.portal.model.PortletConstants

public class PortletConstants
extends Object


Field Summary
static String DEFAULT_PREFERENCES
          Default preferences.
static String FACEBOOK_INTEGRATION_FBML
          Facebook integration method for FBML.
static String FACEBOOK_INTEGRATION_IFRAME
          Facebook integration method for IFrame.
static String INSTANCE_SEPARATOR
          Instance separator.
static String LAYOUT_SEPARATOR
          Layout separator.
static String USER_PRINCIPAL_STRATEGY_SCREEN_NAME
          User principal strategy for screen name.
static String USER_PRINCIPAL_STRATEGY_USER_ID
          User principal strategy for screen name.
static String USER_SEPARATOR
          User separator.
static String WAR_SEPARATOR
          War file separator.
 
Constructor Summary
PortletConstants()
           
 
Method Summary
static String assemblePortletId(String portletId, long userId)
          Returns a properly assembled portlet ID from the parameters passed.
static String assemblePortletId(String portletId, long userId, String instanceId)
          Returns a properly assembled portlet ID from the parameters passed.
static String assemblePortletId(String portletId, String instanceId)
          Returns a properly assembled portlet ID from the parameters passed.
static String getInstanceId(String portletId)
          Returns the instance ID of the portlet.
static String getRootPortletId(String portletId)
          Returns the root portlet ID of the portlet.
static long getUserId(String portletId)
          Returns the user ID of the portlet.
static boolean hasIdenticalRootPortletId(String portletId1, String portletId2)
           
static boolean hasInstanceId(String portletId)
          Returns true if the portlet ID contains an instance ID.
static boolean hasUserId(String portletId)
          Returns true if the portlet ID contains a user ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PREFERENCES

public static final String DEFAULT_PREFERENCES
Default preferences.

See Also:
Constant Field Values

FACEBOOK_INTEGRATION_FBML

public static final String FACEBOOK_INTEGRATION_FBML
Facebook integration method for FBML.

See Also:
Constant Field Values

FACEBOOK_INTEGRATION_IFRAME

public static final String FACEBOOK_INTEGRATION_IFRAME
Facebook integration method for IFrame.

See Also:
Constant Field Values

INSTANCE_SEPARATOR

public static final String INSTANCE_SEPARATOR
Instance separator.

See Also:
Constant Field Values

LAYOUT_SEPARATOR

public static final String LAYOUT_SEPARATOR
Layout separator.

See Also:
Constant Field Values

USER_PRINCIPAL_STRATEGY_SCREEN_NAME

public static final String USER_PRINCIPAL_STRATEGY_SCREEN_NAME
User principal strategy for screen name.

See Also:
Constant Field Values

USER_PRINCIPAL_STRATEGY_USER_ID

public static final String USER_PRINCIPAL_STRATEGY_USER_ID
User principal strategy for screen name.

See Also:
Constant Field Values

USER_SEPARATOR

public static final String USER_SEPARATOR
User separator.

See Also:
Constant Field Values

WAR_SEPARATOR

public static final String WAR_SEPARATOR
War file separator.

See Also:
Constant Field Values
Constructor Detail

PortletConstants

public PortletConstants()
Method Detail

assemblePortletId

public static String assemblePortletId(String portletId,
                                       long userId)
Returns a properly assembled portlet ID from the parameters passed. If the portlet ID contains an instance ID it will be properly retained. If the portlet ID contains a user ID it will be replaced by the user ID parameter.

Parameters:
portletId - the portlet ID
userId - a user ID
Returns:
the properly assembled portlet ID

assemblePortletId

public static String assemblePortletId(String portletId,
                                       long userId,
                                       String instanceId)
Returns a properly assembled portlet ID from the parameters passed. If the portlet ID contains a user ID it will be replaced by the user ID parameter. If the portlet ID contains an instance ID it will be replaced by the instance ID parameter.

Parameters:
portletId - the portlet ID
userId - the user ID
instanceId - an instance ID
Returns:
the properly assembled portlet ID

assemblePortletId

public static String assemblePortletId(String portletId,
                                       String instanceId)
Returns a properly assembled portlet ID from the parameters passed. If the portlet ID contains a user ID it will be properly retained. If the portlet ID contains an instance ID it will be replaced by the instance ID parameter.

Parameters:
portletId - the portlet ID
instanceId - an instance ID
Returns:
the properly assembled portlet ID

getInstanceId

public static String getInstanceId(String portletId)
Returns the instance ID of the portlet.

Parameters:
portletId - the portlet ID
Returns:
the instance ID of the portlet

getRootPortletId

public static String getRootPortletId(String portletId)
Returns the root portlet ID of the portlet.

Parameters:
portletId - the portlet ID
Returns:
the root portlet ID of the portlet

getUserId

public static long getUserId(String portletId)
Returns the user ID of the portlet. This only applies when the portlet is added by a user to a page in customizable mode.

Parameters:
portletId - the portlet ID
Returns:
the user ID of the portlet

hasIdenticalRootPortletId

public static boolean hasIdenticalRootPortletId(String portletId1,
                                                String portletId2)

hasInstanceId

public static boolean hasInstanceId(String portletId)
Returns true if the portlet ID contains an instance ID.

Parameters:
portletId - the portlet ID
Returns:
true if the portlet ID contains an instance ID; false otherwise

hasUserId

public static boolean hasUserId(String portletId)
Returns true if the portlet ID contains a user ID.

Parameters:
portletId - the portlet ID
Returns:
true if the portlet ID contains a user ID; false otherwise

Liferay 6.2-ce-ga5