--- /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 DiskUsageUserLocalService}.
+ * </p>
+ *
+ * @author Alexandre Lefevre
+ * @see DiskUsageUserLocalService
+ * @generated
+ */
+public class DiskUsageUserLocalServiceWrapper
+ implements DiskUsageUserLocalService,
+ ServiceWrapper<DiskUsageUserLocalService> {
+ public DiskUsageUserLocalServiceWrapper(
+ DiskUsageUserLocalService diskUsageUserLocalService) {
+ _diskUsageUserLocalService = diskUsageUserLocalService;
+ }
+
+ /**
+ * Adds the disk usage user to the database. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageUser the disk usage user
+ * @return the disk usage user that was added
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageUser addDiskUsageUser(
+ com.pentila.entSavoie.model.DiskUsageUser diskUsageUser)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.addDiskUsageUser(diskUsageUser);
+ }
+
+ /**
+ * Creates a new disk usage user with the primary key. Does not add the disk usage user to the database.
+ *
+ * @param idDiskUsageUser the primary key for the new disk usage user
+ * @return the new disk usage user
+ */
+ public com.pentila.entSavoie.model.DiskUsageUser createDiskUsageUser(
+ long idDiskUsageUser) {
+ return _diskUsageUserLocalService.createDiskUsageUser(idDiskUsageUser);
+ }
+
+ /**
+ * Deletes the disk usage user with the primary key from the database. Also notifies the appropriate model listeners.
+ *
+ * @param idDiskUsageUser the primary key of the disk usage user
+ * @return the disk usage user that was removed
+ * @throws PortalException if a disk usage user with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageUser deleteDiskUsageUser(
+ long idDiskUsageUser)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.deleteDiskUsageUser(idDiskUsageUser);
+ }
+
+ /**
+ * Deletes the disk usage user from the database. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageUser the disk usage user
+ * @return the disk usage user that was removed
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageUser deleteDiskUsageUser(
+ com.pentila.entSavoie.model.DiskUsageUser diskUsageUser)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.deleteDiskUsageUser(diskUsageUser);
+ }
+
+ public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
+ return _diskUsageUserLocalService.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 _diskUsageUserLocalService.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 _diskUsageUserLocalService.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 _diskUsageUserLocalService.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 _diskUsageUserLocalService.dynamicQueryCount(dynamicQuery);
+ }
+
+ public com.pentila.entSavoie.model.DiskUsageUser fetchDiskUsageUser(
+ long idDiskUsageUser)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.fetchDiskUsageUser(idDiskUsageUser);
+ }
+
+ /**
+ * Returns the disk usage user with the primary key.
+ *
+ * @param idDiskUsageUser the primary key of the disk usage user
+ * @return the disk usage user
+ * @throws PortalException if a disk usage user with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageUser getDiskUsageUser(
+ long idDiskUsageUser)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.getDiskUsageUser(idDiskUsageUser);
+ }
+
+ 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 _diskUsageUserLocalService.getPersistedModel(primaryKeyObj);
+ }
+
+ /**
+ * Returns a range of all the disk usage users.
+ *
+ * <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 users
+ * @param end the upper bound of the range of disk usage users (not inclusive)
+ * @return the range of disk usage users
+ * @throws SystemException if a system exception occurred
+ */
+ public java.util.List<com.pentila.entSavoie.model.DiskUsageUser> getDiskUsageUsers(
+ int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.getDiskUsageUsers(start, end);
+ }
+
+ /**
+ * Returns the number of disk usage users.
+ *
+ * @return the number of disk usage users
+ * @throws SystemException if a system exception occurred
+ */
+ public int getDiskUsageUsersCount()
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.getDiskUsageUsersCount();
+ }
+
+ /**
+ * Updates the disk usage user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageUser the disk usage user
+ * @return the disk usage user that was updated
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageUser updateDiskUsageUser(
+ com.pentila.entSavoie.model.DiskUsageUser diskUsageUser)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.updateDiskUsageUser(diskUsageUser);
+ }
+
+ /**
+ * Updates the disk usage user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
+ *
+ * @param diskUsageUser the disk usage user
+ * @param merge whether to merge the disk usage user 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 user that was updated
+ * @throws SystemException if a system exception occurred
+ */
+ public com.pentila.entSavoie.model.DiskUsageUser updateDiskUsageUser(
+ com.pentila.entSavoie.model.DiskUsageUser diskUsageUser, boolean merge)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.updateDiskUsageUser(diskUsageUser,
+ merge);
+ }
+
+ /**
+ * Returns the Spring bean ID for this bean.
+ *
+ * @return the Spring bean ID for this bean
+ */
+ public java.lang.String getBeanIdentifier() {
+ return _diskUsageUserLocalService.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) {
+ _diskUsageUserLocalService.setBeanIdentifier(beanIdentifier);
+ }
+
+ public java.lang.Object invokeMethod(java.lang.String name,
+ java.lang.String[] parameterTypes, java.lang.Object[] arguments)
+ throws java.lang.Throwable {
+ return _diskUsageUserLocalService.invokeMethod(name, parameterTypes,
+ arguments);
+ }
+
+ /**
+ * Get the users Quota for user in an etab
+ *
+ * @param pOrganizationId the etab Id
+ * @return Map with user id as key and . Disk usage in Mb in value
+ * @throws PortalException
+ * @throws SystemException
+ */
+ public java.util.HashMap<java.lang.Long, java.lang.Long> getUsersQuotasOnEtab(
+ long pOrganizationId)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.getUsersQuotasOnEtab(pOrganizationId);
+ }
+
+ /**
+ * Get the users Quota for user in an etab. It return only mail size
+ *
+ * @param pOrganizationId the etab Id
+ * @return Map with user id as key and . Disk usage in Mb in value
+ * @throws PortalException
+ * @throws SystemException
+ */
+ public java.util.HashMap<java.lang.Long, java.lang.Long> getUserMessagingQuotasOnEtab(
+ long pOrganizationId)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _diskUsageUserLocalService.getUserMessagingQuotasOnEtab(pOrganizationId);
+ }
+
+ /**
+ * This method add the size of DLFileEntry to Disk usage of the user in parameter.
+ *
+ * @param pFile DLFileEntry which has uploaded by user.
+ * @param pUserId 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 addDiskUsage(
+ com.liferay.portlet.documentlibrary.model.DLFileEntry pFile,
+ long pUserId, java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.addDiskUsage(pFile, pUserId,
+ pPortletId);
+ }
+
+ /**
+ * This method add the size of FileEntry to Disk usage of the user in parameter.
+ *
+ * @param pFile DLFileEntry which has uploaded by user.
+ * @param pUserId 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 addDiskUsage(
+ com.liferay.portal.kernel.repository.model.FileEntry pFile,
+ long pUserId, java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.addDiskUsage(pFile, pUserId,
+ pPortletId);
+ }
+
+ /**
+ * This method add the size of Folder and sub files to Disk usage of the user in parameter.
+ *
+ * @param pFolder Folder which has uploaded by user.
+ * @param pUserId 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 addDiskUsage(
+ com.liferay.portal.kernel.repository.model.Folder pFolder,
+ long pUserId, java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.addDiskUsage(pFolder, pUserId,
+ pPortletId);
+ }
+
+ /**
+ * This method add the size of Folder and sub files to Disk usage of the user in parameter.
+ *
+ * @param pFile File which has uploaded by user.
+ * @param pUserId 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 addDiskUsage(java.io.File pFile, long pUserId,
+ java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.addDiskUsage(pFile, pUserId,
+ pPortletId);
+ }
+
+ /**
+ * This method substract the size of FileEntry to Disk usage of the user in parameter.
+ *
+ * @param pFileSize size in byte of file removed by user
+ * @param pUserId 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 addDiskUsage(long pFileSize, long pUserId,
+ java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.addDiskUsage(pFileSize, pUserId,
+ 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 Exception
+ * @throws NamingException
+ */
+ public boolean addDiskUsagePrivate(long pFileSize, long pUserId,
+ java.lang.String pPortletId) throws java.lang.Exception {
+ return _diskUsageUserLocalService.addDiskUsagePrivate(pFileSize,
+ pUserId, pPortletId);
+ }
+
+ /**
+ * This method substract the size of DLFileEntry to Disk usage of the user in parameter.
+ *
+ * @param pFile DLFileEntry removed by user.
+ * @param pUserId 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 pUserId, java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.substractDiskUsage(pFile, pUserId,
+ pPortletId);
+ }
+
+ /**
+ * This method substract the size of Folder and subfile to Disk usage of the user in parameter.
+ *
+ * @param pFolder Folder removed by user.
+ * @param pUserId 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.Folder pFolder,
+ long pUserId, java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.substractDiskUsage(pFolder, pUserId,
+ pPortletId);
+ }
+
+ /**
+ * This method substract the size of FileEntry to Disk usage of the user in parameter.
+ *
+ * @param pFile DLFileEntry which removed by user.
+ * @param pUserId 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 pUserId, java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.substractDiskUsage(pFile, pUserId,
+ pPortletId);
+ }
+
+ /**
+ * This method substract the size of FileEntry to Disk usage of the user in parameter.
+ *
+ * @param pFileSize size in byte of file removed by user
+ * @param pUserId 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(long pFileSize, long pUserId,
+ java.lang.String pPortletId) {
+ return _diskUsageUserLocalService.substractDiskUsage(pFileSize,
+ pUserId, pPortletId);
+ }
+
+ /**
+ * This method update all the documentary size for suers for a company, it skips the users which throw exceptions
+ *
+ * @param pCompanyId long which represent the company in database
+ * @return boolean true, return needed for liferay services
+ */
+ public boolean updateAllUsersQuotasFromDocuments() {
+ return _diskUsageUserLocalService.updateAllUsersQuotasFromDocuments();
+ }
+
+ /**
+ * Return the size of folder with it's sub folder
+ *
+ * @param pFolder Folder object it will get the size
+ * @return Long, the size of folder in paramter
+ */
+ public java.lang.Long getSubfileSizeInFolder(long pFolderId) {
+ return _diskUsageUserLocalService.getSubfileSizeInFolder(pFolderId);
+ }
+
+ /**
+ * It calcul the size of user's sending box for cartable
+ *
+ * @param pUser User object. Calcul the size of cartable sending box of this user
+ * @return Long object which represent the file size of sending box for cartable portlet
+ */
+ public java.lang.Long getSizeCartableSendingBoxForUser(
+ com.liferay.portal.model.User pUser) {
+ return _diskUsageUserLocalService.getSizeCartableSendingBoxForUser(pUser);
+ }
+
+ /**
+ * @deprecated Renamed to {@link #getWrappedService}
+ */
+ public DiskUsageUserLocalService getWrappedDiskUsageUserLocalService() {
+ return _diskUsageUserLocalService;
+ }
+
+ /**
+ * @deprecated Renamed to {@link #setWrappedService}
+ */
+ public void setWrappedDiskUsageUserLocalService(
+ DiskUsageUserLocalService diskUsageUserLocalService) {
+ _diskUsageUserLocalService = diskUsageUserLocalService;
+ }
+
+ public DiskUsageUserLocalService getWrappedService() {
+ return _diskUsageUserLocalService;
+ }
+
+ public void setWrappedService(
+ DiskUsageUserLocalService diskUsageUserLocalService) {
+ _diskUsageUserLocalService = diskUsageUserLocalService;
+ }
+
+ private DiskUsageUserLocalService _diskUsageUserLocalService;
+}
\ No newline at end of file