public void debug(final String message, final Throwable throwable) { log_.debug(message, throwable); }
public void debug(final String message) { log_.debug(message); }
public void setThreshold(final int threshold) { if (log_.isDebugEnabled()) { log_.debug("setThreshold ignore: " + threshold); } }
public void logout(HttpServletRequest request) { HttpSession session = request.getSession(false); if (session != null) { session.invalidate(); if (log_.isDebugEnabled()) { log_.debug("SESSION INVALIDATED!!!!!!!!!!!"); } } }
private void removeFromIndex(IndexReader reader, int pageId) throws IOException { if (log_.isDebugEnabled()) { log_.debug("remove from index: id=" + pageId); } reader.delete(new Term("id", String.valueOf(pageId))); }
private void addToIndex(IndexWriter writer, Page page) throws IOException { if (log_.isDebugEnabled()) { log_.debug("add to index: " + page); } if (page.getHeimId() == PathId.HEIM_ALFHEIM) { log_.debug("Ignore: " + page); return; } Document[] docs = documentCreator_.newDocuments(page); for (int i = 0; i < docs.length; i++) { writer.addDocument(docs[i]); } }
public void login(HttpServletRequest request, User user) { HttpSession session = request.getSession(false); if (session != null) { session.invalidate(); if (log_.isDebugEnabled()) { log_.debug("SESSION INVALIDATED!!!!!!!!!!!"); } } if (!user.isAnonymous()) { if (log_.isDebugEnabled()) { log_.debug("GET SESSION(TRUE)!!!!!!!!!!!"); } session = request.getSession(); session.setAttribute(ATTR_USERID, new Integer(user.getId())); } }
public void unbind(String name) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("unbind: " + name); } Element<T> ei = getElement(name); if (!ei.canRead()) { log_.debug("cant read"); return; } else if (!ei.canDelete()) { log_.debug("cant delete"); throw new InvalidNameException("Cannot unbind: " + name); } log_.debug("deleteElement CALLING..."); deleteElement(ei); }
String getPopHTML(String popId, String containerPathname) { if (popId == null) { return null; } if (log_.isDebugEnabled()) { log_.debug("getPopHTML(" + popId + ", " + containerPathname + ")"); } String pageURL = ServletUtils.getURL(containerPathname, httpRequest_); String responseText = ServletUtils.getResponseText(pageURL, httpRequest_, httpResponse_); String popHTML = HTMLUtils.toString(HTMLUtils.getElementById( responseText, popId)); if (log_.isDebugEnabled()) { log_.debug("pageURL=" + pageURL); log_.debug("responseText=" + responseText); log_.debug("popHTML=" + popHTML); } return popHTML; }
private void updateSession(HttpServletRequest request, User user) { if (log_.isDebugEnabled()) { log_.debug("UPDATE SESSION: " + user); } HttpSession session = request.getSession(false); if (session != null) { session.invalidate(); if (log_.isDebugEnabled()) { log_.debug("SESSION INVALIDATED!!!!!!!!!!!"); } session = null; } if (!user.isAnonymous()) { if (log_.isDebugEnabled()) { log_.debug("GET SESSION(TRUE)!!!!!!!!!!!"); } webappPlugin_.login(request, user); } }
public Attributes getAttributes(String name, String[] attrIds) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("getAttributes: " + name); } Element<T> ei = getElement(name); if (!ei.canRead()) { throw new NameNotFoundException(name + " not found"); } return newElementResourceAttributes(ei); }
public DirContext createSubcontext(String name, Attributes attrs) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("createSubcontext: " + name); } Element<T> ei = getElement(name); if (ei.canRead()) { throw new NameAlreadyBoundException(name + " is already bound"); } else if (!ei.isCollection()) { throw new NamingException("Cannot create: " + name); } else if (!ei.canCreate()) { throw new NamingException("Cannot create: " + name); } createElement(ei, null); return (DirContext)lookup(name); }
public void doProcess(HttpServletRequest request, HttpServletResponse response, PageRequest pageRequest, PageProcessorChain chain) throws ServletException, IOException { Page gardRoot = pageRequest.getMy().getGardRootPage(); PropertyAbility prop = gardRoot.getAbility(PropertyAbility.class); if (webdavEnabled_ && PropertyUtils.valueOf(prop.getProperty(PROP_WEBDAVENABLE), true)) { if (log_.isDebugEnabled()) { log_.debug("Access to DAV"); } super.doProcess(request, response, pageRequest, chain); } else { response.sendError(HttpServletResponse.SC_FORBIDDEN); } }
@SuppressWarnings("unchecked") public NamingEnumeration<NameClassPair> list(String name) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("list: " + name); } Element<T> ei = getElement(name); if (!ei.canRead()) { throw new NameNotFoundException(name + " not found"); } else if (!ei.isCollection()) { throw new NotContextException(name + " cannot be listed"); } return new NamingContextEnumeration(listElement(ei).iterator()); }
@SuppressWarnings("unchecked") public NamingEnumeration<Binding> listBindings(String name) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("listBindings: " + name); } Element<T> ei = getElement(name); if (!ei.canRead()) { throw new NameNotFoundException(name + " not found"); } else if (!ei.isCollection()) { throw new NotContextException(name + " cannot be listed"); } return new NamingContextBindingsEnumeration(listElement(ei).iterator(), this); }
public void rename(String oldname, String newname) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("rename: " + oldname + " to " + newname); } Element<T> oldei = getElement(oldname); Element<T> newei = getElement(newname); if (!oldei.canMove() || !newei.canCreate()) { throw new InvalidNameException("Cannot rename"); } moveElement(oldei, newei); }
public void destroySubcontext(String name) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("destroySubcontext: " + name); } Element<T> ei = getElement(name); if (!ei.isCollection()) { throw new NotContextException(name + " cannot be destroyed"); } else if (!ei.canDelete()) { throw new InvalidNameException("Cannot destroy: " + name); } deleteElement(ei); }
public void bind(String name, Object obj) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("bind: " + name); } Element<T> ei = getElement(name); if (ei.canRead()) { throw new NameAlreadyBoundException("Use rebind to override: " + name); } else if (!ei.canCreate()) { throw new InvalidNameException("Cannot bind: " + name); } createElement(ei, DirContextBase.getInputStream(obj)); }
public Object lookup(String name) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("lookup: " + name); } Element<T> ei = getElement(name); if (!ei.canRead()) { throw new NameNotFoundException(name + " not found"); } if (ei.isCollection()) { DirContextBase dcb = newInstance(env_); dcb.setCwd(name); return dcb; } else { return newElementResource(ei); } }
public void rebind(String name, Object obj) throws NamingException { if (log_.isDebugEnabled()) { log_.debug("rebind: " + name); } Element<T> ei = getElement(name); if (!ei.canRead()) { throw new NameNotFoundException(name + " not found"); } else if (ei.isCollection()) { throw new InvalidNameException("Cannot rebind: " + name); } else if (!ei.canModify()) { throw new InvalidNameException("Cannot rebind: " + name); } modifyElement(ei, DirContextBase.getInputStream(obj)); }