@Path(value="/")
@Consumes(value={"application/json","application/text","text/html","application/x-www-form-urlencoded"})
@Produces(value="application/json;charset=utf-8")
public class WicketAnyUserUpdateService<U extends User,E>
extends AbstractAnyUserUpdateService<U,E,org.apache.wicket.Session>
User (Logged in or Guest) supports generic user related methods.
See SecurableService.query(String, Object) and query(String, String, String, String).
<script type="text/javascript" src="js/useraction.min.js"></script>
<script type="text/javascript">
var pingUrl = getBaseUrl(window.location.href) + (typeof SITE_CONTEXT!='undefined'?SITE_CONTEXT:'') + '/services/anyuser/ping';
var ua = new onUserAction(10, function() {$.get(pingUrl+'?action='+window.location.pathname);});
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,SoftReference<Map>> |
userActivity |
applicationContext, CACHE, NO_CACHE, request, response| Constructor and Description |
|---|
WicketAnyUserUpdateService() |
WicketAnyUserUpdateService(boolean checkAuthFiltered) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanRedundantSessions(Set<String> keepSessionIds,
org.apache.wicket.Session session)
Opportunity to clean redundant sessions
|
protected org.apache.wicket.Session |
getSession() |
Map<String,Map> |
getUserActivityMap(org.apache.wicket.Session session) |
protected UserSessionAdapter<?,org.apache.wicket.Session,U> |
getUserSessionAdapter() |
void |
ping(String action)
A way the User-Agent / Browser can let the server know the user is active and update its last active state
|
Object |
query(String contextNameId,
String actionId,
String json,
String jsonBody)
Example: http://host/services/anyuser/userAction/all/contactUs?p={'fname':'xxxx','lname':'yyyy'...} http://host/services/anyuser/userAction/all/contactUs?p={'fname':'xxxx','lname':'yyyy'...} Note: This method supports JSON data as a query param and a form param. |
protected void |
setPingUserData(Map<String,Object> activityMapForSession,
org.apache.wicket.protocol.http.WebSession session) |
void |
setUserSessionAdapter(UserSessionAdapter<?,org.apache.wicket.Session,U> userSessionAdapter) |
queryWithinContext, setPingUserDatacheckAuthFilterInvoked, filter, queryfilter, getCacheDef, getTestString, queryprotected Map<String,SoftReference<Map>> userActivity
public WicketAnyUserUpdateService()
public WicketAnyUserUpdateService(boolean checkAuthFiltered)
@GET
@Path(value="ping")
@Consumes(value="text/plain")
@Produces(value="text/plain")
public void ping(@QueryParam(value="action")
String action)
throws Exception
protected void setPingUserData(Map<String,Object> activityMapForSession, org.apache.wicket.protocol.http.WebSession session)
@POST
@Path(value="userAction/{contextNameId}/{actionId}")
@Produces(value="application/json")
public Object query(@PathParam(value="contextNameId")
String contextNameId,
@PathParam(value="actionId")
String actionId,
@QueryParam(value="p")
String json,
@FormParam(value="f")
String jsonBody)
throws Exception
query in class AbstractAnyUserUpdateService<U extends User,E,org.apache.wicket.Session>contextNameId - as String; a classification for the manner in which the Query is called. Can allow for better and custom security or context or SEO related aspects.actionId - as String (should match a Spring Transformer bean id that accepts an Object array as params)p - as Query Param JSON Object String that is converted into a Map or Array of variables @nullable truef - as Form Param JSON Object String that is converted into a Map or Array of variables @nullable trueExceptionpublic Map<String,Map> getUserActivityMap(org.apache.wicket.Session session) throws AuthorizationException
getUserActivityMap in class AbstractAnyUserUpdateService<U extends User,E,org.apache.wicket.Session>session - Session demanding the infoAuthorizationExceptionpublic void cleanRedundantSessions(Set<String> keepSessionIds, org.apache.wicket.Session session) throws AuthorizationException
cleanRedundantSessions in class AbstractAnyUserUpdateService<U extends User,E,org.apache.wicket.Session>AuthorizationExceptionprotected UserSessionAdapter<?,org.apache.wicket.Session,U> getUserSessionAdapter()
getUserSessionAdapter in class AbstractAnyUserUpdateService<U extends User,E,org.apache.wicket.Session>public void setUserSessionAdapter(UserSessionAdapter<?,org.apache.wicket.Session,U> userSessionAdapter)
protected org.apache.wicket.Session getSession()
getSession in class AbstractAnyUserUpdateService<U extends User,E,org.apache.wicket.Session>Copyright © 2018. All rights reserved.