/*
(non-Javadoc)

@see com.ibm.ws.javaee.ddmodel.wsbnd.WebservicesBnd#getWebserviceEndpointProperties()
438108
@Override
    public Map<String, String> getWebserviceEndpointProperties() {
        return webserviceEndpointProperties == null ? null : webserviceEndpointProperties.getAttributes();
    }
603680
@Override
    public List<ServiceRef> getServiceRefs() {
        List<ServiceRef> returnValue = delegate == null ? new ArrayList<ServiceRef>() : new ArrayList<ServiceRef>(delegate.getServiceRefs());

        returnValue.addAll(serviceRefTypeMap.values());
        returnValue.addAll(ejbServiceRefTypeMap.values());

        return returnValue;
    }
521465
private void configureClientProperties() throws IOException {
        Map<String, String> serviceRefProps = wsrInfo.getProperties();
        Iterator<QName> iterator = this.getPorts();//wsrInfo.getBindingPortComponentRefInfoList();

        while (null != iterator && iterator.hasNext()) {
            QName portQName = iterator.next();
            PortComponentRefInfo portInfo = wsrInfo.getPortComponentRefInfo(portQName);
            Map<String, String> portProps = (null != portInfo) ? portInfo.getProperties() : null;

            if ((null != serviceRefProps || null != portProps)) {
                prepareProperties(portQName, serviceRefProps, portProps);
            }
        }
    }
507451
@Override
    public Collection<PropertySourceLoader> getPropertySourceLoaders() {
        Collection<PropertySourceLoader> propertySourceLoaderList = this.propertySourceLoaderList;
        if (propertySourceLoaderList == null) {
            synchronized (this) { // double check
                propertySourceLoaderList = this.propertySourceLoaderList;
                if (propertySourceLoaderList == null) {
                    propertySourceLoaderList = evaluatePropertySourceLoaders();
                    this.propertySourceLoaderList = propertySourceLoaderList;
                }
            }
        }
        return propertySourceLoaderList;
    }
974378
private Endpoint getEndpoint(String serviceName) {
        Endpoint cachedEndpoint = endpointCache.get(serviceName);

        if (cachedEndpoint == null) {
            cachedEndpoint = computeEndpoint(serviceName);
            if (cachedEndpoint == null) {
                return null;
            }
        }

        endpointCache.put(serviceName, cachedEndpoint);
        return cachedEndpoint;
    }
213958
public static List<InetSocketAddress> getAddresses(Configuration conf,
      Collection<String> serviceIds, String defaultAddress, String... keys) {
    Collection<String> nameserviceIds = getNameServiceIds(conf);
    List<InetSocketAddress> isas = new ArrayList<InetSocketAddress>();

    // Configuration with a single namenode
    if (nameserviceIds == null || nameserviceIds.isEmpty()) {
      String address = getConfValue(defaultAddress, null, conf, keys);
      if (address == null) {
        return null;
      }
      isas.add(NetUtils.createSocketAddr(address));
    } else {
      // Get the namenodes for all the configured nameServiceIds
      for (String nameserviceId : nameserviceIds) {
        String address = getConfValue(null, nameserviceId, conf, keys);
        if (address == null) {
          return null;
        }
        isas.add(NetUtils.createSocketAddr(address));
      }
    }
    return isas;
  }
806460
public Map<String, Object> getApplicationProperties(Map<String, Object> properties)
    {
        if (properties == null)
            return null;
        Map<String, Object> propApp = new Hashtable<String,Object>();
        if (properties.get(DBParams.LANGUAGE) != null)
            propApp.put(DBParams.LANGUAGE, properties.get(DBParams.LANGUAGE));
        if (properties.get(DBParams.DOMAIN) != null)
            propApp.put(DBParams.DOMAIN, properties.get(DBParams.DOMAIN));
        return propApp;
    }
800530
public java.util.List<Endpoint> getEndpoints() {
        if (endpoints == null) {
            endpoints = new com.amazonaws.internal.SdkInternalList<Endpoint>();
        }
        return endpoints;
    }
258414
public java.util.List<ClientPropertiesResult> getClientPropertiesList() {
        if (clientPropertiesList == null) {
            clientPropertiesList = new com.amazonaws.internal.SdkInternalList<ClientPropertiesResult>();
        }
        return clientPropertiesList;
    }
611610
public ArrayList getProperties(){
		ArrayList properties = new ArrayList();
		if (configEntry.properties != null){
			Iterator it = configEntry.properties.values().iterator();
			while (it.hasNext()){
				Property property = new Property((com.ibm.ws.cache.config.Property)it.next());
				properties.add(property);
			}
		}
		return properties;
	}
141232
private List<String> locatePomProperties() {
        List<String> propertiesFiles = new ArrayList<>();
        List<URL> packageUrls = ClasspathUtils.getResources(getResourceBasePath());
        for (URL packageUrl : packageUrls) {
            if (packageUrl.getProtocol().equals("jar")) {
                // We only care about Webjars jar files
                log.debug("Scanning {}", packageUrl);
                try {
                    String jar = packageUrl.toString().substring("jar:".length()).split("!")[0];
                    File file = new File(new URI(jar));
                    try (JarInputStream is = new JarInputStream(new FileInputStream(file))) {
                        JarEntry entry = null;
                        while ((entry = is.getNextJarEntry()) != null) {
                            if (!entry.isDirectory() && entry.getName().endsWith("pom.properties")) {
                                propertiesFiles.add(entry.getName());
                            }
                        }
                    }
                } catch (URISyntaxException | IOException e) {
                    throw new PippoRuntimeException("Failed to get classes for package '{}'", packageUrl);
                }
            }
        }

        return propertiesFiles;
    }
349669
public WSEJBEndpointManager createWebServiceEndpointManager(J2EEName j2eeName,
                                                                Class<?> provider, // d492780, F87951
                                                                Method[] methods) throws EJBException, EJBConfigurationException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2

        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "createWebServiceEndpointManager : " + j2eeName,
                     new Object[] { provider, methods });

        EJSHome home = (EJSHome) homeOfHomes.getHome(j2eeName);

        // If a WebService request comes in after a home has been uninstalled,
        // then it won't be found.                                         d547849
        if (home == null) {
            if (isTraceOn && tc.isEntryEnabled())
                Tr.exit(tc, "createWebServiceEndpointManager could not find home for : " +
                            j2eeName);
            throw ExceptionUtil.EJBException("Unable to find EJB component: " + j2eeName, null);
        }

        BeanMetaData bmd = home.beanMetaData;
        Method[] endpointMethods = methods;

        // -----------------------------------------------------------------------
        // If this is the first time the endpoint has been accessed,
        // then resolve the methods to insure this is a valid configuration
        // and JITDeploy the WSEJBProxy class if there are around invoke
        // interceptors.                                                   d497921
        // -----------------------------------------------------------------------
        synchronized (bmd) {
            if (!bmd.ivWebServiceEndpointCreated) {
                if (provider != null) {
                    // The Web Service Endpoint Interface from ejb-jar.xml is for
                    // JAX-RPC, and cannot be used with a JAX-WS Provider.
                    if (bmd.webserviceEndpointInterfaceClass != null) {
                        // Log the error and throw meaningful exception.
                        Tr.error(tc, "WS_ENDPOINT_PROVIDER_CONFLICT_CNTR0176E",
                                 new Object[] { bmd.webserviceEndpointInterfaceClass.getName(),
                                                bmd.j2eeName.getComponent(),
                                                bmd.j2eeName.getModule(),
                                                bmd.j2eeName.getApplication() });
                        throw new EJBConfigurationException("Web Service Provider interface conflicts with the " +
                                                            "configured Web Service Endpoint interface " +
                                                            bmd.webserviceEndpointInterfaceClass.getName() +
                                                            " for the " + bmd.j2eeName.getComponent() +
                                                            " bean in the " + bmd.j2eeName.getModule() +
                                                            " module of the " + bmd.j2eeName.getApplication() +
                                                            " application.");
                    }

                    endpointMethods = provider.getMethods();

                    if (isTraceOn && tc.isDebugEnabled())
                        Tr.debug(tc, "provider methods : ", (Object[]) endpointMethods);
                }

                // Resolve the Web Service Endpoint methods.  This will make sure that
                // the bean actually implements the methods, but will also remove any
                // excess methodInfos for the webservice endpoint interface in BMD.
                // Until now, EJBContainer is not aware of what the endpoint methods
                // are, so assumes all methods on the bean may be endpoint methods.
                boolean hasAroundInvoke = WSEJBWrapper.resolveWebServiceEndpointMethods(bmd, endpointMethods);

                // Finally, if any of the methods have around invoke interceptors,
                // then a WSEJBProxy must be created by JITDeploy.  An instance of
                // the proxy will be returned to WebServices component to invoke
                // the bean method, instead of an actual bean instance.
                if (hasAroundInvoke) {
                    try {
                        bmd.ivWebServiceEndpointProxyClass = JITDeploy.generateWSEJBProxy(bmd.classLoader,
                                                                                          bmd.ivWebServiceEndpointProxyName,
                                                                                          provider,
                                                                                          endpointMethods,
                                                                                          bmd.wsEndpointMethodInfos,
                                                                                          bmd.enterpriseBeanClassName,
                                                                                          bmd.j2eeName.toString(),
                                                                                          getEJBRuntime().getClassDefiner()); // F70650
                    } catch (ClassNotFoundException ex) {
                        // Log the error and throw meaningful exception.
                        Tr.error(tc, "WS_EJBPROXY_FAILURE_CNTR0177E",
                                 new Object[] { bmd.j2eeName.getComponent(),
                                                bmd.j2eeName.getModule(),
                                                bmd.j2eeName.getApplication(),
                                                ex });
                        throw ExceptionUtil.EJBException("Failure occurred attempting to create a Web service " +
                                                         "endpoint proxy for the " + bmd.j2eeName.getComponent() +
                                                         " bean in the " + bmd.j2eeName.getModule() +
                                                         " module of the " + bmd.j2eeName.getApplication() +
                                                         " application.", ex);
                    }
                }

                bmd.ivWebServiceEndpointCreated = true;

                // Dump the BeanMetaData now that the endpoint methodinfos are set.
                bmd.dump();
            }
        } // end synchronization                                        d521886

        // -----------------------------------------------------------------------
        // Create a new instance of the generic Web Services Endpoint EJB Wrapper,
        // and initialize it specific to the requested bean type.
        // -----------------------------------------------------------------------

        WSEJBWrapper wrapper = new WSEJBWrapper();

        wrapper.container = this;
        wrapper.wrapperManager = wrapperManager;
        wrapper.ivCommon = null; // Not cached
        wrapper.isManagedWrapper = false; // Not managed
        wrapper.ivInterface = WrapperInterface.SERVICE_ENDPOINT;

        // Now, fill in the home specific information.
        wrapper.beanId = home.ivStatelessId;
        wrapper.bmd = bmd;
        wrapper.methodInfos = bmd.wsEndpointMethodInfos;
        wrapper.methodNames = bmd.wsEndpointMethodNames;
        wrapper.isolationAttrs = null; // not used for EJB 2.x
        wrapper.ivPmiBean = home.pmiBean;

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "createWebServiceEndpointManager : " + wrapper);

        return wrapper;
    }
766992
@Override
  public void setEndpointAddress(BindingProvider soapClient, String endpointAddress) {
    soapClient.getRequestContext().put(
        BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointAddress);
  }
119195
@Override
    public EndpointReferenceType getAddressWithId(String id) {
        EndpointReferenceType ref = null;

        if (isMultiplexWithAddress()) {
            String address = EndpointReferenceUtils.getAddress(reference);
            ref = EndpointReferenceUtils.duplicate(reference);
            if (address.endsWith("/")) {
                EndpointReferenceUtils.setAddress(ref, address + id);
            } else {
                EndpointReferenceUtils.setAddress(ref, address + "/" + id);
            }
        } else {
            ref = super.getAddressWithId(id);
        }
        return ref;
    }
125193
public String[] getPlainProperties(){
		String[] commonColumns = {"created", "createdby", "updated","updatedby", "isactive"};
		String[] referencedProperties = getReferencedColumns();
		List<String> plainProperties = new ArrayList<String>();
		for(String att : attributes){
			if(CStringUtils.indexOf(referencedProperties, att) >= 0 ){
				//do not include referenced columns
			}
			else if(att.endsWith("_id")){
				;//do not include implied columns
			}
			else if(CStringUtils.indexOf(commonColumns, att) >= 0){
				;//do not include common columns
			}
			else{
				plainProperties.add(att);
			}
		}
		return plainProperties.toArray(new String[plainProperties.size()]);
	}
976799
@Override
  public void setEndpointAddress(Stub soapClient, String endpointAddress) {
    soapClient._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, endpointAddress);
  }
548137
@Override
    public String getProviderEndpoints() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getProviderEndpoints");
        String providerEndpoints = jcaConnectionFactory.getProviderEndpoints();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getProviderEndpoints", providerEndpoints);
        return providerEndpoints;
    }