public class ExportImportPathUtil
extends Object
Modifier and Type | Field and Description |
---|---|
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 Wilberforce (7.0.x)
|
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 and Description |
---|
ExportImportPathUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getCompanyModelPath(long companyId,
String className,
long classPK) |
static String |
getCompanyModelPath(long companyId,
String className,
Serializable 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 Wilberforce (7.0.x), replaced by
getModelPath(StagedModel) |
static String |
getModelPath(long groupId,
String className,
long classPK) |
static String |
getModelPath(long groupId,
String className,
Serializable 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 |
getPortletDataPath(PortletDataContext portletDataContext) |
static String |
getPortletDataPath(PortletDataContext portletDataContext,
String portletId,
long plid) |
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 Wilberforce (7.0.x), replaced by
getModelPath(PortletDataContext, String, long) |
static String |
getSourcePortletPath(PortletDataContext portletDataContext,
String portletId)
Deprecated.
As of Wilberforce (7.0.x), with no direct replacement
|
static String |
getSourceRootPath(PortletDataContext portletDataContext)
Returns a source root path, or fragment, of the model path.
|
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
public static String getCompanyModelPath(long companyId, String className, long classPK)
public static String getCompanyModelPath(long companyId, String className, Serializable classPK)
public static String getExpandoPath(String path)
For example, if you had the entity path of
/group/10184/com.liferay.dynamic.data.mapping.kernel.DDMStructure/10951.xml
,
the returned expando-specific path would be the following:
/group/10184/com.liferay.dynamic.data.mapping.kernel.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)
public static String getModelPath(long groupId, String className, Serializable 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 entitypublic 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 entityPortletDataContext.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 namepublic 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 forStagedModel
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 namepublic static String getPortletDataPath(PortletDataContext portletDataContext)
public static String getPortletDataPath(PortletDataContext portletDataContext, String portletId, long plid)
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
processpublic 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 forpublic 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
processPortletDataContext.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
processPortletDataContext.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)