task_21379 #3
|
@ -7,6 +7,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.gcube.common.portal.PortalContext;
|
import org.gcube.common.portal.PortalContext;
|
||||||
import org.gcube.portal.wssynclibrary.shared.ItemNotSynched;
|
import org.gcube.portal.wssynclibrary.shared.ItemNotSynched;
|
||||||
import org.gcube.portal.wssynclibrary.shared.WorkspaceFolderLocked;
|
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;
|
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: Auto-generated Javadoc
|
||||||
/**
|
/**
|
||||||
* The server side implementation of the RPC service.
|
* 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)
|
public WsThreddsSynchFolderDescriptor getConfiguration(String folderId, boolean loadStatus)
|
||||||
throws WorkspaceFolderLocked, Exception {
|
throws WorkspaceFolderLocked, Exception {
|
||||||
logger.debug("called isItemSynched for folderId: " + folderId);
|
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 {
|
try {
|
||||||
GCubeUser user = PortalContext.getConfiguration().getCurrentUser(this.getThreadLocalRequest());
|
ThSyncFolderDescriptor theConfig = getSyncService().getConfiguration(folderId, loadStatus, httpRequest, user);
|
||||||
ThSyncFolderDescriptor theConfig = getSyncService().getConfiguration(folderId, loadStatus, this.getThreadLocalRequest(), user);
|
|
||||||
|
|
||||||
if (theConfig != null) {
|
if (theConfig != null) {
|
||||||
logger.info("Folder id: " + folderId + " is synched");
|
logger.info("Folder id: " + folderId + " is synched");
|
||||||
|
|
Loading…
Reference in New Issue