Liferay 7.0-ce-m3

com.liferay.portlet.assetpublisher.util
Class AssetPublisherImpl

java.lang.Object
  extended by com.liferay.portlet.assetpublisher.util.AssetPublisherImpl
All Implemented Interfaces:
AssetPublisher

public class AssetPublisherImpl
extends Object
implements AssetPublisher


Field Summary
 
Fields inherited from interface com.liferay.portlet.assetpublisher.util.AssetPublisher
SCOPE_ID_CHILD_GROUP_PREFIX, SCOPE_ID_GROUP_PREFIX, SCOPE_ID_LAYOUT_PREFIX, SCOPE_ID_LAYOUT_UUID_PREFIX, SCOPE_ID_PARENT_GROUP_PREFIX
 
Constructor Summary
AssetPublisherImpl()
           
 
Method Summary
 void addAndStoreSelection(PortletRequest portletRequest, String className, long classPK, int assetEntryOrder)
           
 void addRecentFolderId(PortletRequest portletRequest, String className, long classPK)
           
 void addSelection(PortletRequest portletRequest, PortletPreferences portletPreferences, String portletId)
           
 void addSelection(ThemeDisplay themeDisplay, PortletPreferences portletPreferences, String portletId, long assetEntryId, int assetEntryOrder, String assetEntryType)
           
 void addUserAttributes(User user, String[] customUserAttributeNames, AssetEntryQuery assetEntryQuery)
           
 void checkAssetEntries()
           
 long[] getAssetCategoryIds(PortletPreferences portletPreferences)
           
 List<AssetEntry> getAssetEntries(long[] groupIds, long[] classNameIds, String keywords, String userName, String title, String description, boolean advancedSearch, boolean andOperator, int start, int end, String orderByCol1, String orderByCol2, String orderByType1, String orderByType2)
           
 List<AssetEntry> getAssetEntries(PortletPreferences portletPreferences, Layout layout, long scopeGroupId, int max, boolean checkPermission)
           
 List<AssetEntry> getAssetEntries(PortletRequest portletRequest, PortletPreferences portletPreferences, PermissionChecker permissionChecker, long[] groupIds, boolean deleteMissingAssetEntries, boolean checkPermission)
           
 List<AssetEntry> getAssetEntries(PortletRequest portletRequest, PortletPreferences portletPreferences, PermissionChecker permissionChecker, long[] groupIds, long[] allCategoryIds, String[] allTagNames, boolean deleteMissingAssetEntries, boolean checkPermission)
           
 List<AssetEntry> getAssetEntries(PortletRequest portletRequest, PortletPreferences portletPreferences, PermissionChecker permissionChecker, long[] groupIds, long[] allCategoryIds, String[] assetEntryXmls, String[] allTagNames, boolean deleteMissingAssetEntries, boolean checkPermission)
          Deprecated. As of 7.0.0, replaced by getAssetEntries(PortletRequest, PortletPreferences, PermissionChecker, long[], long[], String[], boolean , boolean)
 List<AssetEntry> getAssetEntries(PortletRequest portletRequest, PortletPreferences portletPreferences, PermissionChecker permissionChecker, long[] groupIds, String[] assetEntryXmls, boolean deleteMissingAssetEntries, boolean checkPermission)
          Deprecated. As of 7.0.0, replaced by getAssetEntries(PortletRequest, PortletPreferences, PermissionChecker, long[], boolean, boolean)
 int getAssetEntriesCount(long[] groupIds, long[] classNameIds, String keywords, String userName, String title, String description, boolean advancedSearch, boolean andOperator, int start, int end)
           
