lumis.content.core
Class ContentUtil

Package class diagram package ContentUtil
java.lang.Object
  extended by lumis.content.core.ContentUtil

public class ContentUtil
extends java.lang.Object

Content utility class.

Since:
4.2.0

Constructor Summary
ContentUtil()
           
 
Method Summary
static java.lang.String getContentFieldId(Source<?> source)
          Returns the field identifier that corresponds to the contentId.
static java.lang.String getOldItemIdParameter(IServiceInterfaceRequest request)
          Gets the itemId parameter for a request, trying to be most backward compatible with the 4.1 implementation logic.
static boolean isValidTagName(java.lang.String name)
          Returns true if the tag name has '{', otherwise returns false.
static java.lang.String normalizeTagName(java.lang.String name)
          Normalizes a tag name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentUtil

public ContentUtil()
Method Detail

getOldItemIdParameter

public static java.lang.String getOldItemIdParameter(IServiceInterfaceRequest request)
                                              throws PortalException
Gets the itemId parameter for a request, trying to be most backward compatible with the 4.1 implementation logic.

Uses the value of PortalRequestParameters.PAGE_PARAMETER_ITEM_ID as contentId, tries to discover the most appropriated contentVersion.itemId (data primary key) and returns it.

Parameters:
request - the request.
Returns:
the itemId, or null if it could not be obtained.
Throws:
PortalException
Since:
4.2.0

getContentFieldId

public static java.lang.String getContentFieldId(Source<?> source)
Returns the field identifier that corresponds to the contentId. If none found null is returned.

Parameters:
source - The source in which the contentId field is detected.
Returns:
the field identifier.
Since:
6.1.0

normalizeTagName

public static java.lang.String normalizeTagName(java.lang.String name)
Normalizes a tag name. The normalization applies rules that are used to identify if two tags are considered equal and may not coexist in a same tag repository.

Parameters:
name - the tag name.
Returns:
the normalized tag name.
Since:
6.0.0

isValidTagName

public static boolean isValidTagName(java.lang.String name)
Returns true if the tag name has '{', otherwise returns false.

Returns:
true if the tag name has '{', otherwise returns false.
Since:
6.0.0


Lumisportal  6.1.0.111014 - Copyright © 2001-2007, Lumis. All Rights Reserved.