minor fixes
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@134161 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a40e25a3c4
commit
1cfb02adb8
|
@ -20,7 +20,6 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="${webappDirectory}/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="${webappDirectory}/WEB-INF/classes" path="src/main/resources">
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -270,5 +270,4 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<packaging>war</packaging>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -266,17 +266,9 @@ public class CreateDatasetForm extends Composite{
|
||||||
private void createDatasetFormBody(final boolean isWorkspaceRequest, String idFolderWorkspace, final HandlerManager eventBus){
|
private void createDatasetFormBody(final boolean isWorkspaceRequest, String idFolderWorkspace, final HandlerManager eventBus){
|
||||||
|
|
||||||
initWidget(uiBinder.createAndBindUi(this));
|
initWidget(uiBinder.createAndBindUi(this));
|
||||||
|
|
||||||
// save event bus
|
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
|
||||||
// workspace request
|
|
||||||
this.isWorkspaceRequest = isWorkspaceRequest;
|
this.isWorkspaceRequest = isWorkspaceRequest;
|
||||||
|
|
||||||
// bind on events
|
|
||||||
bind();
|
bind();
|
||||||
|
|
||||||
// prepare info icons
|
|
||||||
prepareInfoIcons();
|
prepareInfoIcons();
|
||||||
|
|
||||||
// disable continue button
|
// disable continue button
|
||||||
|
@ -430,6 +422,9 @@ public class CreateDatasetForm extends Composite{
|
||||||
// set the url of the license, if any
|
// set the url of the license, if any
|
||||||
showLicenseUrl();
|
showLicenseUrl();
|
||||||
|
|
||||||
|
// try to retrieve the licenses
|
||||||
|
setAlertBlock("Retrieving groups, please wait...", AlertType.INFO, true);
|
||||||
|
|
||||||
// request groups
|
// request groups
|
||||||
ckanServices.getUserGroups(new AsyncCallback<List<GroupBean>>() {
|
ckanServices.getUserGroups(new AsyncCallback<List<GroupBean>>() {
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class InfoIconsLabels {
|
||||||
|
|
||||||
// GROUPS
|
// GROUPS
|
||||||
public static final String GROUPS_INFO_ID_POPUP = "groups-popup-panel-info";
|
public static final String GROUPS_INFO_ID_POPUP = "groups-popup-panel-info";
|
||||||
public static final String GROUPS_INFO_TEXT = "Associate this product to groups";
|
public static final String GROUPS_INFO_TEXT = "Associate this product to groups. A group is a view of products belonging to one or more organization.";
|
||||||
public static final String GROUPS_INFO_CAPTION = "Product Groups";
|
public static final String GROUPS_INFO_CAPTION = "Product Groups";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -382,7 +382,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
toCreate.setSource(datasetUrl);
|
toCreate.setSource(datasetUrl);
|
||||||
|
|
||||||
// start a thread that will associate this dataset with the group
|
// start a thread that will associate this dataset with the group
|
||||||
if(toCreate.getChosenProfile() != null){
|
if(toCreate.getChosenProfile() != null || toCreate.getGroups() != null){
|
||||||
|
|
||||||
AssociationToGroupThread threadAssociationToGroup =
|
AssociationToGroupThread threadAssociationToGroup =
|
||||||
new AssociationToGroupThread(
|
new AssociationToGroupThread(
|
||||||
|
@ -610,7 +610,6 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
List<GroupBean> toReturn = new ArrayList<GroupBean>();
|
List<GroupBean> toReturn = new ArrayList<GroupBean>();
|
||||||
|
|
||||||
if(isWithinPortal()){
|
if(isWithinPortal()){
|
||||||
|
|
||||||
String username = session.getUsername();
|
String username = session.getUsername();
|
||||||
if(username.equals(TEST_USER)){
|
if(username.equals(TEST_USER)){
|
||||||
logger.warn("Session expired");
|
logger.warn("Session expired");
|
||||||
|
@ -625,7 +624,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
DataCatalogue catalogue = getCatalogue(scope);
|
DataCatalogue catalogue = getCatalogue(scope);
|
||||||
List<CkanGroup> ckanGroups = catalogue.getGroups();
|
List<CkanGroup> ckanGroups = catalogue.getGroups();
|
||||||
|
|
||||||
// TODO
|
// TODO check role
|
||||||
|
|
||||||
for (CkanGroup ckanGroup : ckanGroups) {
|
for (CkanGroup ckanGroup : ckanGroups) {
|
||||||
toReturn.add(new GroupBean(ckanGroup.getTitle(), ckanGroup.getName()));
|
toReturn.add(new GroupBean(ckanGroup.getTitle(), ckanGroup.getName()));
|
||||||
|
@ -636,7 +635,6 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
logger.warn("Dev mode detected");
|
logger.warn("Dev mode detected");
|
||||||
toReturn = Arrays.asList(new GroupBean("Group title", "aaa"));
|
toReturn = Arrays.asList(new GroupBean("Group title", "aaa"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue