本文整理匯總了Java中org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType類的典型用法代碼示例。如果您正苦於以下問題:Java ParamValueType類的具體用法?Java ParamValueType怎麽用?Java ParamValueType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ParamValueType類屬於org.jboss.shrinkwrap.descriptor.api.javaee7包,在下文中一共展示了ParamValueType類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getContextParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
public String getContextParam(String name) {
if (name == null || name.length() == 0) {
return null;
}
Optional<ParamValueType<WebAppDescriptor>> paramValue = this.descriptor.getAllContextParam().stream().filter(p -> p.getParamName().equals(name)).findFirst();
return paramValue.isPresent() ? paramValue.get().getParamValue() : null;
}
示例2: convert
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
private Servlet convert(ServletType<WebAppDescriptor> descriptorServlet) {
Servlet servlet = new Servlet(descriptorServlet.getServletName(), descriptorServlet.getServletClass());
List<String> dispNames = descriptorServlet.getAllDisplayName();
if (dispNames.size() > 0) {
servlet.withDisplayName(dispNames.get(0));
}
List<String> descriptions = descriptorServlet.getAllDescription();
if (descriptions.size() > 0) {
servlet.withDescription(descriptions.get(0));
}
servlet.withEnabled(descriptorServlet.isEnabled());
servlet.withAsyncSupported(descriptorServlet.isAsyncSupported());
servlet.withLoadOnStartup(descriptorServlet.getLoadOnStartup());
servlet.withInitParams(
descriptorServlet.getAllInitParam()
.stream()
.collect(Collectors.toMap(
ParamValueType::getParamName,
ParamValueType::getParamValue)
)
);
servlet.withUrlPatterns(this.descriptor.getAllServletMapping()
.stream()
.filter(mapping -> mapping.getServletName().equals(servlet.servletName()))
.findFirst().get().getAllUrlPattern());
return servlet;
}
示例3: description
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* Creates for all String objects representing <code>description</code> elements,
* a new <code>description</code> element
* @param values list of <code>description</code> objects
* @return the current instance of <code>ParamValueType<T></code>
*/
public ParamValueType<T> description(String ... values)
{
if (values != null)
{
for(String name: values)
{
childNode.createChild("description").text(name);
}
}
return this;
}
示例4: getOrCreateInitParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* If not already created, a new <code>init-param</code> element will be created and returned.
* Otherwise, the first existing <code>init-param</code> element will be returned.
* @return the instance defined for the element <code>init-param</code>
*/
public ParamValueType<FilterType<T>> getOrCreateInitParam()
{
List<Node> nodeList = childNode.get("init-param");
if (nodeList != null && nodeList.size() > 0)
{
return new ParamValueTypeImpl<FilterType<T>>(this, "init-param", childNode, nodeList.get(0));
}
return createInitParam();
}
示例5: getAllInitParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* Returns all <code>init-param</code> elements
* @return list of <code>init-param</code>
*/
public List<ParamValueType<FilterType<T>>> getAllInitParam()
{
List<ParamValueType<FilterType<T>>> list = new ArrayList<ParamValueType<FilterType<T>>>();
List<Node> nodeList = childNode.get("init-param");
for(Node node: nodeList)
{
ParamValueType<FilterType<T>> type = new ParamValueTypeImpl<FilterType<T>>(this, "init-param", childNode, node);
list.add(type);
}
return list;
}
示例6: getOrCreateInitParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* If not already created, a new <code>init-param</code> element will be created and returned.
* Otherwise, the first existing <code>init-param</code> element will be returned.
* @return the instance defined for the element <code>init-param</code>
*/
public ParamValueType<ServletType<T>> getOrCreateInitParam()
{
List<Node> nodeList = childNode.get("init-param");
if (nodeList != null && nodeList.size() > 0)
{
return new ParamValueTypeImpl<ServletType<T>>(this, "init-param", childNode, nodeList.get(0));
}
return createInitParam();
}
示例7: getAllInitParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* Returns all <code>init-param</code> elements
* @return list of <code>init-param</code>
*/
public List<ParamValueType<ServletType<T>>> getAllInitParam()
{
List<ParamValueType<ServletType<T>>> list = new ArrayList<ParamValueType<ServletType<T>>>();
List<Node> nodeList = childNode.get("init-param");
for(Node node: nodeList)
{
ParamValueType<ServletType<T>> type = new ParamValueTypeImpl<ServletType<T>>(this, "init-param", childNode, node);
list.add(type);
}
return list;
}
示例8: getOrCreateContextParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* If not already created, a new <code>context-param</code> element will be created and returned.
* Otherwise, the first existing <code>context-param</code> element will be returned.
* @return the instance defined for the element <code>context-param</code>
*/
public ParamValueType<WebFragmentType<T>> getOrCreateContextParam()
{
List<Node> nodeList = childNode.get("context-param");
if (nodeList != null && nodeList.size() > 0)
{
return new ParamValueTypeImpl<WebFragmentType<T>>(this, "context-param", childNode, nodeList.get(0));
}
return createContextParam();
}
示例9: getAllContextParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* Returns all <code>context-param</code> elements
* @return list of <code>context-param</code>
*/
public List<ParamValueType<WebFragmentType<T>>> getAllContextParam()
{
List<ParamValueType<WebFragmentType<T>>> list = new ArrayList<ParamValueType<WebFragmentType<T>>>();
List<Node> nodeList = childNode.get("context-param");
for(Node node: nodeList)
{
ParamValueType<WebFragmentType<T>> type = new ParamValueTypeImpl<WebFragmentType<T>>(this, "context-param", childNode, node);
list.add(type);
}
return list;
}
示例10: getOrCreateContextParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* If not already created, a new <code>context-param</code> element will be created and returned.
* Otherwise, the first existing <code>context-param</code> element will be returned.
* @return the instance defined for the element <code>context-param</code>
*/
public ParamValueType<WebFragmentDescriptor> getOrCreateContextParam()
{
List<Node> nodeList = model.get("context-param");
if (nodeList != null && nodeList.size() > 0)
{
return new ParamValueTypeImpl<WebFragmentDescriptor>(this, "context-param", model, nodeList.get(0));
}
return createContextParam();
}
示例11: getAllContextParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* Returns all <code>context-param</code> elements
* @return list of <code>context-param</code>
*/
public List<ParamValueType<WebFragmentDescriptor>> getAllContextParam()
{
List<ParamValueType<WebFragmentDescriptor>> list = new ArrayList<ParamValueType<WebFragmentDescriptor>>();
List<Node> nodeList = model.get("context-param");
for(Node node: nodeList)
{
ParamValueType<WebFragmentDescriptor> type = new ParamValueTypeImpl<WebFragmentDescriptor>(this, "context-param", model, node);
list.add(type);
}
return list;
}
示例12: getOrCreateInitParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* If not already created, a new <code>init-param</code> element will be created and returned.
* Otherwise, the first existing <code>init-param</code> element will be returned.
* @return the instance defined for the element <code>init-param</code>
*/
public ParamValueType<HandlerType<T>> getOrCreateInitParam()
{
List<Node> nodeList = childNode.get("init-param");
if (nodeList != null && nodeList.size() > 0)
{
return new ParamValueTypeImpl<HandlerType<T>>(this, "init-param", childNode, nodeList.get(0));
}
return createInitParam();
}
示例13: getAllInitParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* Returns all <code>init-param</code> elements
* @return list of <code>init-param</code>
*/
public List<ParamValueType<HandlerType<T>>> getAllInitParam()
{
List<ParamValueType<HandlerType<T>>> list = new ArrayList<ParamValueType<HandlerType<T>>>();
List<Node> nodeList = childNode.get("init-param");
for(Node node: nodeList)
{
ParamValueType<HandlerType<T>> type = new ParamValueTypeImpl<HandlerType<T>>(this, "init-param", childNode, node);
list.add(type);
}
return list;
}
示例14: getOrCreateContextParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* If not already created, a new <code>context-param</code> element will be created and returned.
* Otherwise, the first existing <code>context-param</code> element will be returned.
* @return the instance defined for the element <code>context-param</code>
*/
public ParamValueType<WebAppType<T>> getOrCreateContextParam()
{
List<Node> nodeList = childNode.get("context-param");
if (nodeList != null && nodeList.size() > 0)
{
return new ParamValueTypeImpl<WebAppType<T>>(this, "context-param", childNode, nodeList.get(0));
}
return createContextParam();
}
示例15: getAllContextParam
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; //導入依賴的package包/類
/**
* Returns all <code>context-param</code> elements
* @return list of <code>context-param</code>
*/
public List<ParamValueType<WebAppType<T>>> getAllContextParam()
{
List<ParamValueType<WebAppType<T>>> list = new ArrayList<ParamValueType<WebAppType<T>>>();
List<Node> nodeList = childNode.get("context-param");
for(Node node: nodeList)
{
ParamValueType<WebAppType<T>> type = new ParamValueTypeImpl<WebAppType<T>>(this, "context-param", childNode, node);
list.add(type);
}
return list;
}