protected  AssetEntryQuery getAssetEntryQuery(long[] groupIds, long[] classNameIds, String keywords, String userName, String title, String description, boolean advancedSearch, boolean andOperator, int start, int end, String orderByCol1, String orderByCol2, String orderByType1, String orderByType2)
           
 AssetEntryQuery getAssetEntryQuery(PortletPreferences portletPreferences, long[] scopeGroupIds)
          Deprecated. As of 7.0.0, replaced by getAssetEntryQuery(PortletPreferences, long[], long[], String[])
 AssetEntryQuery getAssetEntryQuery(PortletPreferences portletPreferences, long[] scopeGroupIds, long[] overrideAllAssetCategoryIds, String[] overrideAllAssetTagNames)
           
 String[] getAssetTagNames(PortletPreferences portletPreferences)
           
 String[] getAssetTagNames(PortletPreferences portletPreferences, long scopeGroupId)
          Deprecated. As of 7.0.0, replaced by getAssetTagNames(PortletPreferences)
 String getClassName(AssetRendererFactory assetRendererFactory)
           
 long[] getClassNameIds(PortletPreferences portletPreferences, long[] availableClassNameIds)
           
 Long[] getClassTypeIds(PortletPreferences portletPreferences, String className, List<ClassType> availableClassTypes)
           
 Long[] getClassTypeIds(PortletPreferences portletPreferences, String className, Long[] availableClassTypeIds)
           
 Map<Locale,String> getEmailAssetEntryAddedBodyMap(PortletPreferences portletPreferences)
           
 boolean getEmailAssetEntryAddedEnabled(PortletPreferences portletPreferences)
           
 Map<Locale,String> getEmailAssetEntryAddedSubjectMap(PortletPreferences portletPreferences)
           
 Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest, String emailFromAddress, String emailFromName)
           
 String getEmailFromAddress(PortletPreferences portletPreferences, long companyId)
           
 String getEmailFromName(PortletPreferences portletPreferences, long companyId)
           
 long getGroupIdFromScopeId(String scopeId, long siteGroupId, boolean privateLayout)
           
 long[] getGroupIds(PortletPreferences portletPreferences, long scopeGroupId, Layout layout)
           
 long getRecentFolderId(PortletRequest portletRequest, String className)
           
 String getScopeId(Group group, long scopeGroupId)
           
