com.liferay.portlet.assetpublisher.util
Class AssetPublisherUtil

java.lang.Object
  extended by com.liferay.portlet.assetpublisher.util.AssetPublisherUtil

public class AssetPublisherUtil
extends java.lang.Object

Author:
Eudaldo Alonso

Constructor Summary
AssetPublisherUtil()
           
 
Method Summary
static void addAndStoreSelection(javax.portlet.PortletRequest portletRequest, java.lang.String className, long classPK, int assetEntryOrder)
           
static void addRecentFolderId(javax.portlet.PortletRequest portletRequest, java.lang.String className, long classPK)
           
static void addSelection(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletPreferences portletPreferences, java.lang.String portletId)
           
static void addSelection(ThemeDisplay themeDisplay, javax.portlet.PortletPreferences portletPreferences, java.lang.String portletId, long assetEntryId, int assetEntryOrder, java.lang.String assetEntryType)
           
static void addUserAttributes(User user, java.lang.String[] customUserAttributeNames, AssetEntryQuery assetEntryQuery)
           
static void checkAssetEntries()
           
static java.util.List<AssetEntry> getAssetEntries(javax.portlet.PortletPreferences portletPreferences, Layout layout, long scopeGroupId, int max, boolean checkPermission)
           
static java.util.List<AssetEntry> getAssetEntries(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletPreferences portletPreferences, PermissionChecker permissionChecker, long[] groupIds, long[] assetCategoryIds, java.lang.String[] assetEntryXmls, java.lang.String[] assetTagNames, boolean deleteMissingAssetEntries, boolean checkPermission)
           
static java.util.List<AssetEntry> getAssetEntries(javax.portlet.PortletRequest portletRequest, javax.portlet.PortletPreferences portletPreferences, PermissionChecker permissionChecker, long[] groupIds, java.lang.String[] assetEntryXmls, boolean deleteMissingAssetEntries, boolean checkPermission)
           
static AssetEntryQuery getAssetEntryQuery(javax.portlet.PortletPreferences portletPreferences, long[] scopeGroupIds)
           
static AssetPublisher getAssetPublisher()
           
static java.lang.String[] getAssetTagNames(javax.portlet.PortletPreferences portletPreferences, long scopeGroupId)
           
static java.lang.String getClassName(AssetRendererFactory assetRendererFactory)
           
static long[] getClassNameIds(javax.portlet.PortletPreferences portletPreferences, long[] availableClassNameIds)
           
static java.lang.Long[] getClassTypeIds(javax.portlet.PortletPreferences portletPreferences, java.lang.String className, java.lang.Long[] availableClassTypeIds)
           
static java.util.Map<java.util.Locale,java.lang.String> getEmailAssetEntryAddedBodyMap(javax.portlet.PortletPreferences portletPreferences)
           
static boolean getEmailAssetEntryAddedEnabled(javax.portlet.PortletPreferences portletPreferences)
           
static java.util.Map<java.util.Locale,java.lang.String> getEmailAssetEntryAddedSubjectMap(javax.portlet.PortletPreferences portletPreferences)
           
static java.lang.String getEmailFromAddress(javax.portlet.PortletPreferences portletPreferences, long companyId)
           
static java.lang.String getEmailFromName(javax.portlet.PortletPreferences portletPreferences, long companyId)
           
static long getGroupIdFromScopeId(java.lang.String scopeId, long siteGroupId, boolean privateLayout)
           
static long[] getGroupIds(javax.portlet.PortletPreferences portletPreferences, long scopeGroupId, Layout layout)
           
static long getRecentFolderId(javax.portlet.PortletRequest portletRequest, java.lang.String className)
           
static java.lang.String getScopeId(Group group, long scopeGroupId)
           
static boolean isScopeIdSelectable(PermissionChecker permissionChecker, java.lang.String scopeId, long companyGroupId, Layout layout)
           
static boolean isSubscribed(long companyId, long userId, long plid, java.lang.String portletId)
           
static void notifySubscribers(javax.portlet.PortletPreferences portletPreferences, long plid, java.lang.String portletId, java.util.List<AssetEntry> assetEntries)
           
static void processAssetEntryQuery(User user, javax.portlet.PortletPreferences portletPreferences, AssetEntryQuery assetEntryQuery)
           
static void registerAssetQueryProcessor(java.lang.String name, AssetEntryQueryProcessor assetQueryProcessor)
           
static void removeAndStoreSelection(java.util.List<java.lang.String> assetEntryUuids, javax.portlet.PortletPreferences portletPreferences)
           
static void removeRecentFolderId(javax.portlet.PortletRequest portletRequest, java.lang.String className, long classPK)
           
 void setAssetPublisher(AssetPublisher assetPublisher)
           
static void subscribe(PermissionChecker permissionChecker, long groupId, long plid, java.lang.String portletId)
           
static void unregisterAssetQueryProcessor(java.lang.String assetQueryProcessorClassName)
           
static void unsubscribe(PermissionChecker permissionChecker, long plid, java.lang.String portletId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetPublisherUtil

public AssetPublisherUtil()
Method Detail

addAndStoreSelection

public static void addAndStoreSelection(javax.portlet.PortletRequest portletRequest,
                                        java.lang.String className,
                                        long classPK,
                                        int assetEntryOrder)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

addRecentFolderId

public static void addRecentFolderId(javax.portlet.PortletRequest portletRequest,
                                     java.lang.String className,
                                     long classPK)

addSelection

public static void addSelection(javax.portlet.PortletRequest portletRequest,
                                javax.portlet.PortletPreferences portletPreferences,
                                java.lang.String portletId)
                         throws java.lang.Exception
Throws:
java.lang.Exception

addSelection

public static void addSelection(ThemeDisplay themeDisplay,
                                javax.portlet.PortletPreferences portletPreferences,
                                java.lang.String portletId,
                                long assetEntryId,
                                int assetEntryOrder,
                                java.lang.String assetEntryType)
                         throws java.lang.Exception
Throws:
java.lang.Exception

addUserAttributes

public static void addUserAttributes(User user,
                                     java.lang.String[] customUserAttributeNames,
                                     AssetEntryQuery assetEntryQuery)
                              throws java.lang.Exception
Throws:
java.lang.Exception

checkAssetEntries

public static void checkAssetEntries()
                              throws java.lang.Exception
Throws:
java.lang.Exception

getAssetEntries

public static java.util.List<AssetEntry> getAssetEntries(javax.portlet.PortletPreferences portletPreferences,
                                                         Layout layout,
                                                         long scopeGroupId,
                                                         int max,
                                                         boolean checkPermission)
                                                  throws PortalException,
                                                         SystemException
Throws:
PortalException
SystemException

getAssetEntries

public static java.util.List<AssetEntry> getAssetEntries(javax.portlet.PortletRequest portletRequest,
                                                         javax.portlet.PortletPreferences portletPreferences,
                                                         PermissionChecker permissionChecker,
                                                         long[] groupIds,
                                                         long[] assetCategoryIds,
                                                         java.lang.String[] assetEntryXmls,
                                                         java.lang.String[] assetTagNames,
                                                         boolean deleteMissingAssetEntries,
                                                         boolean checkPermission)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getAssetEntries

public static java.util.List<AssetEntry> getAssetEntries(javax.portlet.PortletRequest portletRequest,
                                                         javax.portlet.PortletPreferences portletPreferences,
                                                         PermissionChecker permissionChecker,
                                                         long[] groupIds,
                                                         java.lang.String[] assetEntryXmls,
                                                         boolean deleteMissingAssetEntries,
                                                         boolean checkPermission)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

getAssetEntryQuery

public static AssetEntryQuery getAssetEntryQuery(javax.portlet.PortletPreferences portletPreferences,
                                                 long[] scopeGroupIds)
                                          throws PortalException,
                                                 SystemException
Throws:
PortalException
SystemException

getAssetPublisher

public static AssetPublisher getAssetPublisher()

getAssetTagNames

public static java.lang.String[] getAssetTagNames(javax.portlet.PortletPreferences portletPreferences,
                                                  long scopeGroupId)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

getClassName

public static java.lang.String getClassName(AssetRendererFactory assetRendererFactory)

getClassNameIds

public static long[] getClassNameIds(javax.portlet.PortletPreferences portletPreferences,
                                     long[] availableClassNameIds)

getClassTypeIds

public static java.lang.Long[] getClassTypeIds(javax.portlet.PortletPreferences portletPreferences,
                                               java.lang.String className,
                                               java.lang.Long[] availableClassTypeIds)

getEmailAssetEntryAddedBodyMap

public static java.util.Map<java.util.Locale,java.lang.String> getEmailAssetEntryAddedBodyMap(javax.portlet.PortletPreferences portletPreferences)

getEmailAssetEntryAddedEnabled

public static boolean getEmailAssetEntryAddedEnabled(javax.portlet.PortletPreferences portletPreferences)

getEmailAssetEntryAddedSubjectMap

public static java.util.Map<java.util.Locale,java.lang.String> getEmailAssetEntryAddedSubjectMap(javax.portlet.PortletPreferences portletPreferences)

getEmailFromAddress

public static java.lang.String getEmailFromAddress(javax.portlet.PortletPreferences portletPreferences,
                                                   long companyId)
                                            throws SystemException
Throws:
SystemException

getEmailFromName

public static java.lang.String getEmailFromName(javax.portlet.PortletPreferences portletPreferences,
                                                long companyId)
                                         throws SystemException
Throws:
SystemException

getGroupIdFromScopeId

public static long getGroupIdFromScopeId(java.lang.String scopeId,
                                         long siteGroupId,
                                         boolean privateLayout)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

getGroupIds

public static long[] getGroupIds(javax.portlet.PortletPreferences portletPreferences,
                                 long scopeGroupId,
                                 Layout layout)

getRecentFolderId

public static long getRecentFolderId(javax.portlet.PortletRequest portletRequest,
                                     java.lang.String className)

getScopeId

public static java.lang.String getScopeId(Group group,
                                          long scopeGroupId)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

isScopeIdSelectable

public static boolean isScopeIdSelectable(PermissionChecker permissionChecker,
                                          java.lang.String scopeId,
                                          long companyGroupId,
                                          Layout layout)
                                   throws PortalException,
                                          SystemException
Throws:
PortalException
SystemException

isSubscribed

public static boolean isSubscribed(long companyId,
                                   long userId,
                                   long plid,
                                   java.lang.String portletId)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

notifySubscribers

public static void notifySubscribers(javax.portlet.PortletPreferences portletPreferences,
                                     long plid,
                                     java.lang.String portletId,
                                     java.util.List<AssetEntry> assetEntries)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

processAssetEntryQuery

public static void processAssetEntryQuery(User user,
                                          javax.portlet.PortletPreferences portletPreferences,
                                          AssetEntryQuery assetEntryQuery)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

registerAssetQueryProcessor

public static void registerAssetQueryProcessor(java.lang.String name,
                                               AssetEntryQueryProcessor assetQueryProcessor)

removeAndStoreSelection

public static void removeAndStoreSelection(java.util.List<java.lang.String> assetEntryUuids,
                                           javax.portlet.PortletPreferences portletPreferences)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

removeRecentFolderId

public static void removeRecentFolderId(javax.portlet.PortletRequest portletRequest,
                                        java.lang.String className,
                                        long classPK)

subscribe

public static void subscribe(PermissionChecker permissionChecker,
                             long groupId,
                             long plid,
                             java.lang.String portletId)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

unregisterAssetQueryProcessor

public static void unregisterAssetQueryProcessor(java.lang.String assetQueryProcessorClassName)

unsubscribe

public static void unsubscribe(PermissionChecker permissionChecker,
                               long plid,
                               java.lang.String portletId)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

setAssetPublisher

public void setAssetPublisher(AssetPublisher assetPublisher)