com.liferay.portlet.asset.util
Class AssetUtil
java.lang.Object
com.liferay.portlet.asset.util.AssetUtil
public class AssetUtil
- extends Object
|
Method Summary |
static Set<String> |
addLayoutTags(javax.servlet.http.HttpServletRequest request,
List<AssetTag> tags)
|
static void |
addPortletBreadcrumbEntries(long assetCategoryId,
javax.servlet.http.HttpServletRequest request,
PortletURL portletURL)
|
static String |
checkViewURL(AssetEntry assetEntry,
boolean viewInContext,
String viewURL,
String currentURL,
ThemeDisplay themeDisplay)
|
static long[] |
filterCategoryIds(PermissionChecker permissionChecker,
long[] categoryIds)
|
static List<AssetVocabulary> |
filterVocabularies(List<AssetVocabulary> vocabularies,
String className,
long classTypePK)
|
static long[] |
filterVocabularyIds(PermissionChecker permissionChecker,
long[] vocabularyIds)
|
static PortletURL |
getAddPortletURL(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
long groupId,
String className,
long classTypeId,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
|
static PortletURL |
getAddPortletURL(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
String className,
long classTypeId,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
Deprecated. As of 7.0.0, replaced by getAddPortletURL(LiferayPortletRequest,
LiferayPortletResponse, long, String, long, long[], String[],
String) |
static Map<String,PortletURL> |
getAddPortletURLs(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
long[] classNameIds,
long[] classTypeIds,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
Deprecated. As of 7.0.0, replaced by getAddPortletURLs(LiferayPortletRequest,
LiferayPortletResponse, long, long[], long[], long[],
String[], String) |
static Map<String,PortletURL> |
getAddPortletURLs(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
long groupId,
long[] classNameIds,
long[] classTypeIds,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
|
static List<AssetEntry> |
getAssetEntries(Hits hits)
|
static String |
getAssetKeywords(String className,
long classPK)
|
protected static AssetSearcher |
getAssetSearcher(SearchContext searchContext,
AssetEntryQuery assetEntryQuery,
int start,
int end)
|
protected static String |
getDDMFormFieldType(String sortField)
|
static String |
getDefaultAssetPublisherId(Layout layout)
|
static Set<String> |
getLayoutTagNames(javax.servlet.http.HttpServletRequest request)
|
protected static String |
getOrderByCol(String sortField,
String fieldType,
int sortType,
Locale locale)
|
protected static Sort |
getSort(String orderByType,
String sortField,
Locale locale)
|
protected static Sort[] |
getSorts(AssetEntryQuery assetEntryQuery,
Locale locale)
|
protected static int |
getSortType(String fieldType)
|
static boolean |
hasSubtype(String subtypeClassName,
Map<String,PortletURL> addPortletURLs)
|
static boolean |
isDefaultAssetPublisher(Layout layout,
String portletId,
String portletResource)
|
static boolean |
isValidWord(String word)
|
static Hits |
search(javax.servlet.http.HttpServletRequest request,
AssetEntryQuery assetEntryQuery,
int start,
int end)
|
static Hits |
search(SearchContext searchContext,
AssetEntryQuery assetEntryQuery,
int start,
int end)
|
static BaseModelSearchResult<AssetEntry> |
searchAssetEntries(AssetEntryQuery assetEntryQuery,
long[] assetCategoryIds,
String[] assetTagNames,
Map<String,Serializable> attributes,
long companyId,
String keywords,
Layout layout,
Locale locale,
long scopeGroupId,
TimeZone timeZone,
long userId,
int start,
int end)
|
static BaseModelSearchResult<AssetEntry> |
searchAssetEntries(javax.servlet.http.HttpServletRequest request,
AssetEntryQuery assetEntryQuery,
int start,
int end)
|
static BaseModelSearchResult<AssetEntry> |
searchAssetEntries(SearchContext searchContext,
AssetEntryQuery assetEntryQuery,
int start,
int end)
|
static String |
substituteCategoryPropertyVariables(long groupId,
long categoryId,
String s)
|
static String |
toWord(String text)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASSET_ENTRY_ABSTRACT_LENGTH
public static final int ASSET_ENTRY_ABSTRACT_LENGTH
- See Also:
- Constant Field Values
CLASSNAME_SEPARATOR
public static final String CLASSNAME_SEPARATOR
- See Also:
- Constant Field Values
INVALID_CHARACTERS
public static final char[] INVALID_CHARACTERS
AssetUtil
public AssetUtil()
addLayoutTags
public static Set<String> addLayoutTags(javax.servlet.http.HttpServletRequest request,
List<AssetTag> tags)
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(long assetCategoryId,
javax.servlet.http.HttpServletRequest request,
PortletURL portletURL)
throws Exception
- Throws:
Exception
checkViewURL
public static String checkViewURL(AssetEntry assetEntry,
boolean viewInContext,
String viewURL,
String currentURL,
ThemeDisplay themeDisplay)
filterCategoryIds
public static long[] filterCategoryIds(PermissionChecker permissionChecker,
long[] categoryIds)
throws PortalException
- Throws:
PortalException
filterVocabularies
public static List<AssetVocabulary> filterVocabularies(List<AssetVocabulary> vocabularies,
String className,
long classTypePK)
filterVocabularyIds
public static long[] filterVocabularyIds(PermissionChecker permissionChecker,
long[] vocabularyIds)
throws PortalException
- Throws:
PortalException
getAddPortletURL
public static PortletURL getAddPortletURL(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
long groupId,
String className,
long classTypeId,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
throws Exception
- Throws:
Exception
getAddPortletURL
@Deprecated
public static PortletURL getAddPortletURL(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
String className,
long classTypeId,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
throws Exception
- Deprecated. As of 7.0.0, replaced by
getAddPortletURL(LiferayPortletRequest,
LiferayPortletResponse, long, String, long, long[], String[],
String)
- Throws:
Exception
getAddPortletURLs
public static Map<String,PortletURL> getAddPortletURLs(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
long groupId,
long[] classNameIds,
long[] classTypeIds,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
throws Exception
- Throws:
Exception
getAddPortletURLs
@Deprecated
public static Map<String,PortletURL> getAddPortletURLs(LiferayPortletRequest liferayPortletRequest,
LiferayPortletResponse liferayPortletResponse,
long[] classNameIds,
long[] classTypeIds,
long[] allAssetCategoryIds,
String[] allAssetTagNames,
String redirect)
throws Exception
- Deprecated. As of 7.0.0, replaced by
getAddPortletURLs(LiferayPortletRequest,
LiferayPortletResponse, long, long[], long[], long[],
String[], String)
- Throws:
Exception
getAssetEntries
public static List<AssetEntry> getAssetEntries(Hits hits)
getAssetKeywords
public static String getAssetKeywords(String className,
long classPK)
getDefaultAssetPublisherId
public static String getDefaultAssetPublisherId(Layout layout)
getLayoutTagNames
public static Set<String> getLayoutTagNames(javax.servlet.http.HttpServletRequest request)
hasSubtype
public static boolean hasSubtype(String subtypeClassName,
Map<String,PortletURL> addPortletURLs)
isDefaultAssetPublisher
public static boolean isDefaultAssetPublisher(Layout layout,
String portletId,
String portletResource)
isValidWord
public static boolean isValidWord(String word)
search
public static Hits search(javax.servlet.http.HttpServletRequest request,
AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
- Throws:
Exception
search
public static Hits search(SearchContext searchContext,
AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
- Throws:
Exception
searchAssetEntries
public static BaseModelSearchResult<AssetEntry> searchAssetEntries(AssetEntryQuery assetEntryQuery,
long[] assetCategoryIds,
String[] assetTagNames,
Map<String,Serializable> attributes,
long companyId,
String keywords,
Layout layout,
Locale locale,
long scopeGroupId,
TimeZone timeZone,
long userId,
int start,
int end)
throws Exception
- Throws:
Exception
searchAssetEntries
public static BaseModelSearchResult<AssetEntry> searchAssetEntries(javax.servlet.http.HttpServletRequest request,
AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
- Throws:
Exception
searchAssetEntries
public static BaseModelSearchResult<AssetEntry> searchAssetEntries(SearchContext searchContext,
AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
- Throws:
Exception
substituteCategoryPropertyVariables
public static String substituteCategoryPropertyVariables(long groupId,
long categoryId,
String s)
toWord
public static String toWord(String text)
getAssetSearcher
protected static AssetSearcher getAssetSearcher(SearchContext searchContext,
AssetEntryQuery assetEntryQuery,
int start,
int end)
throws Exception
- Throws:
Exception
getDDMFormFieldType
protected static String getDDMFormFieldType(String sortField)
throws PortalException
- Throws:
PortalException
getOrderByCol
protected static String getOrderByCol(String sortField,
String fieldType,
int sortType,
Locale locale)
getSort
protected static Sort getSort(String orderByType,
String sortField,
Locale locale)
throws Exception
- Throws:
Exception
getSorts
protected static Sort[] getSorts(AssetEntryQuery assetEntryQuery,
Locale locale)
throws Exception
- Throws:
Exception
getSortType
protected static int getSortType(String fieldType)