Liferay 7.0-ga1 portal-impl

com.liferay.portlet.asset.util
Class AssetUtil

java.lang.Object
  extended by com.liferay.portlet.asset.util.AssetUtil

public class AssetUtil
extends Object


Field Summary
static int ASSET_ENTRY_ABSTRACT_LENGTH
           
static String CLASSNAME_SEPARATOR
           
static char[] INVALID_CHARACTERS
           
 
Constructor Summary
AssetUtil()
           
 
Method Summary
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 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 7.0.0, 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 7.0.0, 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 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, 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

AssetUtil

public AssetUtil()
Method Detail

addLayoutTags

public static Set<String> addLayoutTags(javax.servlet.http.HttpServletRequest request,
                                        List<com.liferay.asset.kernel.model.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(com.liferay.asset.kernel.model.AssetEntry assetEntry,
                                  boolean viewInContext,
                                  String viewURL,
                                  String currentURL,
                                  com.liferay.portal.kernel.theme.ThemeDisplay themeDisplay)

filterCategoryIds

public static long[] filterCategoryIds(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
                                       long[] categoryIds)
                                throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

filterVocabularies

public static List<com.liferay.asset.kernel.model.AssetVocabulary> filterVocabularies(List<com.liferay.asset.kernel.model.AssetVocabulary> vocabularies,
                                                                                      String className,
                                                                                      long classTypePK)

filterVocabularyIds

public static long[] filterVocabularyIds(com.liferay.portal.kernel.security.permission.PermissionChecker permissionChecker,
                                         long[] vocabularyIds)
                                  throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

getAddPortletURL

public 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
Throws:
Exception

getAddPortletURL

@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
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(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
Throws:
Exception

getAddPortletURLs

@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
Deprecated. As of 7.0.0, replaced by getAddPortletURLs(LiferayPortletRequest, LiferayPortletResponse, long, long[], long[], long[], String[], String)

Throws:
Exception

getAddURLPopUp

public static String getAddURLPopUp(long groupId,
                                    long plid,
                                    PortletURL addPortletURL,
                                    String portletId,
                                    boolean addDisplayPageParameter,
                                    com.liferay.portal.kernel.model.Layout layout)

getAssetEntries

public static List<com.liferay.asset.kernel.model.AssetEntry> getAssetEntries(com.liferay.portal.kernel.search.Hits hits)

getAssetKeywords

public static String getAssetKeywords(String className,
                                      long classPK)

getClassName

public static String getClassName(String className)

getClassNameMessage

public static String getClassNameMessage(String className,
                                         Locale locale)

getDefaultAssetPublisherId

public static String getDefaultAssetPublisherId(com.liferay.portal.kernel.model.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(com.liferay.portal.kernel.model.Layout layout,
                                              String portletId,
                                              String portletResource)

isValidWord

public static boolean isValidWord(String word)

search

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
Throws:
Exception

search

public 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
Throws:
Exception

searchAssetEntries

public 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
Throws:
Exception

searchAssetEntries

public 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
Throws:
Exception

searchAssetEntries

public 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
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(com.liferay.portal.kernel.search.SearchContext searchContext,
                                                com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
                                                int start,
                                                int end)
                                         throws Exception
Throws:
Exception

getDDMFormFieldType

protected static String getDDMFormFieldType(String sortField)
                                     throws com.liferay.portal.kernel.exception.PortalException
Throws:
com.liferay.portal.kernel.exception.PortalException

getOrderByCol

protected static String getOrderByCol(String sortField,
                                      String fieldType,
                                      int sortType,
                                      Locale locale)

getSort

protected static com.liferay.portal.kernel.search.Sort getSort(String orderByType,
                                                               String sortField,
                                                               Locale locale)
                                                        throws Exception
Throws:
Exception

getSorts

protected static com.liferay.portal.kernel.search.Sort[] getSorts(com.liferay.asset.kernel.service.persistence.AssetEntryQuery assetEntryQuery,
                                                                  Locale locale)
                                                           throws Exception
Throws:
Exception

getSortType

protected static int getSortType(String fieldType)

Liferay 7.0-ga1 portal-impl