Major refactoring of Argeo CMS UI
[lgpl/argeo-commons.git] / org.argeo.api / src / org / argeo / api / cms / CmsSession.java
diff --git a/org.argeo.api/src/org/argeo/api/cms/CmsSession.java b/org.argeo.api/src/org/argeo/api/cms/CmsSession.java
new file mode 100644 (file)
index 0000000..18d53ce
--- /dev/null
@@ -0,0 +1,40 @@
+package org.argeo.api.cms;
+
+import java.time.ZonedDateTime;
+import java.util.Locale;
+import java.util.UUID;
+
+import javax.naming.ldap.LdapName;
+import javax.security.auth.Subject;
+
+/** An authenticated user session. */
+public interface CmsSession {
+       final static String USER_DN = "DN";
+       final static String SESSION_UUID = "entryUUID";
+       final static String SESSION_LOCAL_ID = "uniqueIdentifier";
+
+       UUID getUuid();
+
+       String getUserRole();
+       
+       LdapName getUserDn();
+
+       String getLocalId();
+
+       String getDisplayName();
+//     Authorization getAuthorization();
+       
+       Subject getSubject();
+
+       boolean isAnonymous();
+
+       ZonedDateTime getCreationTime();
+
+       ZonedDateTime getEnd();
+
+       Locale getLocale();
+
+       boolean isValid();
+
+       void registerView(String uid, Object view);
+}