added properties for source version and target java version
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@148904 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
7e779c3cef
commit
13b24671a7
|
@ -952,9 +952,9 @@ public class CreateDatasetForm extends Composite{
|
||||||
if(groupsTitle != null){
|
if(groupsTitle != null){
|
||||||
for (String groupTitle : groupsTitle) {
|
for (String groupTitle : groupsTitle) {
|
||||||
if(field.isGroupToForce())
|
if(field.isGroupToForce())
|
||||||
groupsToForceCreation.add(new OrganizationBean(groupTitle, groupTitle, false));
|
groupsToForceCreation.add(new OrganizationBean(groupTitle, groupTitle, false, field.isPropagateUp()));
|
||||||
else
|
else
|
||||||
groups.add(new OrganizationBean(groupTitle, groupTitle, false));
|
groups.add(new OrganizationBean(groupTitle, groupTitle, false, field.isPropagateUp()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -783,4 +783,16 @@ public class MetaDataFieldSkeleton extends Composite{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the propagateUp is set
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean isPropagateUp(){
|
||||||
|
FieldAsGroup asGroup = field.getAsGroup();
|
||||||
|
if(asGroup != null){
|
||||||
|
return asGroup.isPropagateUp();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -119,7 +119,7 @@ public class AssociationToGroupAndNotifyThread extends Thread {
|
||||||
if(group == null)
|
if(group == null)
|
||||||
logger.warn("Unable to retrieve or create group with name " + group);
|
logger.warn("Unable to retrieve or create group with name " + group);
|
||||||
else
|
else
|
||||||
groups.add(new OrganizationBean(group.getTitle(), group.getName(), false));
|
groups.add(new OrganizationBean(group.getTitle(), group.getName(), false, groupToForce.isPropagateUp()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -128,9 +128,8 @@ public class AssociationToGroupAndNotifyThread extends Thread {
|
||||||
|
|
||||||
if(groups != null)
|
if(groups != null)
|
||||||
for (OrganizationBean groupBean : groups) {
|
for (OrganizationBean groupBean : groups) {
|
||||||
boolean putIntoGroup = catalogue.assignDatasetToGroup(groupBean.getName(), datasetId, catalogue.getApiKeyFromUsername(username));
|
boolean putIntoGroup = catalogue.assignDatasetToGroup(groupBean.getName(), datasetId, catalogue.getApiKeyFromUsername(username), groupBean.isPropagateUp());
|
||||||
logger.info("Was product put into group" + groupBean.getTitle() + "? " + putIntoGroup);
|
logger.info("Was product put into group" + groupBean.getTitle() + "? " + putIntoGroup);
|
||||||
|
|
||||||
if(putIntoGroup)
|
if(putIntoGroup)
|
||||||
notifyGroupAdmins(catalogue, groupBean.getName() ,groupBean.getTitle(), username);
|
notifyGroupAdmins(catalogue, groupBean.getName() ,groupBean.getTitle(), username);
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,6 +213,7 @@ public class MetadataDiscovery {
|
||||||
|
|
||||||
FieldAsGroup group = new FieldAsGroup();
|
FieldAsGroup group = new FieldAsGroup();
|
||||||
group.setCreate(grouping.getCreate());
|
group.setCreate(grouping.getCreate());
|
||||||
|
group.setPropagateUp(grouping.getPropagateUp());
|
||||||
group.setGroupingValue(TaggingGroupingValue.valueOf(grouping.getGroupingValue().toString()));
|
group.setGroupingValue(TaggingGroupingValue.valueOf(grouping.getGroupingValue().toString()));
|
||||||
wrapperObj.setAsGroup(group);
|
wrapperObj.setAsGroup(group);
|
||||||
|
|
||||||
|
@ -272,8 +273,4 @@ public class MetadataDiscovery {
|
||||||
return beans;
|
return beans;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static void main(String[] args) throws Exception {
|
|
||||||
// MetadataDiscovery.getMetadataProfilesList("/gcube/devsec/devVRE", null);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ public class OrganizationBean implements Serializable{
|
||||||
private String title;
|
private String title;
|
||||||
private String name;
|
private String name;
|
||||||
private boolean isOrganization;
|
private boolean isOrganization;
|
||||||
|
private boolean propagateUp; // an item linked to this group has to be added on the whole hierarchy chain
|
||||||
|
|
||||||
public OrganizationBean(){
|
public OrganizationBean(){
|
||||||
super();
|
super();
|
||||||
|
@ -24,6 +25,14 @@ public class OrganizationBean implements Serializable{
|
||||||
this.isOrganization = isOrganization;
|
this.isOrganization = isOrganization;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OrganizationBean(String title, String name, boolean isOrganization, boolean propagateUp) {
|
||||||
|
super();
|
||||||
|
this.title = title;
|
||||||
|
this.name = name;
|
||||||
|
this.isOrganization = isOrganization;
|
||||||
|
this.propagateUp = propagateUp;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
@ -48,10 +57,19 @@ public class OrganizationBean implements Serializable{
|
||||||
this.isOrganization = isOrganization;
|
this.isOrganization = isOrganization;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPropagateUp() {
|
||||||
|
return propagateUp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPropagateUp(boolean propagateUp) {
|
||||||
|
this.propagateUp = propagateUp;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "OrganizationBean [title=" + title + ", name=" + name
|
return "OrganizationBean [title=" + title + ", name=" + name
|
||||||
+ ", isOrganization=" + isOrganization + "]";
|
+ ", isOrganization=" + isOrganization + ", propagateUp="
|
||||||
|
+ propagateUp + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,14 +14,15 @@ public class FieldAsGroup implements Serializable{
|
||||||
|
|
||||||
private static final long serialVersionUID = 8096886403417944385L;
|
private static final long serialVersionUID = 8096886403417944385L;
|
||||||
private boolean create;
|
private boolean create;
|
||||||
|
private boolean isPropagateUp;
|
||||||
private TaggingGroupingValue groupingValue;
|
private TaggingGroupingValue groupingValue;
|
||||||
|
|
||||||
public FieldAsGroup() {
|
public FieldAsGroup() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public FieldAsGroup(boolean create, TaggingGroupingValue groupingValue) {
|
public FieldAsGroup(boolean create, TaggingGroupingValue groupingValue, boolean isPropagateUp) {
|
||||||
|
this.isPropagateUp = isPropagateUp;
|
||||||
this.create = create;
|
this.create = create;
|
||||||
this.groupingValue = groupingValue;
|
this.groupingValue = groupingValue;
|
||||||
}
|
}
|
||||||
|
@ -42,10 +43,18 @@ public class FieldAsGroup implements Serializable{
|
||||||
this.groupingValue = groupingValue;
|
this.groupingValue = groupingValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPropagateUp() {
|
||||||
|
return isPropagateUp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPropagateUp(boolean isPropagateUp) {
|
||||||
|
this.isPropagateUp = isPropagateUp;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "FieldAsGroup [create=" + create + ", groupingValue="
|
return "FieldAsGroup [create=" + create + ", isPropagateUp="
|
||||||
+ groupingValue + "]";
|
+ isPropagateUp + ", groupingValue=" + groupingValue + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue