public class AssetUtil
extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ASSET_ENTRY_ABSTRACT_LENGTH |
static String |
CLASSNAME_SEPARATOR |
static char[] |
INVALID_CHARACTERS |
| Constructor and Description |
|---|
AssetUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Set<String> |
addLayoutTags(javax.servlet.http.HttpServletRequest request,
List<com.liferay.asset.kernel.model.AssetTag> tags) |
static void |
addPortletBreadcrumbEntries(long assetCategoryId,
javax.servlet.http.HttpServletRequest request,
PortletURL portletURL) |
static void |
addPortletBreadcrumbEntries(long assetCategoryId,
javax.servlet.http.HttpServletRequest request,
PortletURL portletURL,
boolean portletBreadcrumbEntry) |
static String |
checkViewURL(com.liferay.asset.kernel.model.AssetEntry assetEntry,
boolean viewInContext,
String viewURL,
String currentURL,
com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay) |
static long[] |
filterCategoryIds(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
long[] categoryIds) |
static List<com.liferay.asset.kernel.model.AssetVocabulary> |
filterVocabularies(List<com.liferay.asset.kernel.model.AssetVocabulary> vocabularies,
String className,
long classTypePK) |
static long[] |
filterVocabularyIds(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
long[] vocabularyIds) |
static PortletURL |
getAddPortletURL(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
long groupId,
String className,
long classTypeId,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect) |
static PortletURL |
getAddPortletURL(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
String className,
long classTypeId,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
Deprecated.
As of Wilberforce (7.0.x), replaced by
getAddPortletURL(LiferayPortletRequest,
LiferayPortletResponse, long, String, long, long[], String[],
String) |
static Map<String,PortletURL> |
getAddPortletURLs(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
long[] classNameIds,
long[] classTypeIds,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
Deprecated.
As of Wilberforce (7.0.x), replaced by
getAddPortletURLs(LiferayPortletRequest,
LiferayPortletResponse, long, long[], long[], long[],
String[], String) |
static Map<String,PortletURL> |
getAddPortletURLs(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest,
com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse,
long groupId,
long[] classNameIds,
long[] classTypeIds,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect) |
static String |
getAddURLPopUp(long groupId,
long plid,
PortletURL addPortletURL,
String portletId,
boolean addDisplayPageParameter,
com.liferay.portal.kernel.model.Layout layout) |
static List<com.liferay.asset.kernel.model.AssetEntry> |
getAssetEntries(com.liferay.portal.kernel.search.Hits hits) |
static String |
getAssetKeywords(String className,
long classPK) |
protected static AssetSearcher |
getAssetSearcher(com.liferay.portal.kernel.search.SearchContext searchContext,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end) |
static String |
getClassName(String className) |
static String |
getClassNameMessage(String className,
Locale locale) |
protected static boolean |
getDDMFormFieldLocalizable(String sortField) |
protected static String |
getDDMFormFieldType(String sortField) |
static String |
getDefaultAssetPublisherId(com.liferay.portal.kernel.model.Layout layout) |
static Set<String> |
getLayoutTagNames(javax.servlet.http.HttpServletRequest request) |
protected static String |
getOrderByCol(String sortField,
String fieldType,
boolean fieldLocalizable,
int sortType,
Locale locale) |
protected static String |
getOrderByCol(String sortField,
String fieldType,
int sortType,
Locale locale) |
protected static com.liferay.portal.kernel.search.Sort |
getSort(String orderByType,
String sortField,
Locale locale) |
protected static com.liferay.portal.kernel.search.Sort[] |
getSorts(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
Locale locale) |
protected static int |
getSortType(String fieldType) |
static boolean |
hasSubtype(String subtypeClassName,
Map<String,PortletURL> addPortletURLs) |
static boolean |
isDefaultAssetPublisher(com.liferay.portal.kernel.model.Layout layout,
String portletId,
String portletResource) |
static boolean |
isValidWord(String word) |
static com.liferay.portal.kernel.search.Hits |
search(javax.servlet.http.HttpServletRequest request,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end) |
static com.liferay.portal.kernel.search.Hits |
search(com.liferay.portal.kernel.search.SearchContext searchContext,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end) |
static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.asset.kernel.model.AssetEntry> |
searchAssetEntries(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
long[] assetCategoryIds,
String[] assetTagNames,
Map<String,Serializable> attributes,
long companyId,
String keywords,
com.liferay.portal.kernel.model.Layout layout,
Locale locale,
long scopeGroupId,
TimeZone timeZone,
long userId,
int start,
int end) |
static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.asset.kernel.model.AssetEntry> |
searchAssetEntries(javax.servlet.http.HttpServletRequest request,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end) |
static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.asset.kernel.model.AssetEntry> |
searchAssetEntries(com.liferay.portal.kernel.search.SearchContext searchContext,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end) |
static String |
substituteCategoryPropertyVariables(long groupId,
long categoryId,
String s) |
static String |
toWord(String text) |
public static final int ASSET_ENTRY_ABSTRACT_LENGTH
public static final String CLASSNAME_SEPARATOR
public static final char[] INVALID_CHARACTERS
public static Set<String> addLayoutTags(javax.servlet.http.HttpServletRequest request,
List<com.liferay.asset.kernel.model.AssetTag> tags)
public static void addPortletBreadcrumbEntries(long assetCategoryId,
javax.servlet.http.HttpServletRequest request,
PortletURL portletURL)
throws Exception
Exceptionpublic static void addPortletBreadcrumbEntries(long assetCategoryId,
javax.servlet.http.HttpServletRequest request,
PortletURL portletURL,
boolean portletBreadcrumbEntry)
throws Exception
Exceptionpublic static String checkViewURL(com.liferay.asset.kernel.model.AssetEntry assetEntry,
boolean viewInContext,
String viewURL,
String currentURL,
com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)
public static long[] filterCategoryIds(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
long[] categoryIds)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static List<com.liferay.asset.kernel.model.AssetVocabulary> filterVocabularies(List<com.liferay.asset.kernel.model.AssetVocabulary> vocabularies,
String className,
long classTypePK)
public static long[] filterVocabularyIds(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
long[] vocabularyIds)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static PortletURL getAddPortletURL(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest, com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse, long groupId, String className, long classTypeId, long[] allAssetCategoryIds, String[] allAssetTagNames, String redirect) throws Exception
Exception@Deprecated public static PortletURL getAddPortletURL(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest, com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse, String className, long classTypeId, long[] allAssetCategoryIds, String[] allAssetTagNames, String redirect) throws Exception
getAddPortletURL(LiferayPortletRequest,
LiferayPortletResponse, long, String, long, long[], String[],
String)Exceptionpublic static Map<String,PortletURL> getAddPortletURLs(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest, com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse, long groupId, long[] classNameIds, long[] classTypeIds, long[] allAssetCategoryIds, String[] allAssetTagNames, String redirect) throws Exception
Exception@Deprecated public static Map<String,PortletURL> getAddPortletURLs(com.liferay.portal.kernel.portlet.LiferayPortletRequest liferayPortletRequest, com.liferay.portal.kernel.portlet.LiferayPortletResponse liferayPortletResponse, long[] classNameIds, long[] classTypeIds, long[] allAssetCategoryIds, String[] allAssetTagNames, String redirect) throws Exception
getAddPortletURLs(LiferayPortletRequest,
LiferayPortletResponse, long, long[], long[], long[],
String[], String)Exceptionpublic static String getAddURLPopUp(long groupId,
long plid,
PortletURL addPortletURL,
String portletId,
boolean addDisplayPageParameter,
com.liferay.portal.kernel.model.Layout layout)
public static List<com.liferay.asset.kernel.model.AssetEntry> getAssetEntries(com.liferay.portal.kernel.search.Hits hits)
public static String getAssetKeywords(String className,
long classPK)
public static String getClassName(String className)
public static String getClassNameMessage(String className,
Locale locale)
public static String getDefaultAssetPublisherId(com.liferay.portal.kernel.model.Layout layout)
public static Set<String> getLayoutTagNames(javax.servlet.http.HttpServletRequest request)
public static boolean hasSubtype(String subtypeClassName,
Map<String,PortletURL> addPortletURLs)
public static boolean isDefaultAssetPublisher(com.liferay.portal.kernel.model.Layout layout,
String portletId,
String portletResource)
public static boolean isValidWord(String word)
public static com.liferay.portal.kernel.search.Hits search(javax.servlet.http.HttpServletRequest request,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
Exceptionpublic static com.liferay.portal.kernel.search.Hits search(com.liferay.portal.kernel.search.SearchContext searchContext,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
Exceptionpublic static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.asset.kernel.model.AssetEntry> searchAssetEntries(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
long[] assetCategoryIds,
String[] assetTagNames,
Map<String,Serializable> attributes,
long companyId,
String keywords,
com.liferay.portal.kernel.model.Layout layout,
Locale locale,
long scopeGroupId,
TimeZone timeZone,
long userId,
int start,
int end)
throws Exception
Exceptionpublic static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.asset.kernel.model.AssetEntry> searchAssetEntries(javax.servlet.http.HttpServletRequest request,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
Exceptionpublic static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.asset.kernel.model.AssetEntry> searchAssetEntries(com.liferay.portal.kernel.search.SearchContext searchContext,
com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
Exceptionpublic static String substituteCategoryPropertyVariables(long groupId,
long categoryId,
String s)
public static String toWord(String text)
protected static AssetSearcher getAssetSearcher(com.liferay.portal.kernel.search.SearchContext searchContext, com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery, int start, int end) throws Exception
Exceptionprotected static boolean getDDMFormFieldLocalizable(String sortField)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected static String getDDMFormFieldType(String sortField)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected static String getOrderByCol(String sortField,
String fieldType,
boolean fieldLocalizable,
int sortType,
Locale locale)
protected static String getOrderByCol(String sortField,
String fieldType,
int sortType,
Locale locale)
protected static com.liferay.portal.kernel.search.Sort getSort(String orderByType,
String sortField,
Locale locale)
throws Exception
Exceptionprotected static com.liferay.portal.kernel.search.Sort[] getSorts(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
Locale locale)
throws Exception
Exceptionprotected static int getSortType(String fieldType)