[New] Added StrolchElementQuery.internal()
This commit is contained in:
parent
1779bcc99f
commit
fa7309cb19
|
@ -101,7 +101,7 @@ public class StrolchConstants {
|
||||||
public static final String PRIVILEGE_INVALIDATE_SESSION = "InvalidateSession";
|
public static final String PRIVILEGE_INVALIDATE_SESSION = "InvalidateSession";
|
||||||
public static final String PRIVILEGE_GET_SESSION = "GetSession";
|
public static final String PRIVILEGE_GET_SESSION = "GetSession";
|
||||||
|
|
||||||
public static final String INTERNAL = "internal";
|
public static final String INTERNAL = StrolchModelConstants.INTERNAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class PolicyConstants {
|
public static class PolicyConstants {
|
||||||
|
|
|
@ -55,4 +55,6 @@ public class StrolchModelConstants {
|
||||||
* This uom value indicates that the {@link Parameter} has no defined uom
|
* This uom value indicates that the {@link Parameter} has no defined uom
|
||||||
*/
|
*/
|
||||||
public static final String UOM_NONE = "None"; //$NON-NLS-1$
|
public static final String UOM_NONE = "None"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public static final String INTERNAL = "internal";
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,12 @@ public class ActivityQuery<U> extends StrolchElementQuery<ActivityQueryVisitor>
|
||||||
return this.activityVisitor;
|
return this.activityVisitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActivityQuery<U> internal() {
|
||||||
|
super.internal();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ActivityQuery<U> setActivityVisitor(ActivityVisitor<U> activityVisitor) {
|
public ActivityQuery<U> setActivityVisitor(ActivityVisitor<U> activityVisitor) {
|
||||||
DBC.PRE.assertNotNull("activityVisitor", activityVisitor);
|
DBC.PRE.assertNotNull("activityVisitor", activityVisitor);
|
||||||
this.activityVisitor = activityVisitor;
|
this.activityVisitor = activityVisitor;
|
||||||
|
|
|
@ -60,6 +60,12 @@ public class OrderQuery<U> extends StrolchElementQuery<OrderQueryVisitor> {
|
||||||
return this.orderVisitor;
|
return this.orderVisitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrderQuery<U> internal() {
|
||||||
|
super.internal();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public OrderQuery<U> setOrderVisitor(OrderVisitor<U> orderVisitor) {
|
public OrderQuery<U> setOrderVisitor(OrderVisitor<U> orderVisitor) {
|
||||||
DBC.PRE.assertNotNull("orderVisitor", orderVisitor);
|
DBC.PRE.assertNotNull("orderVisitor", orderVisitor);
|
||||||
this.orderVisitor = orderVisitor;
|
this.orderVisitor = orderVisitor;
|
||||||
|
|
|
@ -60,6 +60,12 @@ public class ResourceQuery<U> extends StrolchElementQuery<ResourceQueryVisitor>
|
||||||
return this.resourceVisitor;
|
return this.resourceVisitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResourceQuery<U> internal() {
|
||||||
|
super.internal();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ResourceQuery<U> setResourceVisitor(ResourceVisitor<U> resourceVisitor) {
|
public ResourceQuery<U> setResourceVisitor(ResourceVisitor<U> resourceVisitor) {
|
||||||
DBC.PRE.assertNotNull("resourceVisitor", resourceVisitor);
|
DBC.PRE.assertNotNull("resourceVisitor", resourceVisitor);
|
||||||
this.resourceVisitor = resourceVisitor;
|
this.resourceVisitor = resourceVisitor;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
*/
|
*/
|
||||||
package li.strolch.model.query;
|
package li.strolch.model.query;
|
||||||
|
|
||||||
|
import li.strolch.model.StrolchModelConstants;
|
||||||
import li.strolch.utils.dbc.DBC;
|
import li.strolch.utils.dbc.DBC;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +37,17 @@ public abstract class StrolchElementQuery<T extends QueryVisitor> implements Str
|
||||||
this.navigation = navigation;
|
this.navigation = navigation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks this query as an internal query, thus allowing it to be performed without the authenticated user to need
|
||||||
|
* the required privilege
|
||||||
|
*
|
||||||
|
* @return this object for chaining
|
||||||
|
*/
|
||||||
|
public StrolchElementQuery<T> internal() {
|
||||||
|
this.privilegeValue = StrolchModelConstants.INTERNAL;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public void setPrivilegeValue(String privilegeValue) {
|
public void setPrivilegeValue(String privilegeValue) {
|
||||||
this.privilegeValue = privilegeValue;
|
this.privilegeValue = privilegeValue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue