ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/storeconfig/NamingResourcesSF.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/catalina/storeconfig/NamingResourcesSF.java
Status
scanned
Type
file
Name
NamingResourcesSF.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
3673 (3.6 KB)
MD5
2f5115cf370fe8bc469417396c1bf8e2
SHA1
4c3869c19ad6dfa5aca51e4c6b1d234af768409c
SHA256
f221271b06f6c0ab3a277ba7d11360e60de07afb36c60d2cac0445188b641db7
SHA512

      
    
SHA1_git
397a33d275d2428168c507e29e9e8a5b793b30a9
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
NamingResourcesSF.java | 3.6 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.storeconfig; import java.io.PrintWriter; import org.apache.catalina.deploy.NamingResourcesImpl; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.descriptor.web.ContextEjb; import org.apache.tomcat.util.descriptor.web.ContextEnvironment; import org.apache.tomcat.util.descriptor.web.ContextLocalEjb; import org.apache.tomcat.util.descriptor.web.ContextResource; import org.apache.tomcat.util.descriptor.web.ContextResourceEnvRef; import org.apache.tomcat.util.descriptor.web.ContextResourceLink; /** * Store server.xml elements Resources at context and GlobalNamingResources */ public class NamingResourcesSF extends StoreFactoryBase { private static final Log log = LogFactory.getLog(NamingResourcesSF.class); @Override public void store(PrintWriter aWriter, int indent, Object aElement) throws Exception { StoreDescription elementDesc = getRegistry().findDescription(aElement.getClass()); if (elementDesc != null) { if (log.isTraceEnabled()) { log.trace("store " + elementDesc.getTag() + "( " + aElement + " )"); } storeChildren(aWriter, indent, aElement, elementDesc); } else { log.warn(sm.getString("storeFactory.noDescriptor", aElement.getClass(), "NamingResources")); } } /** * Store the specified NamingResources properties. * <p> * {@inheritDoc} */ @Override public void storeChildren(PrintWriter aWriter, int indent, Object aElement, StoreDescription elementDesc) throws Exception { if (aElement instanceof NamingResourcesImpl resources) { // Store nested <Ejb> elements ContextEjb[] ejbs = resources.findEjbs(); storeElementArray(aWriter, indent, ejbs); // Store nested <Environment> elements ContextEnvironment[] envs = resources.findEnvironments(); storeElementArray(aWriter, indent, envs); // Store nested <LocalEjb> elements ContextLocalEjb[] lejbs = resources.findLocalEjbs(); storeElementArray(aWriter, indent, lejbs); // Store nested <Resource> elements ContextResource[] dresources = resources.findResources(); storeElementArray(aWriter, indent, dresources); // Store nested <ResourceEnvRef> elements ContextResourceEnvRef[] resEnv = resources.findResourceEnvRefs(); storeElementArray(aWriter, indent, resEnv); // Store nested <ResourceLink> elements ContextResourceLink[] resourceLinks = resources.findResourceLinks(); storeElementArray(aWriter, indent, resourceLinks); } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
33.33
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9