List of usage examples for org.apache.wicket Session setMetaData
public final synchronized <M extends Serializable> Session setMetaData(final MetaDataKey<M> key, final M object)
From source file:org.geoserver.web.translator.controller.TranslationController.java
License:Open Source License
public static TranslationSession getTranslationSession(final Session session) { TranslationSession translationSession = (TranslationSession) session.getMetaData(TRANSLATION_BEAN); if (translationSession == null) { translationSession = new TranslationSession(); session.setMetaData(TRANSLATION_BEAN, translationSession); }/*from w w w . jav a2 s . co m*/ return translationSession; }
From source file:org.onexus.ui.authentication.persona.SessionHelper.java
License:Apache License
/** * Stores the authentication data in the current web session * * @param session the current web session * @param browserId the authentication data */// w ww . ja v a 2s. c om public static void logIn(final Session session, final BrowserId browserId) { Args.notNull(session, "session"); Args.notNull(browserId, "browserId"); session.setMetaData(KEY, browserId); }
From source file:org.onexus.ui.authentication.persona.SessionHelper.java
License:Apache License
/** * Removes the authentication data from the current web session * * @param session the current web session *//*from ww w . j ava2 s . c o m*/ public static void logOut(final Session session) { Args.notNull(session, "session"); session.setMetaData(KEY, null); }
From source file:org.qi4j.sample.dcicargo.sample_a.infrastructure.wicket.prevnext.PrevNext.java
License:Apache License
public static void registerIds(Session session, ArrayList<String> ids) { if (ids == null || ids.isEmpty()) { throw new RuntimeException("Please register a list of ids."); }/*from ww w. ja va2 s . c o m*/ session.setMetaData(PREV_NEXT_PANEL_KEY, ids); session.bind(); }
From source file:org.qi4j.sample.dcicargo.sample_a.infrastructure.wicket.prevnext.PrevNext.java
License:Apache License
public static void addId(Session session, String id) { if (id == null || id.isEmpty()) { throw new RuntimeException("Can't register empty id."); }/*from ww w.j a v a 2s .co m*/ ArrayList<String> ids = session.getMetaData(PREV_NEXT_PANEL_KEY); if (ids == null || ids.isEmpty()) { ids = new ArrayList<String>(); } ids.add(id); session.setMetaData(PREV_NEXT_PANEL_KEY, ids); session.bind(); }