diff --git a/src/main/java/org/gcube/portlets/widgets/wsthreddssync/server/ThreddsWorkspaceSyncServiceImpl.java b/src/main/java/org/gcube/portlets/widgets/wsthreddssync/server/ThreddsWorkspaceSyncServiceImpl.java index 73fe01f..8b9f8f2 100644 --- a/src/main/java/org/gcube/portlets/widgets/wsthreddssync/server/ThreddsWorkspaceSyncServiceImpl.java +++ b/src/main/java/org/gcube/portlets/widgets/wsthreddssync/server/ThreddsWorkspaceSyncServiceImpl.java @@ -7,6 +7,8 @@ import java.util.List; import java.util.Map; import java.util.Set; +import javax.servlet.http.HttpServletRequest; + import org.gcube.common.portal.PortalContext; import org.gcube.portal.wssynclibrary.shared.ItemNotSynched; import org.gcube.portal.wssynclibrary.shared.WorkspaceFolderLocked; @@ -36,6 +38,7 @@ import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.liferay.portal.service.UserLocalServiceUtil; +// TODO: Auto-generated Javadoc /** * The server side implementation of the RPC service. * @@ -127,10 +130,26 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem public WsThreddsSynchFolderDescriptor getConfiguration(String folderId, boolean loadStatus) throws WorkspaceFolderLocked, Exception { logger.debug("called isItemSynched for folderId: " + folderId); + GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest()); + return getConfiguration(folderId, loadStatus, this.getThreadLocalRequest(), user); + } + + + /** + * Gets the configuration. + * + * @param folderId the folder id + * @param loadStatus the load status + * @param httpRequest the http request + * @param user the user + * @return the configuration + * @throws Exception the exception + */ + public WsThreddsSynchFolderDescriptor getConfiguration(String folderId, boolean loadStatus, HttpServletRequest httpRequest, GCubeUser user) throws Exception { + logger.debug("called internal getConfiguration for folderId: " + folderId); try { - GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest()); - ThSyncFolderDescriptor theConfig = getSyncService().getConfiguration(folderId, loadStatus, this.getThreadLocalRequest(), user); + ThSyncFolderDescriptor theConfig = getSyncService().getConfiguration(folderId, loadStatus, httpRequest, user); if (theConfig != null) { logger.info("Folder id: " + folderId + " is synched");