protected static InOutLogKeeper doPrepare(RequestManager requestManager) { final String key = LastaWebKey.INOUT_LOGGING_KEY; final OptionalThing<NonShowAttribute> optAttr = requestManager.getAttribute(key, NonShowAttribute.class); if (optAttr.isPresent()) { final NonShowAttribute attr = optAttr.get(); return (InOutLogKeeper) attr.getAttribute(); } else { final InOutLogKeeper keeper = new InOutLogKeeper(); keeper.acceptOption(requestManager.getActionAdjustmentProvider().adjustInOutLogging()); // null allowed requestManager.setAttribute(key, new NonShowAttribute(keeper)); return keeper; } }
protected static InOutLogKeeper doPrepare(RequestManager requestManager) { final String key = LastaWebKey.INOUT_LOGGING_KEY; final OptionalThing<NonShowAttribute> optAttr = requestManager.getAttribute(key, NonShowAttribute.class); if (optAttr.isPresent()) { final NonShowAttribute attr = optAttr.get(); return (InOutLogKeeper) attr.getAttribute(); } else { final InOutLogKeeper keeper = new InOutLogKeeper(); keeper.acceptOption(requestManager.getActionAdjustmentProvider().adjustInOutLogging()); // null allowed requestManager.setAttribute(key, new NonShowAttribute(keeper)); return keeper; } }