bug fixes. Starting integration with new Workspace Explorer constructor
This commit is contained in:
parent
41a287ee1f
commit
0dbd890dda
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.ResourceElementBean;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.explore.WorkspaceResourcesEnhancedExplorerPanel;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.explore.WorkspaceResourcesExplorerPanel;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
|
||||
import org.gcube.portlets.widgets.wsexplorer.client.view.grid.ItemsTable.DISPLAY_FIELD;
|
||||
|
@ -107,7 +108,7 @@ public class SelectResourceByWEMainPanel extends Composite {
|
|||
}
|
||||
}
|
||||
|
||||
wsFolderId = initialBean.getRootIdInWorkspace()!=null?initialBean.getRootIdInWorkspace():wsFolderId;
|
||||
//wsFolderId = initialBean.getRootIdInWorkspace()!=null?initialBean.getRootIdInWorkspace():wsFolderId;
|
||||
|
||||
//loads the WE only if the root is not null
|
||||
if(wsFolderId!=null) {
|
||||
|
@ -115,7 +116,7 @@ public class SelectResourceByWEMainPanel extends Composite {
|
|||
DISPLAY_FIELD[] displayFields = new DISPLAY_FIELD[] { DISPLAY_FIELD.ICON, DISPLAY_FIELD.NAME,
|
||||
DISPLAY_FIELD.OWNER, DISPLAY_FIELD.CREATION_DATE};
|
||||
|
||||
WorkspaceResourcesExplorerPanel workspaceExplorerPanel = new WorkspaceResourcesExplorerPanel(wsFolderId,false,null, null,false,null,displayFields);
|
||||
WorkspaceResourcesEnhancedExplorerPanel workspaceExplorerPanel = new WorkspaceResourcesEnhancedExplorerPanel(wsFolderId,false,null, null,false,null,displayFields);
|
||||
WorskpaceExplorerSelectNotificationListener wsResourceExplorerListener = new WorskpaceExplorerSelectNotificationListener() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -51,8 +51,6 @@ import com.liferay.portal.kernel.log.LogFactoryUtil;
|
|||
import com.liferay.portal.service.UserLocalServiceUtil;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Server side of the data publisher.
|
||||
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
|
||||
|
@ -193,6 +191,13 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
|||
logger.info("Request for CKAN licenses for scope " + scope);
|
||||
String keyPerScope = CatalogueUtilMethods.concatenateSessionKeyScope(SessionCatalogueAttributes.CKAN_LICENSES_KEY, scope);
|
||||
|
||||
// if(!isWithinPortal()){
|
||||
// logger.info("DEV MODE returning funny licenses...");
|
||||
// List<LicenseBean> licenses = new ArrayList<LicenseBean>();
|
||||
// licenses.add(new LicenseBean("AFL-3.0", "https://opensource.org/licenses/AFL-3.0"));
|
||||
// return licenses;
|
||||
// }
|
||||
|
||||
List<LicenseBean> licensesBean = null;
|
||||
if(httpSession.getAttribute(keyPerScope) != null){
|
||||
licensesBean = (List<LicenseBean>)httpSession.getAttribute(keyPerScope);
|
||||
|
|
|
@ -153,6 +153,7 @@ public class WorkspaceUtils {
|
|||
}else {
|
||||
//it is a file, removing extension
|
||||
int indexOfDot = title.lastIndexOf(".");
|
||||
if(indexOfDot>=0) {
|
||||
String suffix = title.substring(indexOfDot, title.length());
|
||||
if(suffix.length()>=1 && suffix.length()<=4) {
|
||||
//I'm considering last .suffix as an file extension so removing it.
|
||||
|
@ -160,6 +161,7 @@ public class WorkspaceUtils {
|
|||
bean.setTitle(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Replacing /Home/user.name with ""
|
||||
String fullPathBase = originalFolderOrFile.getPath();
|
||||
|
|
Loading…
Reference in New Issue