use of org.talend.dq.nodes.ReportFileRepNode in project tdq-studio-se by Talend.
the class LocalRepositoryObjectCRUD method isForbidNode.
/**
* check whether the node is forbidden to drag.
*
* @param sourceNode
* @return
*/
private boolean isForbidNode(IRepositoryNode sourceNode) {
ENodeType type = sourceNode.getType();
// MOD xqliu 2012-05-22 TDQ-4831 allow user to drag Jrxml file
boolean flag = (type != null && type == ENodeType.SYSTEM_FOLDER) || sourceNode instanceof ReportFileRepNode || sourceNode instanceof ReportAnalysisRepNode;
// ~ TDQ-4831
if (!flag) {
RepositoryNode parent = sourceNode.getParent();
if (parent != null) {
flag = parent instanceof AnalysisRepNode || parent instanceof ReportRepNode || (parent instanceof AnalysisSubFolderRepNode && ((AnalysisSubFolderRepNode) parent).getObject() == null);
}
}
return flag;
}
Aggregations