projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve CMS View.
[lgpl/argeo-commons.git]
/
org.argeo.cms.ui
/
src
/
org
/
argeo
/
cms
/
ui
/
CmsView.java
diff --git
a/org.argeo.cms.ui/src/org/argeo/cms/ui/CmsView.java
b/org.argeo.cms.ui/src/org/argeo/cms/ui/CmsView.java
index dcc1f1fd16b8b747723382dc071927e1246cb0ae..e18d4b4330d3098a6c8178fa71f1cda29382497b 100644
(file)
--- a/
org.argeo.cms.ui/src/org/argeo/cms/ui/CmsView.java
+++ b/
org.argeo.cms.ui/src/org/argeo/cms/ui/CmsView.java
@@
-61,10
+61,22
@@
public interface CmsView {
default <T> T doAs(PrivilegedAction<T> action) {
throw new UnsupportedOperationException();
}
default <T> T doAs(PrivilegedAction<T> action) {
throw new UnsupportedOperationException();
}
-
+
+ default Void runAs(Runnable runnable) {
+ return doAs(new PrivilegedAction<Void>() {
+
+ @Override
+ public Void run() {
+ if (runnable != null)
+ runnable.run();
+ return null;
+ }
+ });
+ }
+
default void stateChanged(String state, String title) {
}
default void stateChanged(String state, String title) {
}
-
+
default CmsSession getCmsSession() {
throw new UnsupportedOperationException();
}
default CmsSession getCmsSession() {
throw new UnsupportedOperationException();
}