Updated Rules
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@114358 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
24f61b503c
commit
3f208a8026
|
@ -9484,16 +9484,24 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
"Error in apply rules on column: No column selected.");
|
||||
}
|
||||
|
||||
ArrayList<RuleDescriptionData> rules=applyColumnRulesSession.getRules();
|
||||
ArrayList<RuleId> ruleIds=new ArrayList<RuleId>();
|
||||
for(RuleDescriptionData r:rules){
|
||||
RuleId ruleId=new RuleId(r.getId());
|
||||
ruleIds.add(ruleId);
|
||||
}
|
||||
|
||||
ColumnLocalId columnLocalId=new ColumnLocalId(column.getColumnId());
|
||||
|
||||
Task trTask = service.applyColumnRule(tabularResourceId, columnLocalId,ruleIds );
|
||||
ArrayList<RuleDescriptionData> rulesThatWillBeDetach=applyColumnRulesSession.getRulesThatWillBeDetached();
|
||||
ArrayList<RuleId> ruleIdsDetach=new ArrayList<RuleId>();
|
||||
for(RuleDescriptionData r:rulesThatWillBeDetach){
|
||||
RuleId ruleDetachId=new RuleId(r.getId());
|
||||
ruleIdsDetach.add(ruleDetachId);
|
||||
}
|
||||
service.detachColumnRules(tabularResourceId, columnLocalId,ruleIdsDetach );
|
||||
|
||||
|
||||
ArrayList<RuleDescriptionData> rulesThatWillBeApplied=applyColumnRulesSession.getRulesThatWillBeApplied();
|
||||
ArrayList<RuleId> ruleIdsApplied=new ArrayList<RuleId>();
|
||||
for(RuleDescriptionData r:rulesThatWillBeApplied){
|
||||
RuleId ruleAppliedId=new RuleId(r.getId());
|
||||
ruleIdsApplied.add(ruleAppliedId);
|
||||
}
|
||||
Task trTask = service.applyColumnRule(tabularResourceId, columnLocalId,ruleIdsApplied );
|
||||
logger.debug("Rules On Column Apply: TaskId "
|
||||
+ trTask.getId());
|
||||
|
||||
|
|
|
@ -17,18 +17,28 @@ public class ApplyColumnRulesSession implements Serializable {
|
|||
private static final long serialVersionUID = -7746819321348425711L;
|
||||
private TRId trId;
|
||||
private ColumnData column;
|
||||
private ArrayList<RuleDescriptionData> rules;
|
||||
private ArrayList<RuleDescriptionData> rulesThatWillBeApplied;
|
||||
private ArrayList<RuleDescriptionData> rulesThatWillBeDetached;
|
||||
|
||||
public ApplyColumnRulesSession() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param trId
|
||||
* @param column
|
||||
* @param rulesThatWillBeApplied
|
||||
* @param rulesThatWillBeDetached
|
||||
*/
|
||||
public ApplyColumnRulesSession(TRId trId, ColumnData column,
|
||||
ArrayList<RuleDescriptionData> rules) {
|
||||
ArrayList<RuleDescriptionData> rulesThatWillBeApplied,
|
||||
ArrayList<RuleDescriptionData> rulesThatWillBeDetached) {
|
||||
super();
|
||||
this.trId = trId;
|
||||
this.column = column;
|
||||
this.rules = rules;
|
||||
this.rulesThatWillBeApplied = rulesThatWillBeApplied;
|
||||
this.rulesThatWillBeDetached = rulesThatWillBeDetached;
|
||||
}
|
||||
|
||||
public TRId getTrId() {
|
||||
|
@ -47,22 +57,29 @@ public class ApplyColumnRulesSession implements Serializable {
|
|||
this.column = column;
|
||||
}
|
||||
|
||||
public ArrayList<RuleDescriptionData> getRules() {
|
||||
return rules;
|
||||
public ArrayList<RuleDescriptionData> getRulesThatWillBeApplied() {
|
||||
return rulesThatWillBeApplied;
|
||||
}
|
||||
|
||||
public void setRules(ArrayList<RuleDescriptionData> rules) {
|
||||
this.rules = rules;
|
||||
public void setRulesThatWillBeApplied(
|
||||
ArrayList<RuleDescriptionData> rulesThatWillBeApplied) {
|
||||
this.rulesThatWillBeApplied = rulesThatWillBeApplied;
|
||||
}
|
||||
|
||||
public ArrayList<RuleDescriptionData> getRulesThatWillBeDetached() {
|
||||
return rulesThatWillBeDetached;
|
||||
}
|
||||
|
||||
public void setRulesThatWillBeDetached(
|
||||
ArrayList<RuleDescriptionData> rulesThatWillBeDetached) {
|
||||
this.rulesThatWillBeDetached = rulesThatWillBeDetached;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ApplyColumnRulesSession [trId=" + trId + ", column=" + column
|
||||
+ ", rules=" + rules + "]";
|
||||
+ ", rulesThatWillBeApplied=" + rulesThatWillBeApplied
|
||||
+ ", rulesThatWillBeDetached=" + rulesThatWillBeDetached + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue