forked from vivo-project/Vitro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: removed not needed type constructor from NamedAccessObject, r…
…euse it for IndividualAccessObject
- Loading branch information
Showing
4 changed files
with
5 additions
and
26 deletions.
There are no files selected for viewing
17 changes: 2 additions & 15 deletions
17
api/src/main/java/edu/cornell/mannlib/vitro/webapp/auth/objects/IndividualAccessObject.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,15 @@ | ||
package edu.cornell.mannlib.vitro.webapp.auth.objects; | ||
|
||
import java.util.Optional; | ||
|
||
import edu.cornell.mannlib.vitro.webapp.auth.attributes.AccessObjectType; | ||
|
||
public class IndividualAccessObject extends AccessObject { | ||
|
||
private final String uri; | ||
public class IndividualAccessObject extends NamedAccessObject { | ||
|
||
public IndividualAccessObject(String uri) { | ||
this.uri = uri; | ||
super(uri); | ||
} | ||
|
||
@Override | ||
public AccessObjectType getType() { | ||
return AccessObjectType.INDIVIDUAL; | ||
} | ||
|
||
@Override | ||
public Optional<String> getUri() { | ||
if (uri == null) { | ||
return Optional.empty(); | ||
} | ||
return Optional.of(uri); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters