import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.argeo.cms.i18n.Msg;
import org.argeo.jcr.JcrUtils;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.rap.rwt.application.AbstractEntryPoint;
import org.eclipse.rap.rwt.client.service.BrowserNavigationListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.springframework.security.context.SecurityContextHolder;
+import org.springframework.security.core.context.SecurityContextHolder;
/** Manages history and navigation */
-public abstract class AbstractCmsEntryPoint extends AbstractEntryPoint
- implements CmsSession {
+abstract class AbstractCmsEntryPoint extends AbstractEntryPoint implements
+ CmsSession {
private final Log log = LogFactory.getLog(AbstractCmsEntryPoint.class);
private Repository repository;
private BrowserNavigation history;
public AbstractCmsEntryPoint(Repository repository, String workspace) {
- if (SecurityContextHolder.getContext().getAuthentication() == null)
- logAsAnonymous();
+ // if (SecurityContextHolder.getContext().getAuthentication() == null) {
+ // HttpSession httpSession = RWT.getRequest().getSession();
+ // // log.debug("Session: " + httpSession.getId());
+ // SecurityContext contextFromSessionObject = (SecurityContext)
+ // httpSession
+ // .getAttribute(SPRING_SECURITY_CONTEXT_KEY);
+ // if (contextFromSessionObject != null)
+ // SecurityContextHolder.setContext(contextFromSessionObject);
+ // else
+ // logAsAnonymous();
+ // }
this.repository = repository;
this.workspace = workspace;
page = prefix;
} else {
node = getDefaultNode(session);
- if (state.equals("~"))
- page = "";
- else
- page = state;
+ page = state;
}
if (log.isTraceEnabled())
- log.trace("page=" + page + ", node=" + node + ", state="
- + state);
+ log.trace("node=" + node + ", state=" + state + " (page="
+ + page);
} catch (RepositoryException e) {
throw new CmsException("Cannot retrieve node", e);
return state;
}
- protected String getPage() {
- return page;
- }
+ // String getPage() {
+ // return page;
+ // }
protected Throwable getException() {
return exception;