Rebuilt due to storagehub exceptions added since gCube 4.14
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@178951 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e1c71936ad
commit
c60edde520
|
@ -16,11 +16,13 @@
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
|
|
@ -5,4 +5,5 @@ org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
org.eclipse.jdt.core.compiler.source=1.7
|
org.eclipse.jdt.core.compiler.source=1.7
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<root>
|
||||||
|
<facet id="jst.jaxrs">
|
||||||
|
<node name="libprov">
|
||||||
|
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
|
||||||
|
</node>
|
||||||
|
</facet>
|
||||||
|
</root>
|
|
@ -4,4 +4,5 @@
|
||||||
<installed facet="java" version="1.7"/>
|
<installed facet="java" version="1.7"/>
|
||||||
<installed facet="jst.web" version="2.3"/>
|
<installed facet="jst.web" version="2.3"/>
|
||||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||||
|
<installed facet="jst.jaxrs" version="2.0"/>
|
||||||
</faceted-project>
|
</faceted-project>
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.2-1-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.2-1-1"
|
||||||
|
date="${buildDate}">
|
||||||
|
<Change>Rebuilt due to storagehub exceptions added since gCube 4.14
|
||||||
|
</Change>
|
||||||
|
</Changeset>
|
||||||
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.2-1-0"
|
||||||
date="${buildDate}">
|
date="${buildDate}">
|
||||||
<Change>Changed ItemBuilder to read the new method getMetadata
|
<Change>Changed ItemBuilder to read the new method getMetadata
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.2-0-1"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.2-0-1"
|
||||||
date="${buildDate}">
|
date="${buildDate}">
|
||||||
<Change>[Incident #77436] Fixing class cast Exception for FolderItem
|
<Change>[Incident #77436] Fixing class cast Exception for FolderItem
|
||||||
son of a SharedFolder
|
son of a SharedFolder
|
||||||
|
@ -14,72 +22,86 @@
|
||||||
<Change>Fixed breadcrumb on SelectDialaog
|
<Change>Fixed breadcrumb on SelectDialaog
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.2-0-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.2-0-0"
|
||||||
date="2018-09-16">
|
date="2018-09-16">
|
||||||
<Change>[Task #10943] Migrated to StorageHub
|
<Change>[Task #10943] Migrated to StorageHub
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-8-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-8-0"
|
||||||
date="2018-01-16">
|
date="2018-01-16">
|
||||||
<Change>[Task #10943] Added breadcrumb changed event
|
<Change>[Task #10943] Added breadcrumb changed event
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-7-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-7-0"
|
||||||
date="2017-07-06">
|
date="2017-07-06">
|
||||||
<Change>[Feature #9114] Add pagination to Workspace Explorer
|
<Change>[Feature #9114] Add pagination to Workspace Explorer
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-6-1"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-6-1"
|
||||||
date="2017-02-06">
|
date="2017-02-06">
|
||||||
<Change>[Bug #6601] fixed
|
<Change>[Bug #6601] fixed
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-6-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-6-0"
|
||||||
date="2016-11-21">
|
date="2016-11-21">
|
||||||
<Change>Removed ASL Dependency, ported to gCube Client Context
|
<Change>Removed ASL Dependency, ported to gCube Client Context
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-5-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-5-0"
|
||||||
date="2016-09-21">
|
date="2016-09-21">
|
||||||
<Change>[Feature #5091] Added load for folder ID to SelectDialog and
|
<Change>[Feature #5091] Added load for folder ID to SelectDialog and
|
||||||
SelectPanel
|
SelectPanel
|
||||||
</Change>
|
</Change>
|
||||||
<Change>Bug fixed on breadcrumb when item is null</Change>
|
<Change>Bug fixed on breadcrumb when item is null</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-4-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-4-0"
|
||||||
date="2016-05-31">
|
date="2016-05-31">
|
||||||
<Change>[Feature #4128] Migration to Liferay 6.2</Change>
|
<Change>[Feature #4128] Migration to Liferay 6.2</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-3-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-3-0"
|
||||||
date="2016-05-04">
|
date="2016-05-04">
|
||||||
<Change>[Feature #2546] Endow Workspace Resources Explorer with
|
<Change>[Feature #2546] Endow Workspace Resources Explorer with
|
||||||
filtering and display features
|
filtering and display features
|
||||||
</Change>
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-2-1"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-2-1"
|
||||||
date="2016-03-22">
|
date="2016-03-22">
|
||||||
<Change>[Incident #2903] Bug fixed</Change>
|
<Change>[Incident #2903] Bug fixed</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-2-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-2-0"
|
||||||
date="2016-02-26">
|
date="2016-02-26">
|
||||||
<Change>Bug fix in Item.java</Change>
|
<Change>Bug fix in Item.java</Change>
|
||||||
<Change>[Bug #2350] Bug fix</Change>
|
<Change>[Bug #2350] Bug fix</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-1-1"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-1-1"
|
||||||
date="2016-02-26">
|
date="2016-02-26">
|
||||||
<Change>Bug fix in Item.java</Change>
|
<Change>Bug fix in Item.java</Change>
|
||||||
<Change>[Bug #2350] Bug fix</Change>
|
<Change>[Bug #2350] Bug fix</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-1-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-1-0"
|
||||||
date="2016-02-02">
|
date="2016-02-02">
|
||||||
<Change>[Feature #1657] Added Resource Explorer</Change>
|
<Change>[Feature #1657] Added Resource Explorer</Change>
|
||||||
<Change>Feature #2099] Add new facility: create a new folder</Change>
|
<Change>Feature #2099] Add new facility: create a new folder</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.1-0-0"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.1-0-0"
|
||||||
date="2015-07-16">
|
date="2015-07-16">
|
||||||
<Change>First Release</Change>
|
<Change>First Release</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="portlets-widgets.workspace-explorer.0-0-1"
|
<Changeset
|
||||||
|
component="portlets-widgets.workspace-explorer.0-0-1"
|
||||||
date="2015-06-24">
|
date="2015-06-24">
|
||||||
<Change>Started project</Change>
|
<Change>Started project</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>workspace-explorer</artifactId>
|
<artifactId>workspace-explorer</artifactId>
|
||||||
<version>2.1.0-SNAPSHOT</version>
|
<version>2.1.1-SNAPSHOT</version>
|
||||||
<name>gCube Workspace Explorer</name>
|
<name>gCube Workspace Explorer</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Workspace Explorer widget allows to navigate (gCube) Workspace
|
gCube Workspace Explorer widget allows to navigate (gCube) Workspace
|
||||||
|
|
|
@ -37,6 +37,7 @@ import org.slf4j.LoggerFactory;
|
||||||
public class ItemBuilder {
|
public class ItemBuilder {
|
||||||
|
|
||||||
public static final Logger _log = LoggerFactory.getLogger(ItemBuilder.class);
|
public static final Logger _log = LoggerFactory.getLogger(ItemBuilder.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the item.
|
* Gets the item.
|
||||||
*
|
*
|
||||||
|
@ -48,11 +49,11 @@ public class ItemBuilder {
|
||||||
* @param loadChildren the load children
|
* @param loadChildren the load children
|
||||||
* @param loadGcubeProperties the load gcube properties
|
* @param loadGcubeProperties the load gcube properties
|
||||||
* @return the item
|
* @return the item
|
||||||
* @throws InternalErrorException the internal error exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public static org.gcube.portlets.widgets.wsexplorer.shared.Item getItem(org.gcube.portlets.widgets.wsexplorer.shared.Item parent, Item workspaceItem, String workspaceItemPath,
|
public static org.gcube.portlets.widgets.wsexplorer.shared.Item getItem(org.gcube.portlets.widgets.wsexplorer.shared.Item parent, Item workspaceItem, String workspaceItemPath,
|
||||||
List<ItemType> showableTypes, FilterCriteria filterCriteria,
|
List<ItemType> showableTypes, FilterCriteria filterCriteria,
|
||||||
boolean loadChildren, boolean loadGcubeProperties) {
|
boolean loadChildren, boolean loadGcubeProperties) throws Exception {
|
||||||
|
|
||||||
ItemType type = getItemType(workspaceItem);
|
ItemType type = getItemType(workspaceItem);
|
||||||
|
|
||||||
|
@ -123,11 +124,11 @@ public class ItemBuilder {
|
||||||
* @param startIdx the start idx
|
* @param startIdx the start idx
|
||||||
* @param limit the limit
|
* @param limit the limit
|
||||||
* @return the item
|
* @return the item
|
||||||
* @throws InternalErrorException the internal error exception
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public static org.gcube.portlets.widgets.wsexplorer.shared.Item getItem(org.gcube.portlets.widgets.wsexplorer.shared.Item parent, Item workspaceItem, String workspaceItemPath,
|
public static org.gcube.portlets.widgets.wsexplorer.shared.Item getItem(org.gcube.portlets.widgets.wsexplorer.shared.Item parent, Item workspaceItem, String workspaceItemPath,
|
||||||
List<ItemType> showableTypes, FilterCriteria filterCriteria,
|
List<ItemType> showableTypes, FilterCriteria filterCriteria,
|
||||||
boolean loadChildren, boolean loadGcubeProperties, int startIdx, int limit) {
|
boolean loadChildren, boolean loadGcubeProperties, int startIdx, int limit) throws Exception {
|
||||||
|
|
||||||
ItemType type = getItemType(workspaceItem);
|
ItemType type = getItemType(workspaceItem);
|
||||||
|
|
||||||
|
|
|
@ -377,7 +377,7 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
||||||
try {
|
try {
|
||||||
return StorageHubServiceUtil.getUserACLForFolderId(getThreadLocalRequest(), folderId);
|
return StorageHubServiceUtil.getUserACLForFolderId(getThreadLocalRequest(), folderId);
|
||||||
}catch(Exception e) {
|
}catch(Exception e) {
|
||||||
e.printStackTrace();
|
_log.info("Error on getUserACLForFolderId",e);
|
||||||
}
|
}
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
@ -568,7 +568,12 @@ public class WorkspaceExplorerServiceImpl extends RemoteServiceServlet implement
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFolderChildrenCount(org.gcube.portlets.widgets.wsexplorer.shared.Item item){
|
public int getFolderChildrenCount(org.gcube.portlets.widgets.wsexplorer.shared.Item item){
|
||||||
|
try {
|
||||||
return StorageHubServiceUtil.getItemChildrenCount(getThreadLocalRequest(), item.getId());
|
return StorageHubServiceUtil.getItemChildrenCount(getThreadLocalRequest(), item.getId());
|
||||||
|
} catch (Exception e) {
|
||||||
|
_log.error("Error on getFolderChildrenCount", e);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,23 @@ import com.liferay.portal.kernel.log.Log;
|
||||||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Class StorageHubServiceUtil.
|
||||||
|
*
|
||||||
|
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
|
||||||
|
*
|
||||||
|
* Apr 9, 2019
|
||||||
|
*/
|
||||||
public class StorageHubServiceUtil {
|
public class StorageHubServiceUtil {
|
||||||
private static Log _log = LogFactoryUtil.getLog(StorageHubServiceUtil.class);
|
private static Log _log = LogFactoryUtil.getLog(StorageHubServiceUtil.class);
|
||||||
public static final String ACCOUNTING_HL_NODE_NAME = "hl:accounting";
|
public static final String ACCOUNTING_HL_NODE_NAME = "hl:accounting";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the root.
|
||||||
|
*
|
||||||
|
* @param request the request
|
||||||
|
* @return the root
|
||||||
|
*/
|
||||||
public static Item getRoot(HttpServletRequest request) {
|
public static Item getRoot(HttpServletRequest request) {
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
String userName = pContext.getCurrentUser(request).getUsername();
|
String userName = pContext.getCurrentUser(request).getUsername();
|
||||||
|
@ -36,7 +49,43 @@ public class StorageHubServiceUtil {
|
||||||
return itemRoot;
|
return itemRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Item getItem(HttpServletRequest request, String itemId) {
|
// /**
|
||||||
|
// * Gets the notification manager to storage hub.
|
||||||
|
// *
|
||||||
|
// * @param httpServletRequest the http servlet request
|
||||||
|
// * @return the notification manager to storage hub
|
||||||
|
// */
|
||||||
|
// public static NotificationsManager getNotificationManagerToStorageHub(HttpServletRequest httpServletRequest)
|
||||||
|
// {
|
||||||
|
// PortalContextInfo info = getPortalContext(httpServletRequest);
|
||||||
|
// HttpSession session = httpServletRequest.getSession();
|
||||||
|
// NotificationsManager notifMng = (NotificationsManager) session.getAttribute(NOTIFICATION_MANAGER_TO_STORAGEHUB);
|
||||||
|
//
|
||||||
|
// if (notifMng == null) {
|
||||||
|
// try{
|
||||||
|
// logger.trace("Create new NotificationsManager for user: "+info.getUsername());
|
||||||
|
// logger.trace("New ApplicationNotificationsManager with portlet class name: "+NOTIFICATION_PORTLET_CLASS_ID);
|
||||||
|
// SocialNetworkingSite site = new SocialNetworkingSite(httpServletRequest);
|
||||||
|
// SocialNetworkingUser curser = new SocialNetworkingUser(info.getUsername(), info.getUserEmail(), info.getUserFullName(), info.getUserAvatarID());
|
||||||
|
// notifMng = new ApplicationNotificationsManager(site, info.getCurrentScope(), curser, NOTIFICATION_PORTLET_CLASS_ID);
|
||||||
|
// session.setAttribute(NOTIFICATION_MANAGER_TO_STORAGEHUB, notifMng);
|
||||||
|
// }catch (Exception e) {
|
||||||
|
// logger.error("An error occurred instancing ApplicationNotificationsManager for user: "+info.getUsername(),e);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return notifMng;
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the item.
|
||||||
|
*
|
||||||
|
* @param request the request
|
||||||
|
* @param itemId the item id
|
||||||
|
* @return the item
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
|
public static Item getItem(HttpServletRequest request, String itemId) throws Exception {
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
String userName = pContext.getCurrentUser(request).getUsername();
|
String userName = pContext.getCurrentUser(request).getUsername();
|
||||||
String scope = pContext.getCurrentScope(request);
|
String scope = pContext.getCurrentScope(request);
|
||||||
|
@ -48,7 +97,15 @@ public class StorageHubServiceUtil {
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<? extends Item> getParents(HttpServletRequest request, String itemId) {
|
/**
|
||||||
|
* Gets the parents.
|
||||||
|
*
|
||||||
|
* @param request the request
|
||||||
|
* @param itemId the item id
|
||||||
|
* @return the parents
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
|
public static List<? extends Item> getParents(HttpServletRequest request, String itemId) throws Exception {
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
String userName = pContext.getCurrentUser(request).getUsername();
|
String userName = pContext.getCurrentUser(request).getUsername();
|
||||||
String scope = pContext.getCurrentScope(request);
|
String scope = pContext.getCurrentScope(request);
|
||||||
|
@ -60,7 +117,17 @@ public class StorageHubServiceUtil {
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FolderItem createFolder(HttpServletRequest request, String parentId, String name, String description) {
|
/**
|
||||||
|
* Creates the folder.
|
||||||
|
*
|
||||||
|
* @param request the request
|
||||||
|
* @param parentId the parent id
|
||||||
|
* @param name the name
|
||||||
|
* @param description the description
|
||||||
|
* @return the folder item
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
|
public static FolderItem createFolder(HttpServletRequest request, String parentId, String name, String description) throws Exception {
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
String userName = pContext.getCurrentUser(request).getUsername();
|
String userName = pContext.getCurrentUser(request).getUsername();
|
||||||
String scope = pContext.getCurrentScope(request);
|
String scope = pContext.getCurrentScope(request);
|
||||||
|
@ -73,8 +140,9 @@ public class StorageHubServiceUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the VRE folders id.
|
||||||
*
|
*
|
||||||
* @param request
|
* @param request the request
|
||||||
* @return the VRE Folders Id
|
* @return the VRE Folders Id
|
||||||
*/
|
*/
|
||||||
public static String getVREFoldersId(HttpServletRequest request) {
|
public static String getVREFoldersId(HttpServletRequest request) {
|
||||||
|
@ -101,7 +169,15 @@ public class StorageHubServiceUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String getUserACLForFolderId(HttpServletRequest request, String folderId) {
|
/**
|
||||||
|
* Gets the user ACL for folder id.
|
||||||
|
*
|
||||||
|
* @param request the request
|
||||||
|
* @param folderId the folder id
|
||||||
|
* @return the user ACL for folder id
|
||||||
|
* @throws Exception the exception
|
||||||
|
*/
|
||||||
|
public static String getUserACLForFolderId(HttpServletRequest request, String folderId) throws Exception {
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
String userName = pContext.getCurrentUser(request).getUsername();
|
String userName = pContext.getCurrentUser(request).getUsername();
|
||||||
String scope = pContext.getCurrentScope(request);
|
String scope = pContext.getCurrentScope(request);
|
||||||
|
@ -151,11 +227,15 @@ public class StorageHubServiceUtil {
|
||||||
return "UNDEFINED";
|
return "UNDEFINED";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the item children count.
|
||||||
*
|
*
|
||||||
|
* @param request the request
|
||||||
|
* @param itemId the item id
|
||||||
|
* @return the item children count
|
||||||
|
* @throws Exception the exception
|
||||||
*/
|
*/
|
||||||
public static int getItemChildrenCount(HttpServletRequest request, String itemId) {
|
public static int getItemChildrenCount(HttpServletRequest request, String itemId) throws Exception {
|
||||||
PortalContext pContext = PortalContext.getConfiguration();
|
PortalContext pContext = PortalContext.getConfiguration();
|
||||||
String userName = pContext.getCurrentUser(request).getUsername();
|
String userName = pContext.getCurrentUser(request).getUsername();
|
||||||
String scope = pContext.getCurrentScope(request);
|
String scope = pContext.getCurrentScope(request);
|
||||||
|
|
Loading…
Reference in New Issue