/** * Store the only the Manager elements * * @see NamingResourcesSF#storeChildren(PrintWriter, int, Object, StoreDescription) */ @Override public void store(PrintWriter aWriter, int indent, Object aElement) throws Exception { StoreDescription elementDesc = getRegistry().findDescription(aElement.getClass()); if (elementDesc != null) { if (aElement instanceof StandardManager) { StandardManager manager = (StandardManager) aElement; if (!isDefaultManager(manager)) { if (log.isDebugEnabled()) log.debug(sm.getString("factory.storeTag", elementDesc.getTag(), aElement)); getStoreAppender().printIndent(aWriter, indent + 2); getStoreAppender().printTag(aWriter, indent + 2, manager, elementDesc); } } else { super.store(aWriter, indent, aElement); } } else { if (log.isWarnEnabled()) log.warn(sm.getString("factory.storeNoDescriptor", aElement.getClass())); } }
@Override public void store(PrintWriter aWriter, int indent, Object aElement) throws Exception { if (aElement instanceof CombinedRealm) { StoreDescription elementDesc = getRegistry().findDescription(aElement.getClass()); if (elementDesc != null) { if (log.isDebugEnabled()) log.debug(sm.getString("factory.storeTag", elementDesc.getTag(), aElement)); getStoreAppender().printIndent(aWriter, indent + 2); getStoreAppender().printOpenTag(aWriter, indent + 2, aElement, elementDesc); storeChildren(aWriter, indent + 2, aElement, elementDesc); getStoreAppender().printIndent(aWriter, indent + 2); getStoreAppender().printCloseTag(aWriter, elementDesc); } else { if (log.isWarnEnabled()) log.warn(sm.getString("factory.storeNoDescriptor", aElement.getClass())); } } else { super.store(aWriter, indent, aElement); } }