mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 12:45:35 +00:00
Removed method parameter by introducing specific handling for
ExpeditionDeviceConfiguration that has the server name included in the type relative object identifier
This commit is contained in:
+3
@@ -1,6 +1,9 @@
|
||||
package com.sap.sailing.domain.common;
|
||||
|
||||
import com.sap.sse.security.shared.TypeRelativeObjectIdentifier;
|
||||
import com.sap.sse.security.shared.WithQualifiedObjectIdentifier;
|
||||
|
||||
public interface RegattaAndRaceIdentifier extends RegattaIdentifier, RaceIdentifier, WithQualifiedObjectIdentifier {
|
||||
|
||||
TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier();
|
||||
}
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ public class RegattaNameAndRaceName extends RegattaName implements RegattaAndRac
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public class BoatDTO extends NamedSecuredObjectDTO implements WithID, Serializab
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(idAsString);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ public class CompetitorDTOImpl extends NamedSecuredObjectDTO implements Competit
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(idAsString);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@ public class PreviousCompetitorDTOImpl extends NamedSecuredObjectDTO implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(getId().toString());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ public class RaceDTO extends BasicRaceDTO implements SecuredDTO {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(regattaName, getName());
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -179,8 +179,7 @@ public class MediaTrack implements Serializable, WithQualifiedObjectIdentifier {
|
||||
return SecuredDomainType.MEDIA_TRACK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -27,8 +27,7 @@ public interface Account extends WithQualifiedObjectIdentifier {
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
@Override
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -137,8 +137,7 @@ public class BoatImpl extends RenamableImpl implements DynamicBoat {
|
||||
return SecuredDomainType.BOAT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -257,8 +257,7 @@ public class CompetitorImpl implements DynamicCompetitor {
|
||||
return SecuredDomainType.COMPETITOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -383,8 +383,7 @@ public abstract class EventBaseImpl implements EventBase {
|
||||
return SecuredDomainType.EVENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public abstract class LeaderboardGroupBaseImpl implements LeaderboardGroupBase {
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -25,8 +25,7 @@ public interface SwissTimingArchiveConfiguration extends WithQualifiedObjectIden
|
||||
return SecuredDomainType.SWISS_TIMING_ARCHIVE_ACCOUNT;
|
||||
}
|
||||
|
||||
@Override
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(getJsonURL());
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -37,8 +37,7 @@ public interface SwissTimingConfiguration extends WithQualifiedObjectIdentifier
|
||||
return SecuredDomainType.SWISS_TIMING_ACCOUNT;
|
||||
}
|
||||
|
||||
@Override
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(getJsonURL());
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -49,8 +49,7 @@ public interface TracTracConfiguration extends WithQualifiedObjectIdentifier {
|
||||
return SecuredDomainType.TRACTRAC_ACCOUNT;
|
||||
}
|
||||
|
||||
@Override
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(getJSONURL());
|
||||
}
|
||||
|
||||
|
||||
@@ -248,8 +248,7 @@ public interface Regatta
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
@Override
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(getName());
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -45,8 +45,7 @@ public class LeaderboardBaseImpl implements LeaderboardBase {
|
||||
return SecuredDomainType.LEADERBOARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -625,8 +625,7 @@ public interface Leaderboard extends LeaderboardBase, HasRaceColumns {
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
@Override
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -1145,8 +1145,7 @@ public interface TrackedRace
|
||||
return regattaAndRaceId.getTypeRelativeObjectIdentifier();
|
||||
}
|
||||
|
||||
@Override
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
default TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(getRaceIdentifier());
|
||||
}
|
||||
|
||||
|
||||
-6
@@ -15,7 +15,6 @@ import com.sap.sse.common.IsManagedByCache;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.security.shared.HasPermissions;
|
||||
import com.sap.sse.security.shared.QualifiedObjectIdentifier;
|
||||
import com.sap.sse.security.shared.TypeRelativeObjectIdentifier;
|
||||
|
||||
public class DummyMarkPassingWithTimePointOnly implements MarkPassing {
|
||||
private static final long serialVersionUID = -5494669910047887984L;
|
||||
@@ -132,11 +131,6 @@ public class DummyMarkPassingWithTimePointOnly implements MarkPassing {
|
||||
public HasPermissions getType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+3
-13
@@ -6,11 +6,9 @@ import java.util.UUID;
|
||||
import com.sap.sailing.domain.common.security.SecuredDomainType;
|
||||
import com.sap.sse.common.impl.NamedImpl;
|
||||
import com.sap.sse.security.shared.HasPermissions;
|
||||
import com.sap.sse.security.shared.QualifiedObjectIdentifier;
|
||||
import com.sap.sse.security.shared.TypeRelativeObjectIdentifier;
|
||||
import com.sap.sse.security.shared.WithQualifiedObjectIdentifier;
|
||||
|
||||
public class ExpeditionDeviceConfiguration extends NamedImpl implements Serializable, WithQualifiedObjectIdentifier {
|
||||
public class ExpeditionDeviceConfiguration extends NamedImpl implements Serializable {
|
||||
private static final long serialVersionUID = -7819154195403387909L;
|
||||
|
||||
private final UUID deviceUuid;
|
||||
@@ -78,26 +76,18 @@ public class ExpeditionDeviceConfiguration extends NamedImpl implements Serializ
|
||||
+ ", getName()=" + getName() + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public QualifiedObjectIdentifier getIdentifier() {
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get TypeRelativeObjectIdentifer. Needs a parameter for the servername passed as a String parameter.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
return getTypeRelativeObjectIdentifier(params[0], getName());
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String serverName) {
|
||||
return getTypeRelativeObjectIdentifier(serverName, getName());
|
||||
}
|
||||
|
||||
public static TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String serverName, String name) {
|
||||
return new TypeRelativeObjectIdentifier(serverName, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HasPermissions getType() {
|
||||
return SecuredDomainType.EXPEDITION_DEVICE_CONFIGURATION;
|
||||
}
|
||||
|
||||
+3
-1
@@ -7861,7 +7861,9 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
final Subject subject = SecurityUtils.getSubject();
|
||||
if (expeditionConnector != null) {
|
||||
for (final ExpeditionDeviceConfiguration config : expeditionConnector.getDeviceConfigurations()) {
|
||||
if (subject.isPermitted(SecuredDomainType.EXPEDITION_DEVICE_CONFIGURATION.getStringPermissionForObject(DefaultActions.READ, config))) {
|
||||
if (subject.isPermitted(
|
||||
SecuredDomainType.EXPEDITION_DEVICE_CONFIGURATION.getStringPermissionForTypeRelativeIdentifier(
|
||||
DefaultActions.READ, config.getTypeRelativeObjectIdentifier(ServerInfo.getName())))) {
|
||||
result.add(config);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ public class EventDTO extends EventBaseDTO implements SecuredDTO {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(getId().toString());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ public class LeaderboardGroupBaseDTO extends NamedSecuredObjectDTO implements Wi
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(id.toString());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ public class RegattaDTO extends NamedSecuredObjectDTO implements SecuredDTO {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(getName());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class StrippedLeaderboardDTOWithSecurity extends StrippedLeaderboardDTO i
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(getName());
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ public class ServerInfoDTO implements IsSerializable, WithQualifiedObjectIdentif
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this.serverName);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -112,8 +112,7 @@ public class RoleDefinitionImpl implements RoleDefinition {
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,8 +96,7 @@ public abstract class RolePrototype implements RoleDefinition {
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -51,8 +51,7 @@ public abstract class SecurityUserGroupImpl implements NamedWithID, WithQualifie
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return UserGroupImpl.getTypeRelativeObjectIdentifier(getId());
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -4,6 +4,5 @@ import com.sap.sse.common.Named;
|
||||
|
||||
public interface WithQualifiedObjectIdentifier extends Named {
|
||||
QualifiedObjectIdentifier getIdentifier();
|
||||
TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params);
|
||||
HasPermissions getType();
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ public interface SecuredDTO {
|
||||
|
||||
OwnershipDTO getOwnership();
|
||||
|
||||
TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params);
|
||||
TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier();
|
||||
|
||||
void setAccessControlList(AccessControlListDTO createAccessControlListDTO);
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class SecurityInformationDTO implements SecuredDTO, Serializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return typeRelativeObjectIdentifier;
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ public class UserDTO extends SecurityUserImpl<RoleDefinitionDTO, RoleDTO, Stripp
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(getName());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class UserGroupDTO extends AbstractUserGroupImpl<StrippedUserDTO> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return new TypeRelativeObjectIdentifier(getId().toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -76,12 +76,6 @@ public class HasPermissionsTest {
|
||||
public HasPermissions getType() {
|
||||
return h;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
-6
@@ -8,7 +8,6 @@ import com.sap.sse.security.shared.Account;
|
||||
import com.sap.sse.security.shared.Account.AccountType;
|
||||
import com.sap.sse.security.shared.HasPermissions;
|
||||
import com.sap.sse.security.shared.QualifiedObjectIdentifier;
|
||||
import com.sap.sse.security.shared.TypeRelativeObjectIdentifier;
|
||||
import com.sap.sse.security.shared.WildcardPermission;
|
||||
import com.sap.sse.security.shared.impl.Role;
|
||||
import com.sap.sse.security.shared.impl.User;
|
||||
@@ -192,9 +191,4 @@ public class UserProxy implements User {
|
||||
public void setDefaultTenant(UserGroup newDefaultTenant, String serverName) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,8 +365,7 @@ public class UserImpl extends SecurityUserImpl<RoleDefinition, Role, UserGroup>
|
||||
return getType().getQualifiedObjectIdentifier(getTypeRelativeObjectIdentifier());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier(String... params) {
|
||||
public TypeRelativeObjectIdentifier getTypeRelativeObjectIdentifier() {
|
||||
return getTypeRelativeObjectIdentifier(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user