protected  long[] getSiteGroupIds(long[] groupIds)
           
 long getSubscriptionClassPK(long plid, String portletId)
           
 boolean isScopeIdSelectable(PermissionChecker permissionChecker, String scopeId, long companyGroupId, Layout layout)
           
 boolean isSubscribed(long companyId, long userId, long plid, String portletId)
           
 void notifySubscribers(PortletPreferences portletPreferences, long plid, String portletId, List<AssetEntry> assetEntries)
           
 void processAssetEntryQuery(User user, PortletPreferences portletPreferences, AssetEntryQuery assetEntryQuery)
           
 void registerAssetQueryProcessor(String assetQueryProcessorClassName, AssetEntryQueryProcessor assetQueryProcessor)
           
 void removeAndStoreSelection(List<String> assetEntryUuids, PortletPreferences portletPreferences)
           
 void removeRecentFolderId(PortletRequest portletRequest, String className, long classPK)
           
 void subscribe(PermissionChecker permissionChecker, long groupId, long plid, String portletId)
           
 void unregisterAssetQueryProcessor(String assetQueryProcessorClassName)
           
 void unsubscribe(PermissionChecker permissionChecker, long plid, String portletId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssetPublisherImpl

public AssetPublisherImpl()
Method Detail

addAndStoreSelection

public void addAndStoreSelection(PortletRequest portletRequest,
                                 String className,
                                 long classPK,
                                 int assetEntryOrder)
                          throws Exception
Specified by:
addAndStoreSelection in interface AssetPublisher
Throws:
Exception

addRecentFolderId

public void addRecentFolderId(PortletRequest portletRequest,
                              String className,
                              long classPK)
Specified by:
addRecentFolderId in interface AssetPublisher

addSelection

public void addSelection(PortletRequest portletRequest,
                         PortletPreferences portletPreferences,
                         String portletId)
                  throws Exception
Specified by:
addSelection in interface AssetPublisher
Throws:
Exception

addSelection

public void addSelection(ThemeDisplay themeDisplay,
                         PortletPreferences portletPreferences,
                         String portletId,
                         long assetEntryId,
                         int assetEntryOrder,
                         String assetEntryType)
                  throws Exception
Specified by:
addSelection in interface AssetPublisher
Throws:
Exception

addUserAttributes

public void addUserAttributes(User user,
                              String[] customUserAttributeNames,
                              AssetEntryQuery assetEntryQuery)
                       throws Exception
Specified by:
addUserAttributes in interface AssetPublisher
Throws:
Exception

checkAssetEntries

public void checkAssetEntries()
                       throws Exception
Specified by:
checkAssetEntries in interface AssetPublisher
Throws:
Exception

getAssetCategoryIds

public long[] getAssetCategoryIds(PortletPreferences portletPreferences)
                           throws Exception
Specified by:
getAssetCategoryIds in interface AssetPublisher
Throws:
Exception

getAssetEntries

public List<AssetEntry> getAssetEntries(long[] groupIds,
                                        long[] classNameIds,
                                        String keywords,
                                        String userName,
                                        String title,
                                        String description,
                                        boolean advancedSearch,
                                        boolean andOperator,
                                        int start,
                                        int end,
                                        String orderByCol1,
                                        String orderByCol2,
                                        String orderByType1,
                                        String orderByType2)
Specified by:
getAssetEntries in interface AssetPublisher

getAssetEntries

public List<AssetEntry> getAssetEntries(PortletPreferences portletPreferences,
                                        Layout layout,
                                        long scopeGroupId,
                                        int max,
                                        boolean checkPermission)
                                 throws PortalException
Specified by:
getAssetEntries in interface AssetPublisher
Throws:
PortalException

getAssetEntries

public List<AssetEntry> getAssetEntries(PortletRequest portletRequest,
                                        PortletPreferences portletPreferences,
                                        PermissionChecker permissionChecker,
                                        long[] groupIds,
                                        boolean deleteMissingAssetEntries,
                                        boolean checkPermission)
                                 throws Exception
Specified by:
getAssetEntries in interface AssetPublisher
Throws:
Exception

getAssetEntries

public List<AssetEntry> getAssetEntries(PortletRequest portletRequest,
                                        PortletPreferences portletPreferences,
                                        PermissionChecker permissionChecker,
                                        long[] groupIds,
                                        long[] allCategoryIds,
                                        String[] allTagNames,
                                        boolean deleteMissingAssetEntries,
                                        boolean checkPermission)
                                 throws Exception
Specified by:
getAssetEntries in interface AssetPublisher
Throws:
Exception

getAssetEntries

@Deprecated
public List<AssetEntry> getAssetEntries(PortletRequest portletRequest,
                                                   PortletPreferences portletPreferences,
                                                   PermissionChecker permissionChecker,
                                                   long[] groupIds,
                                                   long[] allCategoryIds,
                                                   String[] assetEntryXmls,
                                                   String[] allTagNames,
                                                   boolean deleteMissingAssetEntries,
                                                   boolean checkPermission)
                                 throws Exception
Deprecated. As of 7.0.0, replaced by getAssetEntries(PortletRequest, PortletPreferences, PermissionChecker, long[], long[], String[], boolean , boolean)

Specified by:
getAssetEntries in interface AssetPublisher
Throws:
Exception

getAssetEntries

@Deprecated
public List<AssetEntry> getAssetEntries(PortletRequest portletRequest,
                                                   PortletPreferences portletPreferences,
                                                   PermissionChecker permissionChecker,
                                                   long[] groupIds,
                                                   String[] assetEntryXmls,
                                                   boolean deleteMissingAssetEntries,
                                                   boolean checkPermission)
                                 throws Exception
Deprecated. As of 7.0.0, replaced by getAssetEntries(PortletRequest, PortletPreferences, PermissionChecker, long[], boolean, boolean)

Specified by:
getAssetEntries in interface AssetPublisher
Throws:
Exception

getAssetEntriesCount

public int getAssetEntriesCount(long[] groupIds,
                                long[] classNameIds,
                                String keywords,
                                String userName,
                                String title,
                                String description,
                                boolean advancedSearch,
                                boolean andOperator,
                                int start,
                                int end)
Specified by:
getAssetEntriesCount in interface AssetPublisher

getAssetEntryQuery

@Deprecated
public AssetEntryQuery getAssetEntryQuery(PortletPreferences portletPreferences,
                                                     long[] scopeGroupIds)
                                   throws PortalException
Deprecated. As of 7.0.0, replaced by getAssetEntryQuery(PortletPreferences, long[], long[], String[])

Specified by:
getAssetEntryQuery in interface AssetPublisher
Throws:
PortalException

getAssetEntryQuery

public AssetEntryQuery getAssetEntryQuery(PortletPreferences portletPreferences,
                                          long[] scopeGroupIds,
                                          long[] overrideAllAssetCategoryIds,
                                          String[] overrideAllAssetTagNames)
                                   throws PortalException
Specified by:
getAssetEntryQuery in interface AssetPublisher
Throws:
PortalException

getAssetTagNames

public String[] getAssetTagNames(PortletPreferences portletPreferences)
                          throws Exception
Specified by:
getAssetTagNames in interface AssetPublisher
Throws:
Exception

getAssetTagNames

@Deprecated
public String[] getAssetTagNames(PortletPreferences portletPreferences,
                                            long scopeGroupId)
                          throws Exception
Deprecated. As of 7.0.0, replaced by getAssetTagNames(PortletPreferences)

Specified by:
getAssetTagNames in interface AssetPublisher
Throws:
Exception

getClassName

public String getClassName(AssetRendererFactory assetRendererFactory)
Specified by:
getClassName in interface AssetPublisher

getClassNameIds

public long[] getClassNameIds(PortletPreferences portletPreferences,
                              long[] availableClassNameIds)
Specified by:
getClassNameIds in interface AssetPublisher

getClassTypeIds

public Long[] getClassTypeIds(PortletPreferences portletPreferences,
                              String className,
                              List<ClassType> availableClassTypes)
Specified by:
getClassTypeIds in interface AssetPublisher

getClassTypeIds

public Long[] getClassTypeIds(PortletPreferences portletPreferences,
                              String className,
                              Long[] availableClassTypeIds)
Specified by:
getClassTypeIds in interface AssetPublisher

getEmailAssetEntryAddedBodyMap

public Map<Locale,String> getEmailAssetEntryAddedBodyMap(PortletPreferences portletPreferences)
Specified by:
getEmailAssetEntryAddedBodyMap in interface AssetPublisher

getEmailAssetEntryAddedEnabled

public boolean getEmailAssetEntryAddedEnabled(PortletPreferences portletPreferences)
Specified by:
getEmailAssetEntryAddedEnabled in interface AssetPublisher

getEmailAssetEntryAddedSubjectMap

public Map<Locale,String> getEmailAssetEntryAddedSubjectMap(PortletPreferences portletPreferences)
Specified by:
getEmailAssetEntryAddedSubjectMap in interface AssetPublisher

getEmailDefinitionTerms

public Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest,
                                                  String emailFromAddress,
                                                  String emailFromName)
