--- /dev/null
+/**
+ * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
+package com.pentila.entSavoie.service;
+
+import com.liferay.portal.service.ServiceWrapper;
+
+/**
+ * <p>
+ * This class is a wrapper for {@link DiskUsageGroupLocalService}.
+ * </p>
+ *
+ * @author Alexandre Lefevre
+ * @see DiskUsageGroupLocalService
+ * @generated
+ */
+public class DiskUsageGroupLocalServiceWrapper
+ implements DiskUsageGroupLocalService,
+ ServiceWrapper<DiskUsageGroupLocalService> {
+ public DiskUsageGroupLocalServiceWrapper(
+ DiskUsageGroupLocalService diskUsageGroupLocalService) {
+ _diskUsageGroupLocalService = diskUsageGroupLocalService;
+ }
+
+ /**
+ * Adds the disk usage group to the database. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageGroup the disk usage group
+ * @return the disk usage group that was added
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageGroup addDiskUsageGroup(
+ com.pentila.entSavoie.model.DiskUsageGroup diskUsageGroup)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.addDiskUsageGroup(diskUsageGroup);
+ }
+
+ /**
+ * Creates a new disk usage group with the primary key. Does not add the disk usage group to the database.
+ *
+ * @param idDiskUsageGroup the primary key for the new disk usage group
+ * @return the new disk usage group
+ */
+ public com.pentila.entSavoie.model.DiskUsageGroup createDiskUsageGroup(
+ long idDiskUsageGroup) {
+ return _diskUsageGroupLocalService.createDiskUsageGroup(idDiskUsageGroup);
+ }
+
+ /**
+ * Deletes the disk usage group with the primary key from the database. Also notifies the appropriate model listeners.
+ *
+ * @param idDiskUsageGroup the primary key of the disk usage group
+ * @return the disk usage group that was removed
+ * @throws PortalException if a disk usage group with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageGroup deleteDiskUsageGroup(
+ long idDiskUsageGroup)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.deleteDiskUsageGroup(idDiskUsageGroup);
+ }
+
+ /**
+ * Deletes the disk usage group from the database. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageGroup the disk usage group
+ * @return the disk usage group that was removed
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageGroup deleteDiskUsageGroup(
+ com.pentila.entSavoie.model.DiskUsageGroup diskUsageGroup)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.deleteDiskUsageGroup(diskUsageGroup);
+ }
+
+ public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
+ return _diskUsageGroupLocalService.dynamicQuery();
+ }
+
+ /**
+ * Performs a dynamic query on the database and returns the matching rows.
+ *
+ * @param dynamicQuery the dynamic query
+ * @return the matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @SuppressWarnings("rawtypes")
+ public java.util.List dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.dynamicQuery(dynamicQuery);
+ }
+
+ /**
+ * Performs a dynamic query on the database and returns a range of the matching rows.
+ *
+ * <p>
+ * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
+ * </p>
+ *
+ * @param dynamicQuery the dynamic query
+ * @param start the lower bound of the range of model instances
+ * @param end the upper bound of the range of model instances (not inclusive)
+ * @return the range of matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @SuppressWarnings("rawtypes")
+ public java.util.List dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
+ int end) throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.dynamicQuery(dynamicQuery, start, end);
+ }
+
+ /**
+ * Performs a dynamic query on the database and returns an ordered range of the matching rows.
+ *
+ * <p>
+ * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
+ * </p>
+ *
+ * @param dynamicQuery the dynamic query
+ * @param start the lower bound of the range of model instances
+ * @param end the upper bound of the range of model instances (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
+ * @return the ordered range of matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @SuppressWarnings("rawtypes")
+ public java.util.List dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
+ int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.dynamicQuery(dynamicQuery, start,
+ end, orderByComparator);
+ }
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ public long dynamicQueryCount(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.dynamicQueryCount(dynamicQuery);
+ }
+
+ public com.pentila.entSavoie.model.DiskUsageGroup fetchDiskUsageGroup(
+ long idDiskUsageGroup)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.fetchDiskUsageGroup(idDiskUsageGroup);
+ }
+
+ /**
+ * Returns the disk usage group with the primary key.
+ *
+ * @param idDiskUsageGroup the primary key of the disk usage group
+ * @return the disk usage group
+ * @throws PortalException if a disk usage group with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageGroup getDiskUsageGroup(
+ long idDiskUsageGroup)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.getDiskUsageGroup(idDiskUsageGroup);
+ }
+
+ public com.liferay.portal.model.PersistedModel getPersistedModel(
+ java.io.Serializable primaryKeyObj)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.getPersistedModel(primaryKeyObj);
+ }
+
+ /**
+ * Returns a range of all the disk usage groups.
+ *
+ * <p>
+ * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
+ * </p>
+ *
+ * @param start the lower bound of the range of disk usage groups
+ * @param end the upper bound of the range of disk usage groups (not inclusive)
+ * @return the range of disk usage groups
+ * @throws SystemException if a system exception occurred
+ */
+ public java.util.List<com.pentila.entSavoie.model.DiskUsageGroup> getDiskUsageGroups(
+ int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.getDiskUsageGroups(start, end);
+ }
+
+ /**
+ * Returns the number of disk usage groups.
+ *
+ * @return the number of disk usage groups
+ * @throws SystemException if a system exception occurred
+ */
+ public int getDiskUsageGroupsCount()
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.getDiskUsageGroupsCount();
+ }
+
+ /**
+ * Updates the disk usage group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageGroup the disk usage group
+ * @return the disk usage group that was updated
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageGroup updateDiskUsageGroup(
+ com.pentila.entSavoie.model.DiskUsageGroup diskUsageGroup)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.updateDiskUsageGroup(diskUsageGroup);
+ }
+
+ /**
+ * Updates the disk usage group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageGroup the disk usage group
+ * @param merge whether to merge the disk usage group with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
+ * @return the disk usage group that was updated
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageGroup updateDiskUsageGroup(
+ com.pentila.entSavoie.model.DiskUsageGroup diskUsageGroup, boolean merge)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.updateDiskUsageGroup(diskUsageGroup,
+ merge);
+ }
+
+ /**
+ * Returns the Spring bean ID for this bean.
+ *
+ * @return the Spring bean ID for this bean
+ */
+ public java.lang.String getBeanIdentifier() {
+ return _diskUsageGroupLocalService.getBeanIdentifier();
+ }
+
+ /**
+ * Sets the Spring bean ID for this bean.
+ *
+ * @param beanIdentifier the Spring bean ID for this bean
+ */
+ public void setBeanIdentifier(java.lang.String beanIdentifier) {
+ _diskUsageGroupLocalService.setBeanIdentifier(beanIdentifier);
+ }
+
+ public java.lang.Object invokeMethod(java.lang.String name,
+ java.lang.String[] parameterTypes, java.lang.Object[] arguments)
+ throws java.lang.Throwable {
+ return _diskUsageGroupLocalService.invokeMethod(name, parameterTypes,
+ arguments);
+ }
+
+ /**
+ * Get the institutionnal groups Quota for user in an etab
+ *
+ * @param pOrganization the object representing the organization
+ * @return Map with group id as key and Disk usage in MB as value
+ * @throws PortalException
+ * @throws SystemException
+ */
+ public java.util.HashMap<java.lang.Long, java.lang.Long> getGroupsQuotasOnEtab(
+ java.lang.Long pOrganizationId)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.getGroupsQuotasOnEtab(pOrganizationId);
+ }
+
+ /**
+ * Get the groups Quota for user in an etab
+ *
+ * @param pOrganization the object representing the organization
+ * @return Map with community (local group) id as key and Disk usage in MB as value
+ * @throws PortalException
+ * @throws SystemException
+ */
+ public java.util.HashMap<java.lang.Long, java.lang.Long> getCommunityQuotasOnEtab(
+ java.lang.Long pOrganizationId)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.getCommunityQuotasOnEtab(pOrganizationId);
+ }
+
+ /**
+ * This method add the size of DLFileEntry to Disk usage of the group in parameter.
+ *
+ * @param pFile DLFileEntry which has uploaded by user.
+ * @param pGroupId The group which uploaded file
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean addDiskUsage(
+ com.liferay.portlet.documentlibrary.model.DLFileEntry pFile,
+ long pGroupId, java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.addDiskUsage(pFile, pGroupId,
+ pPortletId);
+ }
+
+ /**
+ * This method add the size of FileEntry to Disk usage of the group in parameter.
+ *
+ * @param pFile DLFileEntry which has uploaded by group.
+ * @param pGroupId The group which uploaded file
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean addDiskUsage(
+ com.liferay.portal.kernel.repository.model.FileEntry pFile,
+ long pGroupId, java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.addDiskUsage(pFile, pGroupId,
+ pPortletId);
+ }
+
+ /**
+ * This method add the size of Folder and sub files to Disk usage of the group in parameter.
+ *
+ * @param pFolder Folder which has uploaded by group.
+ * @param pGroupId The group which uploaded file
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean addDiskUsage(
+ com.liferay.portal.kernel.repository.model.Folder pFolder,
+ long pGroupId, java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.addDiskUsage(pFolder, pGroupId,
+ pPortletId);
+ }
+
+ /**
+ * This method add the size set in parameters to Disk usage of the group in parameter.
+ *
+ * @param pSize size to add from disk usage
+ * @param pGroupId The group which uploaded file
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean addDiskUsage(long pSize, long pGroupId,
+ java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.addDiskUsage(pSize, pGroupId,
+ pPortletId);
+ }
+
+ /**
+ * This method take the size of file and add it to the portlet disk usage and total disk usage.
+ * Can't call this method directly
+ *
+ * @throws SystemException
+ */
+ public boolean addDiskUsagePrivate(long pFileSize, long pGroupId,
+ java.lang.String pPortletId)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageGroupLocalService.addDiskUsagePrivate(pFileSize,
+ pGroupId, pPortletId);
+ }
+
+ /**
+ * This method substract the size of DLFileEntry to Disk usage of the user in parameter.
+ *
+ * @param pFile DLFileEntry removed by user.
+ * @param pGroupId The user which uploaded file
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean substractDiskUsage(
+ com.liferay.portlet.documentlibrary.model.DLFileEntry pFile,
+ long pGroupId, java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.substractDiskUsage(pFile, pGroupId,
+ pPortletId);
+ }
+
+ /**
+ * This method substract the size of FileEntry to Disk usage of the group in parameter.
+ *
+ * @param pFile DLFileEntry removed by group.
+ * @param pGroupId The user which uploaded file
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean substractDiskUsage(
+ com.liferay.portal.kernel.repository.model.FileEntry pFile,
+ long pGroupId, java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.substractDiskUsage(pFile, pGroupId,
+ pPortletId);
+ }
+
+ /**
+ * This method substract the size of Folder and subfile to Disk usage of the group in parameter.
+ *
+ * @param pFolder Folder removed by group.
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean substractDiskUsage(
+ com.liferay.portal.kernel.repository.model.Folder pFolder,
+ long pGroupId, java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.substractDiskUsage(pFolder,
+ pGroupId, pPortletId);
+ }
+
+ /**
+ * This method substract the size in parameter to Disk usage of the group in parameter.
+ *
+ * @param pSize size to remove from disk usage
+ * @param pPortletId A string representing the Portlet ID, this could be found on request : PortalUtil.getPortletId(request)
+ * @return true if this works, false otherwise
+ * @throws SystemException
+ */
+ public boolean substractDiskUsage(long pSize, long pGroupId,
+ java.lang.String pPortletId) {
+ return _diskUsageGroupLocalService.substractDiskUsage(pSize, pGroupId,
+ pPortletId);
+ }
+
+ /**
+ * This method update all the docSize for groups for a company
+ *
+ * @param pCompanyId long which represent the company in database
+ * @return boolean true if no major exception, false otherwise
+ */
+ public boolean updateAllGroupCartableDiskUsageForCompany(long pCompanyId) {
+ return _diskUsageGroupLocalService.updateAllGroupCartableDiskUsageForCompany(pCompanyId);
+ }
+
+ /**
+ * @deprecated Renamed to {@link #getWrappedService}
+ */
+ public DiskUsageGroupLocalService getWrappedDiskUsageGroupLocalService() {
+ return _diskUsageGroupLocalService;
+ }
+
+ /**
+ * @deprecated Renamed to {@link #setWrappedService}
+ */
+ public void setWrappedDiskUsageGroupLocalService(
+ DiskUsageGroupLocalService diskUsageGroupLocalService) {
+ _diskUsageGroupLocalService = diskUsageGroupLocalService;
+ }
+
+ public DiskUsageGroupLocalService getWrappedService() {
+ return _diskUsageGroupLocalService;
+ }
+
+ public void setWrappedService(
+ DiskUsageGroupLocalService diskUsageGroupLocalService) {
+ _diskUsageGroupLocalService = diskUsageGroupLocalService;
+ }
+
+ private DiskUsageGroupLocalService _diskUsageGroupLocalService;
+}
\ No newline at end of file