protected void error(Object object, Object... params) { log.error(object, params); }
protected void error(Object object, Throwable t, Object... params) { log.error(object, t, params); }
protected Collection<Class<?>> findTypes(AnnotationDeploymentHandler handler, boolean scanClasspathForAnnotations, String annotationFQName, Collection<String> includeTypeNames) { Collection<Class<?>> types = new HashSet(); if (scanClasspathForAnnotations) { Collection<Class<?>> annotatedTypes = handler.getClassMap().get(annotationFQName); if (annotatedTypes != null) types.addAll(annotatedTypes); } try { for (String s : new HashSet<String>(includeTypeNames)) { types.add(Reflections.classForName(s)); } } catch (ClassNotFoundException ex) { log.error("error loading JAX-RS type: " + ex.getMessage(), ex); } return types; }
@Override public void configurePlot(Plot plot) { super.configurePlot(plot); if (plot instanceof CategoryPlot) { configurePlot((CategoryPlot) plot); } else { log.error("UICATEGORYCHART --- unknown plot " + plot); } }
public String cancel() { HttpSession httpSession = HttpSessionTemporaryDataStorage .getHttpSession(); DocumentRepository documentRepository = new DocumentRepository( httpSession); documentRepository.setSignatureStatus(SignatureStatus.USER_CANCELLED); FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); HttpServletResponse httpServletResponse = (HttpServletResponse) externalContext .getResponse(); HttpServletRequest httpServletRequest = (HttpServletRequest) externalContext .getRequest(); String redirectUrl = httpServletRequest.getContextPath() + "/protocol-exit"; try { httpServletResponse.sendRedirect(redirectUrl); } catch (IOException e) { this.log.error("I/O error: #0", e, e.getMessage()); } return null; }
/** * {@inheritDoc} */ public String remove() { this.log.debug("remove administrator"); try { this.adminManager.remove(this.selectedAdmin); } catch (RemoveLastAdminException e) { this.log.error("cannot remove last administrator"); this.facesMessages.add(StatusMessage.Severity.ERROR, "Cannot remove the last administrator"); return null; } adminListFactory(); return "success"; } }
@Override public String saveIdP() { this.log.debug("save idp"); // IdP Config this.configuration.setValue(ConfigProperty.ISSUER, this.issuer); // check valid secret if (null != this.hmacSecret && !this.hmacSecret.trim().isEmpty()) { try { CryptoUtil.getMac(this.hmacSecret); } catch (DecoderException e) { this.log.error("Failed to decode HMac: " + e.getMessage(), e); this.facesMessages.addToControl("hmacsecret", "Failed to decode secret"); return null; } catch (InvalidKeyException e) { this.log.error("Invalid HMac: " + e.getMessage(), e); this.facesMessages.addToControl("hmacsecret", "Invalid secret: " + e.getMessage()); return null; } } this.configuration .setValue(ConfigProperty.HMAC_SECRET, this.hmacSecret); this.selectedTab = ConfigurationTab.tab_idp.name(); return "success"; }
log.error("Not implemented: Stateful EJB Seam component resource: " + seamComponent);
/** * {@inheritDoc} */ @Admin public String remove() { this.log.debug("remove administrator"); try { this.administratorService.remove(this.selectedAdmin); } catch (RemoveLastAdminException e) { this.log.error("cannot remove last administrator"); this.facesMessages.addFromResourceBundle( StatusMessage.Severity.ERROR, "errorRemoveLastAdmin"); return null; } adminListFactory(); return "success"; } }
@Override @End public String save() { this.log.debug("save RP: #0", this.selectedRP.getName()); // check identifier secret if any if (null != this.selectedRP.getIdentifierSecretKey() && !this.selectedRP.getIdentifierSecretKey().trim().isEmpty()) { try { CryptoUtil.getMac(this.selectedRP.getIdentifierSecretKey()); } catch (DecoderException e) { this.log.error("Failed to decode HMac: " + e.getMessage(), e); this.facesMessages.addToControl("identifier_secret", "Failed to decode secret"); return null; } catch (InvalidKeyException e) { this.log.error("Invalid HMac: " + e.getMessage(), e); this.facesMessages.addToControl("identifier_secret", "Invalid secret: " + e.getMessage()); return null; } } this.rpService.save(this.selectedRP, this.overrideRemoveCard, this.removeCard, this.blocked, this.blockedMessage); rpListFactory(); return "success"; }
@Override public void encodeEnd(FacesContext context) throws IOException { UIChart chart = (UIChart) findITextParent(getParent(), UIChart.class); if (chart != null) { Dataset dataset = chart.getDataset(); Plot p = chart.getChart().getPlot(); if (p instanceof CategoryPlot) { CategoryPlot plot = (CategoryPlot) p; int seriesIndex = ((CategoryDataset) dataset).getRowIndex(getKey()); CategoryItemRenderer renderer = plot.getRenderer(); // CategoryRenderer if (renderer instanceof AbstractRenderer) { configureSeries((AbstractRenderer) renderer, seriesIndex); } else { log.error("render is not AbtractRenderer" + renderer); } } // else if (p instanceof XYPlot) { // /// ??? // } } }
protected void registerHomeQueryResources(Component seamComponent) { // We can always instantiate this safely here because it can't have dependencies! AbstractResource instance = (AbstractResource) seamComponent.newInstance(); String path = instance.getPath(); if (path != null) { if (!path.startsWith("/")) { path = "/" + path; } log.debug( "registering resource, configured ResourceHome/Query on path {1}, as Seam component: {0}", seamComponent.getName(), path ); ResourceFactory factory = new SeamResteasyResourceFactory( seamComponent.getBeanClass(), seamComponent, getDispatcher().getProviderFactory() ); getDispatcher().getRegistry().addResourceFactory(factory, path); } else { log.error("Unable to register {0} resource on null path, check components.xml", seamComponent.getName()); } }
conn.join(Direction.DUPLEX, mg); } catch (UnsupportedOperationException uoe) { log.error("An unexpected exception occurred while trying to create the request for shipping call", uoe); } catch (Exception e) { log.error("An unexpected exception occurred while trying to create the request for shipping call", e);
@Override @Begin(join = true) public void uploadListenerPublic(UploadEvent event) throws IOException { UploadItem item = event.getUploadItem(); this.log.debug(item.getContentType()); this.log.debug(item.getFileSize()); this.log.debug(item.getFileName()); byte[] attributePublicKeyBytes; if (null == item.getData()) { // meaning createTempFiles is set to true in the SeamFilter attributePublicKeyBytes = FileUtils.readFileToByteArray(item .getFile()); } else { attributePublicKeyBytes = item.getData(); } try { this.selectedRP.setAttributePublicKey(CryptoUtil .getPublicFromPem(attributePublicKeyBytes)); } catch (KeyLoadException e) { this.log.error(e); this.facesMessages.addToControl("upload_secret", "Failed to load key"); } }
@Override @End public String saveApplet() { this.log.debug("save applet config"); // Applet config if (null != this.certificateBytes) { try { this.appletConfig .setServerCertificate(getCertificate(this.certificateBytes)); } catch (CertificateException e) { this.log.error("Certificate exception: " + e.getMessage(), e); this.facesMessages .addToControl("upload", "Invalid certificate"); return null; } this.configuration.setAppletConfig(this.appletConfig); } this.configuration .setValue(ConfigProperty.REMOVE_CARD, this.removeCard); this.configuration.setValue(ConfigProperty.TRANSACTION_MESSAGE_SIGNING, this.transactionMessageSigning); this.configuration.setValue(ConfigProperty.OMIT_SECURE_CHANNEL_BINDING, this.omitSecureChannelBinding); this.selectedTab = ConfigurationTab.tab_applet.name(); return "success"; }
conn.join(Direction.DUPLEX, mg); } catch (UnsupportedOperationException uoe) { log.error("An unexpected exception occurred while trying to create the request for checkout confirmation", uoe); } catch (Exception e) { log.error("An unexpected exception occurred while trying to create the request for checkout confirmation", e);
conn.join(Direction.DUPLEX, mg); } catch (UnsupportedOperationException uoe) { log.error("An unexpected exception occurred while trying to create the request for delivery date", uoe); } catch (Exception e) { log.error("An unexpected exception occurred while trying to create the request for delivery date", e);