|
|
|
@ -1,6 +1,11 @@
|
|
|
|
|
package com.fr.design.mainframe.authority; |
|
|
|
|
|
|
|
|
|
import com.fr.base.CloneCollector; |
|
|
|
|
import com.fr.base.Formula; |
|
|
|
|
import com.fr.data.impl.NameDatabaseConnection; |
|
|
|
|
import com.fr.data.impl.NameTableData; |
|
|
|
|
import com.fr.report.cell.cellattr.core.group.DSColumn; |
|
|
|
|
import com.fr.stable.FCloneable; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
@ -9,13 +14,24 @@ import java.util.List;
|
|
|
|
|
public class AuthorityTargetObjectCollector extends CloneCollector { |
|
|
|
|
List<Object> targetObject = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
public AuthorityTargetObjectCollector(FCloneable rootObject) { |
|
|
|
|
super(rootObject); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void collect(Object object) { |
|
|
|
|
targetObject.add(object); |
|
|
|
|
if (object instanceof DSColumn || object instanceof Formula |
|
|
|
|
|| object instanceof NameDatabaseConnection || object instanceof NameTableData) { |
|
|
|
|
targetObject.add(object); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<Object> getTargetObject() { |
|
|
|
|
public List<Object> collectTargetObject() { |
|
|
|
|
CloneCollector.setCollector(this); |
|
|
|
|
this.targetObject = new ArrayList<>(); |
|
|
|
|
this.collect(); |
|
|
|
|
CloneCollector.clearCollector(); |
|
|
|
|
return targetObject; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|