Specified by:
getEmailDefinitionTerms in interface AssetPublisher

getEmailFromAddress

public String getEmailFromAddress(PortletPreferences portletPreferences,
                                  long companyId)
Specified by:
getEmailFromAddress in interface AssetPublisher

getEmailFromName

public String getEmailFromName(PortletPreferences portletPreferences,
                               long companyId)
Specified by:
getEmailFromName in interface AssetPublisher

getGroupIdFromScopeId

public long getGroupIdFromScopeId(String scopeId,
                                  long siteGroupId,
                                  boolean privateLayout)
                           throws PortalException
Specified by:
getGroupIdFromScopeId in interface AssetPublisher
Throws:
PortalException

getGroupIds

public long[] getGroupIds(PortletPreferences portletPreferences,
                          long scopeGroupId,
                          Layout layout)
Specified by:
getGroupIds in interface AssetPublisher

getRecentFolderId

public long getRecentFolderId(PortletRequest portletRequest,
                              String className)
Specified by:
getRecentFolderId in interface AssetPublisher

getScopeId

public String getScopeId(Group group,
                         long scopeGroupId)
                  throws PortalException
Specified by:
getScopeId in interface AssetPublisher
Throws:
PortalException

getSubscriptionClassPK

public long getSubscriptionClassPK(long plid,
                                   String portletId)
                            throws PortalException
Specified by:
getSubscriptionClassPK in interface AssetPublisher
Throws:
PortalException

isScopeIdSelectable

public boolean isScopeIdSelectable(PermissionChecker permissionChecker,
                                   String scopeId,
                                   long companyGroupId,
                                   Layout layout)
                            throws PortalException
Specified by:
isScopeIdSelectable in interface AssetPublisher
Throws:
PortalException

isSubscribed

public boolean isSubscribed(long companyId,
                            long userId,
                            long plid,
                            String portletId)
                     throws PortalException
Specified by:
isSubscribed in interface AssetPublisher
Throws:
PortalException

notifySubscribers

public void notifySubscribers(PortletPreferences portletPreferences,
                              long plid,
                              String portletId,
                              List<AssetEntry> assetEntries)
                       throws PortalException
Specified by:
notifySubscribers in interface AssetPublisher
Throws:
PortalException

processAssetEntryQuery

public void processAssetEntryQuery(User user,
                                   PortletPreferences portletPreferences,
                                   AssetEntryQuery assetEntryQuery)
                            throws Exception
Specified by:
processAssetEntryQuery in interface AssetPublisher
Throws:
Exception

registerAssetQueryProcessor

public void registerAssetQueryProcessor(String assetQueryProcessorClassName,
                                        AssetEntryQueryProcessor assetQueryProcessor)
Specified by:
registerAssetQueryProcessor in interface AssetPublisher

removeAndStoreSelection

public void removeAndStoreSelection(List<String> assetEntryUuids,
                                    PortletPreferences portletPreferences)
                             throws Exception
Specified by:
removeAndStoreSelection in interface AssetPublisher
Throws:
Exception

removeRecentFolderId

public void removeRecentFolderId(PortletRequest portletRequest,
                                 String className,
                                 long classPK)
Specified by:
removeRecentFolderId in interface AssetPublisher

subscribe

public void subscribe(PermissionChecker permissionChecker,
                      long groupId,
                      long plid,
                      String portletId)
               throws PortalException
Specified by:
subscribe in interface AssetPublisher
Throws:
PortalException

unregisterAssetQueryProcessor

public void unregisterAssetQueryProcessor(String assetQueryProcessorClassName)
Specified by:
unregisterAssetQueryProcessor in interface AssetPublisher

unsubscribe

public void unsubscribe(PermissionChecker permissionChecker,
                        long plid,
                        String portletId)
                 throws PortalException
Specified by:
unsubscribe in interface AssetPublisher
Throws:
PortalException

getAssetEntryQuery

protected AssetEntryQuery getAssetEntryQuery(long[] groupIds,
                                             long[] classNameIds,
                                             String keywords,
                                             String userName,
                                             String title,
                                             String description,
                                             boolean advancedSearch,
                                             boolean andOperator,
                                             int start,
                                             int end,
                                             String orderByCol1,
                                             String orderByCol2,
                                             String orderByType1,
                                             String orderByType2)

getSiteGroupIds

protected long[] getSiteGroupIds(long[] groupIds)
                          throws PortalException
Throws:
PortalException

Liferay 7.0-ce-m3