lumis.content.core
Class ContentUtil

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

public class ContentUtil
extends Object

Content utility class.

Since:
4.2.0

Constructor Summary
ContentUtil()
           
 
Method Summary
static String getContentFieldId(Source<?> source)
          Returns the field identifier that corresponds to the contentId.
static 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(String name)
          Returns true if the tag name has '{', otherwise returns false.
static String normalizeTagName(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 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 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 String normalizeTagName(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(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.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.