com.liferay.portlet.dynamicdatamapping.util
Class DDMImpl
java.lang.Object
com.liferay.portlet.dynamicdatamapping.util.DDMImpl
- All Implemented Interfaces:
- DDM
public class DDMImpl
- extends Object
- implements DDM
|
Method Summary |
protected int |
countFieldRepetition(String[] fieldsDisplayValues,
String fieldName)
|
protected Field |
createField(DDMStructure ddmStructure,
String fieldName,
List<Serializable> fieldValues,
ServiceContext serviceContext)
|
DDMDisplay |
getDDMDisplay(ServiceContext serviceContext)
|
protected DDMStructure |
getDDMStructure(long ddmStructureId,
long ddmTemplateId)
|
Serializable |
getDisplayFieldValue(ThemeDisplay themeDisplay,
Serializable fieldValue,
String type)
|
protected int |
getExistingFieldValueIndex(String[] newFieldsDisplayValues,
String[] existingFieldsDisplayValues,
String fieldName,
int index)
|
protected String |
getFieldIntanceId(String[] fieldsDisplayValues,
String fieldName,
int index)
|
protected List<String> |
getFieldNames(String fieldNamespace,
String fieldName,
ServiceContext serviceContext)
|
Fields |
getFields(long ddmStructureId,
long ddmTemplateId,
ServiceContext serviceContext)
|
Fields |
getFields(long ddmStructureId,
long ddmTemplateId,
String fieldNamespace,
ServiceContext serviceContext)
|
Fields |
getFields(long ddmStructureId,
ServiceContext serviceContext)
|
protected Fields |
getFields(long ddmStructureId,
String serializedDDMFormValues)
|
Fields |
getFields(long ddmStructureId,
String fieldNamespace,
ServiceContext serviceContext)
|
String[] |
getFieldsDisplayValues(Field fieldsDisplayField)
|
protected int |
getFieldValueIndex(String[] fieldsDisplayValues,
String fieldName,
String instanceId)
|
protected List<Serializable> |
getFieldValues(DDMStructure ddmStructure,
String fieldName,
String fieldNamespace,
ServiceContext serviceContext)
|
protected List<Serializable> |
getFieldValues(Field field,
Locale locale)
|
protected byte[] |
getImageBytes(UploadRequest uploadRequest,
String fieldNameValue)
|
protected String |
getImageFieldValue(UploadRequest uploadRequest,
String fieldNameValue)
|
Serializable |
getIndexedFieldValue(Serializable fieldValue,
String type)
|
protected Set<Locale> |
getMergedAvailableLocales(Set<Locale> newFieldAvailableLocales,
Set<Locale> existingFieldAvailableLocales)
|
protected List<Serializable> |
getMergedFieldValues(String fieldName,
List<Serializable> newFieldValues,
String[] newFieldsDisplayValues,
List<Serializable> existingFieldValues,
String[] existingFieldsDisplayValues,
List<Serializable> defaultFieldValues)
|
protected Map<Locale,List<Serializable>> |
getMergedFieldValuesMap(Field newField,
String[] newFieldsDisplayValues,
Field existingField,
String[] existingFieldsDisplayValues)
|
OrderByComparator<DDMStructure> |
getStructureOrderByComparator(String orderByCol,
String orderByType)
|
OrderByComparator<DDMTemplate> |
getTemplateOrderByComparator(String orderByCol,
String orderByType)
|
Fields |
mergeFields(Fields newFields,
Fields existingFields)
|
protected String[] |
splitFieldsDisplayValue(Field fieldsDisplayField)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FIELDS_DISPLAY_NAME
public static final String FIELDS_DISPLAY_NAME
- See Also:
- Constant Field Values
INSTANCE_SEPARATOR
public static final String INSTANCE_SEPARATOR
- See Also:
- Constant Field Values
TYPE_CHECKBOX
public static final String TYPE_CHECKBOX
- See Also:
- Constant Field Values
TYPE_DDM_DATE
public static final String TYPE_DDM_DATE
- See Also:
- Constant Field Values
TYPE_DDM_DOCUMENTLIBRARY
public static final String TYPE_DDM_DOCUMENTLIBRARY
- See Also:
- Constant Field Values
TYPE_DDM_IMAGE
public static final String TYPE_DDM_IMAGE
- See Also:
- Constant Field Values
TYPE_DDM_LINK_TO_PAGE
public static final String TYPE_DDM_LINK_TO_PAGE
- See Also:
- Constant Field Values
TYPE_DDM_TEXT_HTML
public static final String TYPE_DDM_TEXT_HTML
- See Also:
- Constant Field Values
TYPE_RADIO
public static final String TYPE_RADIO
- See Also:
- Constant Field Values
TYPE_SELECT
public static final String TYPE_SELECT
- See Also:
- Constant Field Values
DDMImpl
public DDMImpl()
getDDMDisplay
public DDMDisplay getDDMDisplay(ServiceContext serviceContext)
- Specified by:
getDDMDisplay in interface DDM
getDisplayFieldValue
public Serializable getDisplayFieldValue(ThemeDisplay themeDisplay,
Serializable fieldValue,
String type)
throws Exception
- Specified by:
getDisplayFieldValue in interface DDM
- Throws:
Exception
getFields
public Fields getFields(long ddmStructureId,
long ddmTemplateId,
ServiceContext serviceContext)
throws PortalException
- Specified by:
getFields in interface DDM
- Throws:
PortalException
getFields
public Fields getFields(long ddmStructureId,
long ddmTemplateId,
String fieldNamespace,
ServiceContext serviceContext)
throws PortalException
- Specified by:
getFields in interface DDM
- Throws:
PortalException
getFields
public Fields getFields(long ddmStructureId,
ServiceContext serviceContext)
throws PortalException
- Specified by:
getFields in interface DDM
- Throws:
PortalException
getFields
public Fields getFields(long ddmStructureId,
String fieldNamespace,
ServiceContext serviceContext)
throws PortalException
- Specified by:
getFields in interface DDM
- Throws:
PortalException
getFieldsDisplayValues
public String[] getFieldsDisplayValues(Field fieldsDisplayField)
throws Exception
- Specified by:
getFieldsDisplayValues in interface DDM
- Throws:
Exception
getIndexedFieldValue
public Serializable getIndexedFieldValue(Serializable fieldValue,
String type)
throws Exception
- Specified by:
getIndexedFieldValue in interface DDM
- Throws:
Exception
getStructureOrderByComparator
public OrderByComparator<DDMStructure> getStructureOrderByComparator(String orderByCol,
String orderByType)
- Specified by:
getStructureOrderByComparator in interface DDM
getTemplateOrderByComparator
public OrderByComparator<DDMTemplate> getTemplateOrderByComparator(String orderByCol,
String orderByType)
- Specified by:
getTemplateOrderByComparator in interface DDM
mergeFields
public Fields mergeFields(Fields newFields,
Fields existingFields)
- Specified by:
mergeFields in interface DDM
countFieldRepetition
protected int countFieldRepetition(String[] fieldsDisplayValues,
String fieldName)
createField
protected Field createField(DDMStructure ddmStructure,
String fieldName,
List<Serializable> fieldValues,
ServiceContext serviceContext)
getDDMStructure
protected DDMStructure getDDMStructure(long ddmStructureId,
long ddmTemplateId)
throws PortalException
- Throws:
PortalException
getExistingFieldValueIndex
protected int getExistingFieldValueIndex(String[] newFieldsDisplayValues,
String[] existingFieldsDisplayValues,
String fieldName,
int index)
getFieldIntanceId
protected String getFieldIntanceId(String[] fieldsDisplayValues,
String fieldName,
int index)
getFieldNames
protected List<String> getFieldNames(String fieldNamespace,
String fieldName,
ServiceContext serviceContext)
getFields
protected Fields getFields(long ddmStructureId,
String serializedDDMFormValues)
throws PortalException
- Throws:
PortalException
getFieldValueIndex
protected int getFieldValueIndex(String[] fieldsDisplayValues,
String fieldName,
String instanceId)
getFieldValues
protected List<Serializable> getFieldValues(DDMStructure ddmStructure,
String fieldName,
String fieldNamespace,
ServiceContext serviceContext)
throws PortalException
- Throws:
PortalException
getFieldValues
protected List<Serializable> getFieldValues(Field field,
Locale locale)
getImageBytes
protected byte[] getImageBytes(UploadRequest uploadRequest,
String fieldNameValue)
throws Exception
- Throws:
Exception
getImageFieldValue
protected String getImageFieldValue(UploadRequest uploadRequest,
String fieldNameValue)
getMergedAvailableLocales
protected Set<Locale> getMergedAvailableLocales(Set<Locale> newFieldAvailableLocales,
Set<Locale> existingFieldAvailableLocales)
getMergedFieldValues
protected List<Serializable> getMergedFieldValues(String fieldName,
List<Serializable> newFieldValues,
String[] newFieldsDisplayValues,
List<Serializable> existingFieldValues,
String[] existingFieldsDisplayValues,
List<Serializable> defaultFieldValues)
getMergedFieldValuesMap
protected Map<Locale,List<Serializable>> getMergedFieldValuesMap(Field newField,
String[] newFieldsDisplayValues,
Field existingField,
String[] existingFieldsDisplayValues)
splitFieldsDisplayValue
protected String[] splitFieldsDisplayValue(Field fieldsDisplayField)