NIHVIVO-2254 Clean up the RequestedAction class hierarchy
This commit is contained in:
parent
2f67bd199e
commit
7133857bb9
27 changed files with 55 additions and 133 deletions
|
@ -3,11 +3,9 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
public class AddNewUser implements AdminRequestedAction{
|
/** Should we allow the user to create a user account? */
|
||||||
@Override
|
public class AddNewUser extends RequestedAction implements AdminRequestedAction{
|
||||||
public String getURI() {
|
// no members
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
public class LoadOntology implements AdminRequestedAction{
|
/** Should we allow the user to load an ontology? */
|
||||||
|
public class LoadOntology extends RequestedAction implements AdminRequestedAction{
|
||||||
protected String ontologyUrl;
|
protected String ontologyUrl;
|
||||||
|
|
||||||
public String getOntologyUrl() {
|
public String getOntologyUrl() {
|
||||||
|
@ -15,9 +16,4 @@ public class LoadOntology implements AdminRequestedAction{
|
||||||
public void setOntologyUrl(String ontologyUrl) {
|
public void setOntologyUrl(String ontologyUrl) {
|
||||||
this.ontologyUrl = ontologyUrl;
|
this.ontologyUrl = ontologyUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,8 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
public class RebuildTextIndex implements AdminRequestedAction{
|
public class RebuildTextIndex extends RequestedAction implements AdminRequestedAction{
|
||||||
@Override
|
// no members
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
public class RemoveUser implements AdminRequestedAction{
|
/** Should we allow the user to remove a user account */
|
||||||
|
public class RemoveUser extends RequestedAction implements AdminRequestedAction{
|
||||||
protected String userUri;
|
protected String userUri;
|
||||||
|
|
||||||
public String getUserUri() {
|
public String getUserUri() {
|
||||||
|
@ -15,9 +16,4 @@ public class RemoveUser implements AdminRequestedAction{
|
||||||
public void setUserUri(String userUri) {
|
public void setUserUri(String userUri) {
|
||||||
this.userUri = userUri;
|
this.userUri = userUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,9 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
/**
|
/** Should we allow the user to view information about the server status? */
|
||||||
* Represents a request to view information about the server status.
|
public class ServerStatus extends RequestedAction implements AdminRequestedAction {
|
||||||
* @author bdc34
|
// no members
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ServerStatus implements AdminRequestedAction {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,8 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
public class UpdateTextIndex implements AdminRequestedAction{
|
public class UpdateTextIndex extends RequestedAction implements AdminRequestedAction{
|
||||||
@Override
|
// no fields
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.admin;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.AdminRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
public class UploadFile implements AdminRequestedAction{
|
/** Should we allow the user to upload a file? */
|
||||||
|
public class UploadFile extends RequestedAction implements AdminRequestedAction{
|
||||||
protected String subjectUri;
|
protected String subjectUri;
|
||||||
protected String predicateUri;
|
protected String predicateUri;
|
||||||
|
|
||||||
|
@ -14,9 +15,4 @@ public class UploadFile implements AdminRequestedAction{
|
||||||
this.subjectUri = subjectUri;
|
this.subjectUri = subjectUri;
|
||||||
this.predicateUri = predicateUri;
|
this.predicateUri = predicateUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
||||||
|
|
||||||
public interface AdminRequestedAction extends RequestedAction {
|
/** Denotes an action that is administrative, like adding users, etc. */
|
||||||
|
public interface AdminRequestedAction {
|
||||||
/** marker interface */
|
/** marker interface */
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
||||||
|
|
||||||
public interface OntoRequestedAction extends RequestedAction {
|
/** Denotes an action that relates to manipulating the ontology. */
|
||||||
|
public interface OntoRequestedAction {
|
||||||
/** marker interface */
|
/** marker interface */
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
||||||
|
|
||||||
/* Represents a request to perform an action. */
|
/* Represents a request to perform an action. */
|
||||||
public interface RequestedAction {
|
public abstract class RequestedAction {
|
||||||
/**
|
/**
|
||||||
* In its most basic form, a RequestAction needs to have an identifier.
|
* In its most basic form, a RequestAction needs to have an identifier.
|
||||||
* Sometimes this will be enough. For example ServerStatusRequest.
|
* Sometimes this will be enough.
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public String getURI();
|
public final String getURI() {
|
||||||
|
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
||||||
|
|
||||||
public abstract class SingleParameterAction implements RequestedAction {
|
/**
|
||||||
|
* A base class for actions that involve a single URI.
|
||||||
|
*/
|
||||||
|
public abstract class SingleParameterAction extends RequestedAction {
|
||||||
protected String subjectUri;
|
protected String subjectUri;
|
||||||
|
|
||||||
public String getSubjectUri() {
|
public String getSubjectUri() {
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces;
|
|
||||||
|
|
||||||
public abstract class TwoParameterAction implements RequestedAction {
|
|
||||||
protected String resourceUri;
|
|
||||||
protected String secondUri;
|
|
||||||
|
|
||||||
public String getResourceUri() {
|
|
||||||
return resourceUri;
|
|
||||||
}
|
|
||||||
public void setResourceUri(String resourceUri) {
|
|
||||||
this.resourceUri = resourceUri;
|
|
||||||
}
|
|
||||||
public String getSecondUri() {
|
|
||||||
return secondUri;
|
|
||||||
}
|
|
||||||
public void setSecondUri(String secondUri) {
|
|
||||||
this.secondUri = secondUri;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -3,13 +3,9 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
||||||
|
|
||||||
|
/** Should we allow the user to create a new class in the ontology? */
|
||||||
public class CreateOwlClass extends SingleParameterAction implements OntoRequestedAction {
|
public class CreateOwlClass extends SingleParameterAction implements OntoRequestedAction {
|
||||||
|
// no fields
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,9 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
||||||
|
|
||||||
|
/** Should we allow the user to define a data property in the ontology? */
|
||||||
public class DefineDataProperty extends SingleParameterAction implements OntoRequestedAction{
|
public class DefineDataProperty extends SingleParameterAction implements OntoRequestedAction{
|
||||||
@Override
|
// no fields
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,9 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
||||||
|
|
||||||
|
/** Should we allow the user to define a new object property in the ontology? */
|
||||||
public class DefineObjectProperty extends SingleParameterAction implements OntoRequestedAction{
|
public class DefineObjectProperty extends SingleParameterAction implements OntoRequestedAction{
|
||||||
|
// no fields
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,9 @@
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ontology;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.OntoRequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.SingleParameterAction;
|
||||||
|
|
||||||
|
/** Should we allow the user to remove a class from the ontology? */
|
||||||
public class RemoveOwlClass extends SingleParameterAction implements OntoRequestedAction{
|
public class RemoveOwlClass extends SingleParameterAction implements OntoRequestedAction{
|
||||||
@Override
|
// no fields
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace + this.getClass().getName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A base class for requestion actions that relate to data properties.
|
* A base class for requestion actions that relate to data properties.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractDataPropertyAction implements RequestedAction {
|
public abstract class AbstractDataPropertyAction extends RequestedAction {
|
||||||
private final String subjectUri;
|
private final String subjectUri;
|
||||||
private final String predicateUri;
|
private final String predicateUri;
|
||||||
|
|
||||||
|
@ -25,12 +24,6 @@ public abstract class AbstractDataPropertyAction implements RequestedAction {
|
||||||
return predicateUri;
|
return predicateUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace
|
|
||||||
+ this.getClass().getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getClass().getSimpleName() + ": <" + subjectUri + "> <"
|
return getClass().getSimpleName() + ": <" + subjectUri + "> <"
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A base class for requested actions that involve manipulating an object
|
* A base class for requested actions that involve manipulating an object
|
||||||
* property.
|
* property.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractObjectPropertyAction implements RequestedAction {
|
public abstract class AbstractObjectPropertyAction extends RequestedAction {
|
||||||
public final String uriOfSubject;
|
public final String uriOfSubject;
|
||||||
public final String uriOfPredicate;
|
public final String uriOfPredicate;
|
||||||
public final String uriOfObject;
|
public final String uriOfObject;
|
||||||
|
@ -33,12 +32,6 @@ public abstract class AbstractObjectPropertyAction implements RequestedAction {
|
||||||
return uriOfObject;
|
return uriOfObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace
|
|
||||||
+ this.getClass().getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.getClass().getSimpleName() + ": <" + uriOfSubject + "> <"
|
return this.getClass().getSimpleName() + ": <" + uriOfSubject + "> <"
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
|
|
||||||
|
/** Should we allow the user to add this DataPropertyStatement? */
|
||||||
public class AddDataPropStmt extends AbstractDataPropertyAction {
|
public class AddDataPropStmt extends AbstractDataPropertyAction {
|
||||||
|
|
||||||
protected String data;
|
protected String data;
|
||||||
protected String dataType;
|
protected String dataType;
|
||||||
protected String lang;
|
protected String lang;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
|
|
||||||
|
/** Should we allow the user to add this ObjectPropertyStatement? */
|
||||||
public class AddObjectPropStmt extends AbstractObjectPropertyAction {
|
public class AddObjectPropStmt extends AbstractObjectPropertyAction {
|
||||||
|
|
||||||
public AddObjectPropStmt(String uriOfSub, String uriOfPred, String uriOfObj) {
|
public AddObjectPropStmt(String uriOfSub, String uriOfPred, String uriOfObj) {
|
||||||
|
|
|
@ -5,6 +5,7 @@ package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
|
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatementImpl;
|
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatementImpl;
|
||||||
|
|
||||||
|
/** Should we allow the user to delete this DataPropertyStatement? */
|
||||||
public class DropDataPropStmt extends AbstractDataPropertyAction {
|
public class DropDataPropStmt extends AbstractDataPropertyAction {
|
||||||
|
|
||||||
private final DataPropertyStatement dataPropStmt;
|
private final DataPropertyStatement dataPropStmt;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
|
|
||||||
|
/** Should we allow the user to delete this ObjectPropertyStatement? */
|
||||||
public class DropObjectPropStmt extends AbstractObjectPropertyAction {
|
public class DropObjectPropStmt extends AbstractObjectPropertyAction {
|
||||||
|
|
||||||
public DropObjectPropStmt(String sub, String pred, String obj) {
|
public DropObjectPropStmt(String sub, String pred, String obj) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
|
import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement;
|
||||||
|
|
||||||
|
/** Should we allow the user to edit this DataPropertyStatement? */
|
||||||
public class EditDataPropStmt extends AbstractDataPropertyAction {
|
public class EditDataPropStmt extends AbstractDataPropertyAction {
|
||||||
|
|
||||||
private final DataPropertyStatement dataPropStmt;
|
private final DataPropertyStatement dataPropStmt;
|
||||||
|
|
|
@ -4,6 +4,7 @@ package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement;
|
import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement;
|
||||||
|
|
||||||
|
/** Should we allow the user to edit this ObjectPropertyStatement? */
|
||||||
public class EditObjPropStmt extends AbstractObjectPropertyAction {
|
public class EditObjPropStmt extends AbstractObjectPropertyAction {
|
||||||
|
|
||||||
public EditObjPropStmt(ObjectPropertyStatement ops) {
|
public EditObjPropStmt(ObjectPropertyStatement ops) {
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestActionConstants;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A common base class for resource-related actions.
|
* A common base class for resource-related actions.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractResourceAction implements RequestedAction {
|
public abstract class AbstractResourceAction extends RequestedAction {
|
||||||
private final String typeUri;
|
private final String typeUri;
|
||||||
private final String subjectUri;
|
private final String subjectUri;
|
||||||
|
|
||||||
|
@ -27,15 +26,8 @@ public abstract class AbstractResourceAction implements RequestedAction {
|
||||||
return subjectUri;
|
return subjectUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getURI() {
|
|
||||||
return RequestActionConstants.actionNamespace
|
|
||||||
+ this.getClass().getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.getClass().getSimpleName() + " <" + subjectUri + ">";
|
return this.getClass().getSimpleName() + " <" + subjectUri + ">";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource;
|
||||||
|
|
||||||
|
/** Should we allow the user to add a Resource to the model? */
|
||||||
public class AddResource extends AbstractResourceAction {
|
public class AddResource extends AbstractResourceAction {
|
||||||
|
|
||||||
public AddResource(String typeUri, String subjectUri) {
|
public AddResource(String typeUri, String subjectUri) {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource;
|
package edu.cornell.mannlib.vitro.webapp.auth.requestedAction.resource;
|
||||||
|
|
||||||
|
/** Should we allow the user to delete a Resource from the model? */
|
||||||
public class DropResource extends AbstractResourceAction {
|
public class DropResource extends AbstractResourceAction {
|
||||||
|
|
||||||
public DropResource(String typeUri, String subjectUri) {
|
public DropResource(String typeUri, String subjectUri) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue