Browse Source

REPORT-62440 延期发布,代码回退

bugfix/11.0
Henry.Wang 3 years ago
parent
commit
8db845854c
  1. 16
      designer-base/src/main/java/com/fr/design/mainframe/authority/AbstractAuthorityCheckerProvider.java
  2. 10
      designer-base/src/main/java/com/fr/design/mainframe/authority/AuthorityCheckerProvider.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/authority/DSColumnAuthorityChecker.java
  4. 6
      designer-base/src/main/java/com/fr/design/mainframe/authority/ElementAuthorityChecker.java
  5. 2
      designer-base/src/main/java/com/fr/design/mainframe/authority/FormulaAuthorityChecker.java
  6. 8
      designer-base/src/main/java/com/fr/design/mainframe/authority/JTemplateAuthorityChecker.java
  7. 2
      designer-base/src/main/java/com/fr/design/mainframe/authority/NameDatabaseConnectionAuthorityChecker.java
  8. 2
      designer-base/src/main/java/com/fr/design/mainframe/authority/NameTableDataAuthorityChecker.java

16
designer-base/src/main/java/com/fr/design/mainframe/authority/AbstractAuthorityCheckerProvider.java

@ -1,16 +0,0 @@
package com.fr.design.mainframe.authority;
import com.fr.stable.fun.mark.API;
@API(level = AuthorityCheckerProvider.CURRENT_LEVEL)
public abstract class AbstractAuthorityCheckerProvider implements AuthorityCheckerProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

10
designer-base/src/main/java/com/fr/design/mainframe/authority/AuthorityCheckerProvider.java

@ -1,10 +0,0 @@
package com.fr.design.mainframe.authority;
import com.fr.stable.fun.mark.Mutable;
public interface AuthorityCheckerProvider extends Mutable {
String XML_TAG = "AuthorityCheckerProvider";
int CURRENT_LEVEL = 1;
ElementAuthorityChecker getElementAuthorityChecker();
}

2
designer-base/src/main/java/com/fr/design/mainframe/authority/DSColumnAuthorityChecker.java

@ -11,7 +11,7 @@ public class DSColumnAuthorityChecker extends ElementAuthorityChecker<DSColumn>
@Override
@Nullable
protected Set<String> getNoAuthDatasetNames(DSColumn dsColumn, Set<String> authDatasetNames) {
Set<String> getNoAuthDatasetNames(DSColumn dsColumn, Set<String> authDatasetNames) {
if (!authDatasetNames.contains(dsColumn.getDSName())) {
return new HashSet<>(Arrays.asList(dsColumn.getDSName()));
}

6
designer-base/src/main/java/com/fr/design/mainframe/authority/ElementAuthorityChecker.java

@ -17,7 +17,7 @@ public abstract class ElementAuthorityChecker<T> {
* @return 如果有返回名称没有返回null
*/
@Nullable
protected Set<String> getNoAuthConnectionNames(T t, Set<String> authConnectionNames) {
Set<String> getNoAuthConnectionNames(T t, Set<String> authConnectionNames) {
return null;
}
@ -29,7 +29,7 @@ public abstract class ElementAuthorityChecker<T> {
* @return 如果有返回名称没有返回null
*/
@Nullable
protected Set<String> getNoAuthDatasetNames(T t, Set<String> authDatasetNames) {
Set<String> getNoAuthDatasetNames(T t, Set<String> authDatasetNames) {
return null;
}
@ -37,7 +37,7 @@ public abstract class ElementAuthorityChecker<T> {
* @Description 要检查对象的className
* @return className
*/
protected String getCheckClassName() {
String getCheckClassName() {
ParameterizedTypeImpl parameterizedType = (ParameterizedTypeImpl) this.getClass().getGenericSuperclass();
Type type = parameterizedType.getActualTypeArguments()[0];
return type.getTypeName();

2
designer-base/src/main/java/com/fr/design/mainframe/authority/FormulaAuthorityChecker.java

@ -29,7 +29,7 @@ public class FormulaAuthorityChecker extends ElementAuthorityChecker<Formula> {
@Override
@Nullable
public Set<String> getNoAuthDatasetNames(Formula formula, Set<String> authDatasetNames) {
Set<String> getNoAuthDatasetNames(Formula formula, Set<String> authDatasetNames) {
return getNoAuthNames(formula, DATASET_NAME_FORMULA_PARSER, authDatasetNames);
}

8
designer-base/src/main/java/com/fr/design/mainframe/authority/JTemplateAuthorityChecker.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe.authority;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.i18n.Toolkit;
@ -69,13 +68,6 @@ public class JTemplateAuthorityChecker {
registerChecker(new DSColumnAuthorityChecker());
registerChecker(new FormulaAuthorityChecker());
registerChecker(new NameTableDataAuthorityChecker());
Set<AuthorityCheckerProvider> authorityCheckerProviders
= ExtraDesignClassManager.getInstance().getArray(AuthorityCheckerProvider.XML_TAG);
for (AuthorityCheckerProvider authorityCheckerProvider : authorityCheckerProviders) {
ElementAuthorityChecker elementAuthorityChecker
= authorityCheckerProvider.getElementAuthorityChecker();
registerChecker(elementAuthorityChecker);
}
}
private void registerChecker(ElementAuthorityChecker checker) {

2
designer-base/src/main/java/com/fr/design/mainframe/authority/NameDatabaseConnectionAuthorityChecker.java

@ -11,7 +11,7 @@ import java.util.stream.Collectors;
public class NameDatabaseConnectionAuthorityChecker extends ElementAuthorityChecker<NameDatabaseConnection> {
@Override
@Nullable
protected Set<String> getNoAuthConnectionNames(NameDatabaseConnection nameDatabaseConnection, Set<String> authConnectionNames) {
Set<String> getNoAuthConnectionNames(NameDatabaseConnection nameDatabaseConnection, Set<String> authConnectionNames) {
String name = nameDatabaseConnection.getName();
if (!authConnectionNames.contains(name)) {
return new HashSet<>(Arrays.asList(name));

2
designer-base/src/main/java/com/fr/design/mainframe/authority/NameTableDataAuthorityChecker.java

@ -10,7 +10,7 @@ import java.util.Set;
public class NameTableDataAuthorityChecker extends ElementAuthorityChecker<NameTableData> {
@Override
@Nullable
protected Set<String> getNoAuthDatasetNames(NameTableData nameTableData, Set<String> authDatasetNames) {
Set<String> getNoAuthDatasetNames(NameTableData nameTableData, Set<String> authDatasetNames) {
if (!authDatasetNames.contains(nameTableData.getName())) {
return new HashSet<>(Arrays.asList(nameTableData.getName()));
}

Loading…
Cancel
Save