com.liferay.faces.util.logging.Logger.warn()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(202)

本文整理了Java中com.liferay.faces.util.logging.Logger.warn()方法的一些代码示例,展示了Logger.warn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.warn()方法的具体详情如下:
包路径:com.liferay.faces.util.logging.Logger
类名称:Logger
方法名:warn

Logger.warn介绍

暂无

代码示例

代码示例来源:origin: com.liferay.faces/com.liferay.faces.util

public ScriptImpl(String sourceCode, String[] modules, ModulesType modulesType) {
  this.sourceCode = sourceCode;
  if ((modules != null) && (modulesType == null)) {
    logger.warn("Modules will be ignored on scripts with modulesType == null.");
  }
  this.modules = modules;
  this.modulesType = modulesType;
}

代码示例来源:origin: liferay/liferay-faces

public void setStatus(int sc) {
  logger.warn("No equivalent for HttpServletResponse.setStatus(int=[{0}]) for PortletResponse", sc);
}

代码示例来源:origin: liferay/liferay-faces

public void sendError(int sc) throws IOException {
  logger.warn("No equivalent for HttpServletResponse.sendError(int=[{0}]) for PortletResponse", sc);
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

public void sendError(int sc) throws IOException {
  logger.warn("No equivalent for HttpServletResponse.sendError(int=[{0}]) for PortletResponse", sc);
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

public void setStatus(int sc) {
  logger.warn("No equivalent for HttpServletResponse.setStatus(int=[{0}]) for PortletResponse", sc);
}

代码示例来源:origin: liferay/liferay-faces

public void warn(Object msg, Throwable t) {
  logger.warn(msg.toString());
}

代码示例来源:origin: liferay/liferay-faces

public void warn(Object msg) {
  logger.warn(msg.toString());
}

代码示例来源:origin: liferay/liferay-faces

public void warn(Throwable t) {
  logger.warn(t.getMessage());
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

/**
 * @see    {@link ExternalContext#addResponseHeader(String, String)}
 * @since  JSF 2.0
 */
@Override
public void addResponseHeader(String name, String value) {
  if (portletResponse instanceof ResourceResponse) {
    ResourceResponse resourceResponse = (ResourceResponse) portletResponse;
    resourceResponse.addProperty(name, value);
  }
  else {
    logger.warn("Unable to call {0} for portletResponse=[{1}] because it is not a ResourceResponse.",
      "portletResponse.addProperty(String, String)", portletResponse.getClass().getName());
  }
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

protected String getFacesViewIdRequestParameter(String name) {
  String value = getPortletRequest().getParameter(name);
  if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
    logger.warn("Invalid character in request parameter {0}=[{1}]", name, value);
    value = null;
  }
  return value;
}

代码示例来源:origin: liferay/liferay-faces

protected String getFacesViewIdRequestParameter(String name) {
  String value = getPortletRequest().getParameter(name);
  if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
    logger.warn("Invalid character in request parameter {0}=[{1}]", name, value);
    value = null;
  }
  return value;
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

protected String getFacesViewIdRequestAttribute(String name) {
  String value = (String) getPortletRequest().getAttribute(name);
  if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
    logger.warn("Invalid character in request attribute {0}=[{1}]", name, value);
    value = null;
  }
  return value;
}

代码示例来源:origin: liferay/liferay-faces

protected String getFacesViewIdRequestAttribute(String name) {
  String value = (String) getPortletRequest().getAttribute(name);
  if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
    logger.warn("Invalid character in request attribute {0}=[{1}]", name, value);
    value = null;
  }
  return value;
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

public void destroy() {
  initialized = false;
  // FACES-1450: Surround with try/catch block in order to prevent hot re-deploys from failing in Liferay Portal.
  try {
    BridgeRequestScopeManagerFactory bridgeRequestScopeManagerFactory = (BridgeRequestScopeManagerFactory)
      BridgeFactoryFinder.getFactory(BridgeRequestScopeManagerFactory.class);
    BridgeRequestScopeManager bridgeRequestScopeManager =
      bridgeRequestScopeManagerFactory.getBridgeRequestScopeManager();
    bridgeRequestScopeManager.removeBridgeRequestScopesByPortlet(portletConfig);
  }
  catch (Throwable t) {
    logger.warn(t.getMessage());
  }
}

代码示例来源:origin: liferay/liferay-faces

public void destroy() {
  initialized = false;
  // FACES-1450: Surround with try/catch block in order to prevent hot re-deploys from failing in Liferay Portal.
  try {
    BridgeRequestScopeManagerFactory bridgeRequestScopeManagerFactory = (BridgeRequestScopeManagerFactory)
      BridgeFactoryFinder.getFactory(BridgeRequestScopeManagerFactory.class);
    BridgeRequestScopeManager bridgeRequestScopeManager =
      bridgeRequestScopeManagerFactory.getBridgeRequestScopeManager();
    bridgeRequestScopeManager.removeBridgeRequestScopesByPortlet(portletConfig);
  }
  catch (Throwable t) {
    logger.warn(t.getMessage());
  }
}

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

@Override
public void startElement(String name, UIComponent component) throws IOException {
  if ("title".equals(name)) {
    logger.warn(
      "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
    titleElement = true;
  }
  else {
    Element element = createElement(name);
    ElementWriter elementWriter = new ElementWriter(element);
    elementWriterStack.push(elementWriter);
    logger.trace("PUSHED element name=[{0}]", name);
  }
}

代码示例来源:origin: liferay/liferay-faces

@Override
public void startElement(String name, UIComponent component) throws IOException {
  if ("title".equals(name)) {
    logger.warn(
      "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
    titleElement = true;
  }
  else {
    Element element = createElement(name);
    ElementWriter elementWriter = new ElementWriter(element);
    elementWriterStack.push(elementWriter);
    logger.trace("PUSHED element name=[{0}]", name);
  }
}

代码示例来源:origin: com.liferay.faces/liferay-faces-alloy

protected void encodeMediaSource(ResponseWriter responseWriter, String mediaResourceURL, String contentType)
  throws IOException {
  responseWriter.startElement("source", null);
  responseWriter.writeAttribute("src", mediaResourceURL, null);
  if (contentType != null) {
    responseWriter.writeAttribute("type", contentType, null);
  }
  else {
    logger.warn("The contentType of ResourceURL=[{0}] was not specified.", mediaResourceURL);
  }
  responseWriter.endElement("source");
}

代码示例来源:origin: com.liferay.faces/com.liferay.faces.alloy

protected void encodeMediaSource(ResponseWriter responseWriter, String mediaResourceURL, String contentType)
  throws IOException {
  responseWriter.startElement("source", null);
  responseWriter.writeAttribute("src", mediaResourceURL, null);
  if (contentType != null) {
    responseWriter.writeAttribute("type", contentType, null);
  }
  else {
    logger.warn("The contentType of ResourceURL=[{0}] was not specified.", mediaResourceURL);
  }
  responseWriter.endElement("source");
}

代码示例来源:origin: liferay/liferay-faces

protected void encodeMediaSource(ResponseWriter responseWriter, String mediaResourceURL, String contentType)
  throws IOException {
  responseWriter.startElement("source", null);
  responseWriter.writeAttribute("src", mediaResourceURL, null);
  if (contentType != null) {
    responseWriter.writeAttribute("type", contentType, null);
  }
  else {
    logger.warn("The contentType of ResourceURL=[{0}] was not specified.", mediaResourceURL);
  }
  responseWriter.endElement("source");
}

相关文章