@ProviderType
public class ExportImportPathUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PATH_PREFIX_COMPANY
The company prefix used in generating paths.
|
static java.lang.String |
PATH_PREFIX_GROUP
The group prefix used in generating paths.
|
static java.lang.String |
PATH_PREFIX_LAYOUT
Deprecated.
As of 7.0.0
|
static java.lang.String |
PATH_PREFIX_PORTLET
The portlet prefix used in generating paths.
|
static java.lang.String |
PATH_PREFIX_SERVICE
The service prefix used in generating paths.
|
| Constructor and Description |
|---|
ExportImportPathUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getCompanyModelPath(long companyId,
java.lang.String className,
long classPK) |
static java.lang.String |
getExpandoPath(java.lang.String path)
Returns the expando-specific path for the entity path.
|
static java.lang.String |
getLayoutPath(PortletDataContext portletDataContext,
long plid)
Deprecated.
As of 7.0.0, replaced by
getModelPath(StagedModel) |
static java.lang.String |
getModelPath(long groupId,
java.lang.String className,
long classPK)
Returns a model path based on the group ID, class name, and class PK.
|
static java.lang.String |
getModelPath(PortletDataContext portletDataContext,
java.lang.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 java.lang.String |
getModelPath(PortletDataContext portletDataContext,
java.lang.String className,
long classPK,
java.lang.String dependentFileName)
Returns a model path for the named file related to the entity, having the
class name and class PK.
|
static java.lang.String |
getModelPath(StagedModel stagedModel)
Returns a model path for the staged model.
|
static java.lang.String |
getModelPath(StagedModel stagedModel,
java.lang.String dependentFileName)
Returns a model path for the named file related to the staged model.
|
protected static java.lang.String |
getModelPath(java.lang.String pathPrefix,
long pathPrimaryKey,
java.lang.String className,
java.io.Serializable primaryKeyObj,
java.lang.String dependentFileName) |
protected static java.lang.String |
getOwnerTypePath(int ownerType) |
static java.lang.String |
getPortletPath(PortletDataContext portletDataContext)
Returns a portlet path for the portlet ID.
|
static java.lang.String |
getPortletPath(PortletDataContext portletDataContext,
java.lang.String portletId)
Returns a portlet path for the portlet ID.
|
static java.lang.String |
getPortletPreferencesPath(PortletDataContext portletDataContext,
java.lang.String portletId,
long ownerId,
int ownerType,
long plid) |
static java.lang.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 java.lang.String |
getRootPath(java.lang.String pathPrefix,
long pathPrimaryKey) |
static java.lang.String |
getServicePortletPreferencesPath(PortletDataContext portletDataContext,
java.lang.String serviceName,
long ownerId,
int ownerType) |
static java.lang.String |
getSourceLayoutPath(PortletDataContext portletDataContext,
long layoutId)
Deprecated.
As of 7.0.0, replaced by
getModelPath(PortletDataContext, String, long) |
static java.lang.String |
getSourcePortletPath(PortletDataContext portletDataContext,
java.lang.String portletId)
Deprecated.
As of 7.0.0, with no direct replacement
|
static java.lang.String |
getSourceRootPath(PortletDataContext portletDataContext)
Returns a source root path, or fragment, of the model path.
|
public static final java.lang.String PATH_PREFIX_COMPANY
public static final java.lang.String PATH_PREFIX_GROUP
@Deprecated public static final java.lang.String PATH_PREFIX_LAYOUT
public static final java.lang.String PATH_PREFIX_PORTLET
public static final java.lang.String PATH_PREFIX_SERVICE
public static java.lang.String getCompanyModelPath(long companyId,
java.lang.String className,
long classPK)
public static java.lang.String getExpandoPath(java.lang.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 java.lang.String getLayoutPath(PortletDataContext portletDataContext, long plid)
getModelPath(StagedModel)public static java.lang.String getModelPath(long groupId,
java.lang.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 entitypublic static java.lang.String getModelPath(PortletDataContext portletDataContext, java.lang.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 java.lang.String getModelPath(PortletDataContext portletDataContext, java.lang.String className, long classPK, java.lang.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 java.lang.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 forStagedModelpublic static java.lang.String getModelPath(StagedModel stagedModel, java.lang.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 java.lang.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 java.lang.String getPortletPath(PortletDataContext portletDataContext, java.lang.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 java.lang.String getPortletPreferencesPath(PortletDataContext portletDataContext, java.lang.String portletId, long ownerId, int ownerType, long plid)
public static java.lang.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 java.lang.String getServicePortletPreferencesPath(PortletDataContext portletDataContext, java.lang.String serviceName, long ownerId, int ownerType)
@Deprecated public static java.lang.String getSourceLayoutPath(PortletDataContext portletDataContext, long layoutId)
getModelPath(PortletDataContext, String, long)@Deprecated public static java.lang.String getSourcePortletPath(PortletDataContext portletDataContext, java.lang.String portletId)
public static java.lang.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 java.lang.String getModelPath(java.lang.String pathPrefix,
long pathPrimaryKey,
java.lang.String className,
java.io.Serializable primaryKeyObj,
java.lang.String dependentFileName)
protected static java.lang.String getOwnerTypePath(int ownerType)
protected static java.lang.String getRootPath(java.lang.String pathPrefix,
long pathPrimaryKey)