removed embedded mapping for production root
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@131364 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
095bbe77d7
commit
a1840cb2f7
|
@ -15,7 +15,6 @@ import org.gcube.common.homelibrary.home.workspace.folder.FolderItem;
|
|||
import org.gcube.common.homelibrary.home.workspace.folder.items.GCubeItem;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.CKanUtils;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.CKanUtilsImpl;
|
||||
import org.gcube.datacatalogue.ckanutillibrary.models.RolesIntoOrganization;
|
||||
import org.gcube.datacatalogue.metadatadiscovery.DataCalogueMetadataFormatReader;
|
||||
import org.gcube.datacatalogue.metadatadiscovery.bean.MetadataType;
|
||||
|
@ -249,7 +248,7 @@ public class Utils {
|
|||
// get the orgs of the user
|
||||
List<CkanOrganization> ckanOrgs = ckanUtils.getOrganizationsByUser(username);
|
||||
for (CkanOrganization ckanOrganization : ckanOrgs) {
|
||||
if(ckanOrganization.getName().equals(gCubeGroupName.toLowerCase()) || ckanOrganization.getName().equals(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT)){
|
||||
if(ckanOrganization.getName().equals(gCubeGroupName.toLowerCase())){//|| ckanOrganization.getName().equals(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT)){
|
||||
orgs.add(new OrganizationBean(ckanOrganization.getTitle(), ckanOrganization.getName()));
|
||||
break;
|
||||
}
|
||||
|
@ -284,9 +283,8 @@ public class Utils {
|
|||
|
||||
logger.debug("Organization name is " + organizationName);
|
||||
|
||||
// TODO check for the root
|
||||
if(organizationName.equals(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT))
|
||||
return CKanUtilsImpl.PRODUCTION_SCOPE_ROOT;
|
||||
// if(organizationName.equals(CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT))
|
||||
// return CKanUtilsImpl.PRODUCTION_SCOPE_ROOT;
|
||||
|
||||
GroupManager gm = new LiferayGroupManager();
|
||||
List<GCubeGroup> groups = gm.listGroups();
|
||||
|
@ -306,9 +304,9 @@ public class Utils {
|
|||
|
||||
if(scope != null){
|
||||
|
||||
// TODO check for the root
|
||||
if(scope.equals(CKanUtilsImpl.PRODUCTION_SCOPE_ROOT))
|
||||
return CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT;
|
||||
|
||||
// if(scope.equals(CKanUtilsImpl.PRODUCTION_SCOPE_ROOT))
|
||||
// return CKanUtilsImpl.PRODUCTION_CKAN_ORGNAME_ROOT;
|
||||
|
||||
GroupManager gm = new LiferayGroupManager();
|
||||
return gm.getGroup(gm.getGroupIdFromInfrastructureScope(scope)).getGroupName().toLowerCase();
|
||||
|
@ -370,7 +368,7 @@ public class Utils {
|
|||
MetadataVocabulary vocabulary = metadataField.getVocabulary();
|
||||
if(vocabulary != null)
|
||||
wrapperObj.setVocabulary(vocabulary.getVocabularyFields());
|
||||
|
||||
|
||||
// multi selection?
|
||||
wrapperObj.setMultiSelection(metadataField.getVocabulary().isMultiSelection());
|
||||
|
||||
|
|
Loading…
Reference in New Issue