|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portlet.exportimport.lar.ExportImportPathUtil
@ProviderType public class ExportImportPathUtil
Provides utility methods for generating paths for entities being serialized with the portal's export/import framework.
| Field Summary | |
|---|---|
static String |
PATH_PREFIX_COMPANY
The company prefix used in generating paths. |
static String |
PATH_PREFIX_GROUP
The group prefix used in generating paths. |
static String |
PATH_PREFIX_LAYOUT
Deprecated. As of 7.0.0 |
static String |
PATH_PREFIX_PORTLET
The portlet prefix used in generating paths. |
static String |
PATH_PREFIX_SERVICE
The service prefix used in generating paths. |
| Constructor Summary | |
|---|---|
ExportImportPathUtil()
|
|
| Method Summary | |
|---|---|
static String |
getCompanyModelPath(long companyId,
String className,
long classPK)
|
static String |
getExpandoPath(String path)
Returns the expando-specific path for the entity path. |
static String |
getLayoutPath(PortletDataContext portletDataContext,
long plid)
Deprecated. As of 7.0.0, replaced by getModelPath(StagedModel) |
static String |
getModelPath(long groupId,
String className,
long classPK)
Returns a model path based on the group ID, class name, and class PK. |
static String |
getModelPath(PortletDataContext portletDataContext,
String className,
long classPK)
Returns a model path based on the group ID, class name, and class PK, where the group ID is queried from the portlet data context. |
static String |
getModelPath(PortletDataContext portletDataContext,
String className,
long classPK,
String dependentFileName)
Returns a model path for the named file related to the entity, having the class name and class PK. |
static String |
getModelPath(StagedModel stagedModel)
Returns a model path for the staged model. |
static String |
getModelPath(StagedModel stagedModel,
String dependentFileName)
Returns a model path for the named file related to the staged model. |
protected static String |
getModelPath(String pathPrefix,
long pathPrimaryKey,
String className,
Serializable primaryKeyObj,
String dependentFileName)
|
protected static String |
getOwnerTypePath(int ownerType)
|
static String |
getPortletPath(PortletDataContext portletDataContext)
Returns a portlet path for the portlet ID. |
static String |
getPortletPath(PortletDataContext portletDataContext,
String portletId)
Returns a portlet path for the portlet ID. |
static String |
getPortletPreferencesPath(PortletDataContext portletDataContext,
String portletId,
long ownerId,
int ownerType,
long plid)
|
static String |
getRootPath(PortletDataContext portletDataContext)
Returns a root path, or fragment, of the model path based on the scope group ID from the portlet data context. |
protected static String |
getRootPath(String pathPrefix,
long pathPrimaryKey)
|
static String |
getServicePortletPreferencesPath(PortletDataContext portletDataContext,
String serviceName,
long ownerId,
int ownerType)
|
static String |
getSourceLayoutPath(PortletDataContext portletDataContext,
long layoutId)
Deprecated. As of 7.0.0, replaced by getModelPath(PortletDataContext, String, long) |
static String |
getSourcePortletPath(PortletDataContext portletDataContext,
String portletId)
Deprecated. As of 7.0.0, with no direct replacement |
static String |
getSourceRootPath(PortletDataContext portletDataContext)
Returns a source root path, or fragment, of the model path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PATH_PREFIX_COMPANY
public static final String PATH_PREFIX_GROUP
@Deprecated public static final String PATH_PREFIX_LAYOUT
public static final String PATH_PREFIX_PORTLET
public static final String PATH_PREFIX_SERVICE
| Constructor Detail |
|---|
public ExportImportPathUtil()
| Method Detail |
|---|
public static String getCompanyModelPath(long companyId,
String className,
long classPK)
public static String getExpandoPath(String path)
For example, if you had the entity path of
/group/10184/com.liferay.portlet.dynamicdatamapping.DDMStructure/10951.xml,
the returned expando-specific path would be the following:
/group/10184/com.liferay.portlet.dynamicdatamapping.DDMStructure/10951-expando.xml
path - the previously generated entity path
@Deprecated
public static String getLayoutPath(PortletDataContext portletDataContext,
long plid)
getModelPath(StagedModel)
public static String getModelPath(long groupId,
String className,
long classPK)
For example, a model path would resemble the following:
/group/"groupId"/"className"/"classPK".xml
groupId - the group ID of the entity's groupclassName - the entity's class nameclassPK - the primary key of the entity
public static String getModelPath(PortletDataContext portletDataContext,
String className,
long classPK)
For example, a model path would resemble the following:
/group/"queried groupId"/"className"/"classPK".xml
portletDataContext - the context of the current export/import
processclassName - the entity's class nameclassPK - the primary key of the entity
PortletDataContext.getSourceGroupId()
public static String getModelPath(PortletDataContext portletDataContext,
String className,
long classPK,
String dependentFileName)
For example, a model path would resemble the following:
/group/"queried groupId"/"className"/"classPK"/"dependentFileName"
portletDataContext - the context of the current export/import
processclassName - the related entity's class nameclassPK - the primary key of the related entitydependentFileName - the dependent object's file name
public static String getModelPath(StagedModel stagedModel)
For example, a model path would resemble the following:
/group/"queried groupId"/"queried className"/"queried classPK".xml
stagedModel - the staged model the path is needed for
StagedModel
public static String getModelPath(StagedModel stagedModel,
String dependentFileName)
This method is useful, for example, for generating the path for an image related to a web content article. The staged model's attributes are used to generate the first part of the path; then the dependent object's file name is attached to the end of the path.
For example, a model path would resemble the following:
/group/"queried groupId"/"queried className"/"queried classPK"/"dependentFileName"
stagedModel - the staged model the path is needed fordependentFileName - the dependent object's file name
public static String getPortletPath(PortletDataContext portletDataContext)
For example, a portlet path would resemble the following:
/group/"queried groupId"/portlet/"portletId"
portletDataContext - the context of the current export/import
process
public static String getPortletPath(PortletDataContext portletDataContext,
String portletId)
For example, a portlet path would resemble the following:
/group/"queried groupId"/portlet/"portletId"
portletDataContext - the context of the current export/import
processportletId - the portlet ID the path is being generated for
public static String getPortletPreferencesPath(PortletDataContext portletDataContext,
String portletId,
long ownerId,
int ownerType,
long plid)
public static String getRootPath(PortletDataContext portletDataContext)
For example, a root path would resemble the following:
/group/"queried groupId"
portletDataContext - the context of the current export/import
process
PortletDataContext.getScopeGroupId(),
getSourceRootPath(PortletDataContext)
public static String getServicePortletPreferencesPath(PortletDataContext portletDataContext,
String serviceName,
long ownerId,
int ownerType)
@Deprecated
public static String getSourceLayoutPath(PortletDataContext portletDataContext,
long layoutId)
getModelPath(PortletDataContext, String, long)
@Deprecated
public static String getSourcePortletPath(PortletDataContext portletDataContext,
String portletId)
public static String getSourceRootPath(PortletDataContext portletDataContext)
getRootPath(PortletDataContext) method. The
fragment is generated with the source group ID from the portlet data
context. This helper method is useful during the import process.
For example, a source root path would resemble the following:
/group/"queried groupId"
portletDataContext - the context of the current export/import
process
PortletDataContext.getSourceGroupId()
protected static String getModelPath(String pathPrefix,
long pathPrimaryKey,
String className,
Serializable primaryKeyObj,
String dependentFileName)
protected static String getOwnerTypePath(int ownerType)
protected static String getRootPath(String pathPrefix,
long pathPrimaryKey)
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||