Fixing naming

This commit is contained in:
Luca Frosini 2024-10-23 10:58:20 +02:00
parent 924b370a81
commit dafc4e5639
1 changed files with 7 additions and 7 deletions

View File

@ -87,7 +87,7 @@ public abstract class SystemEnvironment {
} }
} }
protected final UUID environmentId; protected final UUID environmentUUID;
protected final Map<Boolean,Map<PermissionMode,ODatabasePool>> poolMap; protected final Map<Boolean,Map<PermissionMode,ODatabasePool>> poolMap;
@ -121,7 +121,7 @@ public abstract class SystemEnvironment {
} }
protected SystemEnvironment(UUID context, boolean hierarchical) throws ResourceRegistryException { protected SystemEnvironment(UUID context, boolean hierarchical) throws ResourceRegistryException {
this.environmentId = context; this.environmentUUID = context;
this.poolMap = new HashMap<>(); this.poolMap = new HashMap<>();
this.allowedRoles = new HashSet<>(SystemEnvironment.allOperationAllowedRoles); this.allowedRoles = new HashSet<>(SystemEnvironment.allOperationAllowedRoles);
@ -299,7 +299,7 @@ public abstract class SystemEnvironment {
} }
public UUID getUUID() { public UUID getUUID() {
return environmentId; return environmentUUID;
} }
public static String getRoleOrUserName(PermissionMode permissionMode, SecurityType securityType) { public static String getRoleOrUserName(PermissionMode permissionMode, SecurityType securityType) {
@ -322,7 +322,7 @@ public abstract class SystemEnvironment {
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(getRoleOrUserName(permissionMode, securityType, hierarchic)); stringBuilder.append(getRoleOrUserName(permissionMode, securityType, hierarchic));
stringBuilder.append("_"); stringBuilder.append("_");
stringBuilder.append(environmentId.toString()); stringBuilder.append(environmentUUID.toString());
return stringBuilder.toString(); return stringBuilder.toString();
} }
@ -624,7 +624,7 @@ public abstract class SystemEnvironment {
public void create(ODatabaseDocument oDatabaseDocument) { public void create(ODatabaseDocument oDatabaseDocument) {
OSecurity oSecurity = getOSecurity(oDatabaseDocument); OSecurity oSecurity = getOSecurity(oDatabaseDocument);
createRolesAndUsers(oSecurity); createRolesAndUsers(oSecurity);
logger.trace("Security Context (roles and users) with UUID {} successfully created", environmentId.toString()); logger.trace("Security Context (roles and users) with UUID {} successfully created", environmentUUID.toString());
} }
private void drop(OSecurity oSecurity, String name, SecurityType securityType) { private void drop(OSecurity oSecurity, String name, SecurityType securityType) {
@ -731,9 +731,9 @@ public abstract class SystemEnvironment {
} }
private void delete(OSecurity oSecurity) { private void delete(OSecurity oSecurity) {
logger.trace("Going to remove Security Context (roles and users) with UUID {}", environmentId.toString()); logger.trace("Going to remove Security Context (roles and users) with UUID {}", environmentUUID.toString());
deleteRolesAndUsers(oSecurity); deleteRolesAndUsers(oSecurity);
logger.trace("Security Context (roles and users) with UUID {} successfully removed", environmentId.toString()); logger.trace("Security Context (roles and users) with UUID {} successfully removed", environmentUUID.toString());
} }
public ODatabaseDocument getDatabaseDocument(PermissionMode permissionMode) throws ResourceRegistryException { public ODatabaseDocument getDatabaseDocument(PermissionMode permissionMode) throws ResourceRegistryException {