|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.b2creference.utils.ContentUtils
public class ContentUtils
Constructor Summary | |
---|---|
ContentUtils()
|
Method Summary | ||
---|---|---|
static com.endeca.content.ContentItem |
getContentItem(javax.servlet.http.HttpServletRequest request)
Returns the content item property with the given name, throwing an exception if the property doesn't exist or its value is null, or if the property value is not of the required type clazz |
|
static
|
getOptionalProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName,
java.lang.Class<T> clazz)
Returns the content item property with the given name, or null if that property doesn't exist or its value is null. |
|
static
|
getOptionalProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName,
java.lang.Class<T> clazz,
T defaultVal)
Returns the content item property with the given name, or defaultValue if that property
doesn't exist or its value is null. |
|
static boolean |
getRequiredBooleanProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName)
|
|
static java.util.List<com.endeca.content.ContentItem> |
getRequiredContentItemListProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName)
|
|
static com.endeca.content.ContentItem |
getRequiredContentItemProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName)
|
|
static int |
getRequiredIntegerProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName)
|
|
static
|
getRequiredProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName,
java.lang.Class<T> clazz)
Returns the content item property with the given name, throwing an exception if the property doesn't exist or its value is null, or if the property value is not of the required type clazz |
|
static java.lang.String |
getRequiredStringProperty(com.endeca.content.ContentItem contentItem,
java.lang.String propName)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentUtils()
Method Detail |
---|
public static com.endeca.content.ContentItem getContentItem(javax.servlet.http.HttpServletRequest request)
clazz
T
- contentItem
- propName
- clazz
- The type of the returned object
com.endeca.content.ContentException
public static <T> T getRequiredProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName, java.lang.Class<T> clazz) throws com.endeca.content.ContentException
clazz
T
- contentItem
- propName
- clazz
- The type of the returned object
com.endeca.content.ContentException
public static <T> T getOptionalProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName, java.lang.Class<T> clazz) throws com.endeca.content.ContentException
clazz
T
- contentItem
- propName
- clazz
- The type of the returned object
com.endeca.content.ContentException
public static <T> T getOptionalProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName, java.lang.Class<T> clazz, T defaultVal) throws com.endeca.content.ContentException
defaultValue
if that property
doesn't exist or its value is null. Throws an exception if the property value is not
of the required type clazz
T
- contentItem
- propName
- clazz
- The type of the returned objectdefaultValue
- The default value to return if the property or it's value is null
com.endeca.content.ContentException
public static boolean getRequiredBooleanProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName) throws com.endeca.content.ContentException
com.endeca.content.ContentException
public static int getRequiredIntegerProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName) throws com.endeca.content.ContentException
com.endeca.content.ContentException
public static java.lang.String getRequiredStringProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName) throws com.endeca.content.ContentException
com.endeca.content.ContentException
public static com.endeca.content.ContentItem getRequiredContentItemProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName) throws com.endeca.content.ContentException
com.endeca.content.ContentException
public static java.util.List<com.endeca.content.ContentItem> getRequiredContentItemListProperty(com.endeca.content.ContentItem contentItem, java.lang.String propName) throws com.endeca.content.ContentException
com.endeca.content.ContentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |