Gets an array of resource service properties from a {@link ResourceFactory} service reference.

@param ref a ResourceFactory service reference
@return service properties
340807
private Dictionary<String, Object> getServiceProperties(ServiceReference<ResourceFactory> ref) {
        String[] keys = ref.getPropertyKeys();
        Dictionary<String, Object> properties = new Hashtable<String, Object>(keys.length);
        for (String key : keys) {
            if (!key.equals(ResourceFactory.JNDI_NAME) &&
                !key.equals(ResourceFactory.CREATES_OBJECT_CLASS)) {
                properties.put(key, ref.getProperty(key));
            }
        }

        properties.put(ResourceFactory.class.getName(), "true");
        properties.put(JNDI_SERVICENAME, ref.getProperty(ResourceFactory.JNDI_NAME));

        return properties;
    }
650267
public UrlResourceReference[] getExternalJavaScriptResourceReferences() {
        final List<UrlResourceReference> resources = new ArrayList<UrlResourceReference>();

        for (final String resource : jsResources) {
            // Provide resources with FQL URLs
            if (resource.startsWith("//") || resource.startsWith("http")) {
                resources.add(new UrlResourceReference(Url.parse(resource)));
            }
        }
        return resources.toArray(new UrlResourceReference[resources.size()]);
    }
1092451
@Override
    public ManagedServiceFactory addingService(ServiceReference<ManagedServiceFactory> reference) {
        String[] factoryPids = getServicePid(reference);
        if (factoryPids == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "handleRegistration(): Invalid service.pid type: " + reference);
            }

            return null;
        }

        ManagedServiceFactory msf = context.getService(reference);
        if (msf == null)
            return null;

        synchronized (caFactory.getConfigurationStore()) {

            for (String factoryPid : factoryPids) {
                add(reference, factoryPid, msf);
            }
        }

        return msf;
    }
1304910
public <T> List<Key<T>> getKeysByManualRefs(final Class<T> clazz, final List<Object> refs) {
        final String collection = getCollectionName(clazz);
        final List<Key<T>> keys = new ArrayList<Key<T>>(refs.size());
        for (final Object ref : refs) {
            keys.add(this.<T>manualRefToKey(collection, ref));
        }

        return keys;
    }
539849
@SuppressWarnings("unchecked")
    @Override
    public <S> S getService(ServiceReference<S> reference) {
        return (S) serviceImplementations.get(reference);
    }
644223
public List<PropertyType<ConnectionFactoryResourceType<T>>> getAllProperty()
   {
      List<PropertyType<ConnectionFactoryResourceType<T>>> list = new ArrayList<PropertyType<ConnectionFactoryResourceType<T>>>();
      List<Node> nodeList = childNode.get("property");
      for(Node node: nodeList)
      {
         PropertyType<ConnectionFactoryResourceType<T>>  type = new PropertyTypeImpl<ConnectionFactoryResourceType<T>>(this, "property", childNode, node);
         list.add(type);
      }
      return list;
   }
568231
public static Map<String, String> toMap(ServiceReference reference)
    {
        LOGGER.entering(CLASS_NAME, "toMap", reference);

        Map<String, String> result = new Hashtable<String, String>();

        for (String key : reference.getPropertyKeys())
        {
            result.put(key, reference.getProperty(key).toString());
        }

        LOGGER.exiting(CLASS_NAME, "toMap", result);

        return result;
    }
534756
private ReferenceDescriptorDef cloneReference(ReferenceDescriptorDef refDef, String prefix)
    {
        ReferenceDescriptorDef copyRefDef = new ReferenceDescriptorDef(refDef, prefix);

        copyRefDef.setOwner(this);
        // we remove properties that are only relevant to the class the features are declared in
        copyRefDef.setProperty(PropertyHelper.OJB_PROPERTY_IGNORE, null);
        
        Properties mod = getModification(copyRefDef.getName());

        if (mod != null)
        {
            if (!PropertyHelper.toBoolean(mod.getProperty(PropertyHelper.OJB_PROPERTY_IGNORE), false) &&
                hasFeature(copyRefDef.getName()))
            {
                LogHelper.warn(true,
                               ClassDescriptorDef.class,
                               "process",
                               "Class "+getName()+" has a feature that has the same name as its included reference "+
                               copyRefDef.getName()+" from class "+refDef.getOwner().getName()); 
            }
            copyRefDef.applyModifications(mod);
        }
        return copyRefDef;
    }
1325034
private ServiceInfo generateServiceInfo(ServiceReference reference)
    {
        Map<String, String> map = Utils.toMap(reference);
        Set<String> keys = map.keySet();

        String slpUrl = Utils.subst((String)reference.getProperty(SLP_URL), map);

        ServiceURL serviceURL;
        if (keys.contains(SLP_URL_LIFETIME))
        {
            try
            {
                int lifetime = Integer.parseInt((String)reference.getProperty(SLP_URL_LIFETIME));
                serviceURL = new ServiceURL(slpUrl, lifetime);
            }
            catch (NumberFormatException e)
            {
                serviceURL = new ServiceURL(slpUrl);
            }
        }
        else
        {
            serviceURL = new ServiceURL(slpUrl);
        }

        String language;

        if (keys.contains(SLP_LANGUAGE)) language = (String)reference.getProperty(SLP_LANGUAGE);
        else language = Locale.getDefault().getLanguage();

        Scopes scopes = Scopes.NONE;
        if (keys.contains(SLP_SCOPES))
        {
            String[] values = ((String)reference.getProperty(SLP_SCOPES)).split(",");
            for (int i = 0; i < values.length; i++) values[i] = values[i].trim();
            scopes = Scopes.from(values);
        }

        ServiceType serviceType = null;
        if (keys.contains(SLP_SERVICE_TYPE))
        {
            serviceType = new ServiceType((String)reference.getProperty(SLP_SERVICE_TYPE));
        }

        map.remove(SLP_URL);
        map.remove(SLP_URL_LIFETIME);
        map.remove(SLP_LANGUAGE);
        map.remove(SLP_SCOPES);
        map.remove(SLP_SERVICE_TYPE);

        Attributes attributes = Attributes.from(map);

        ServiceInfo serviceInfo;
        if (serviceType != null)
        {
            serviceInfo = new ServiceInfo(serviceType, serviceURL, language, scopes, attributes);
        }
        else
        {
            serviceInfo = new ServiceInfo(serviceURL, language, scopes, attributes);
        }

        return serviceInfo;
    }
78449
@SuppressWarnings("static-method")
	public List<JvmTypeReference> findTypeValues(JvmAnnotationReference reference) {
		assert reference != null;
		final List<JvmTypeReference> values = new ArrayList<>();
		for (final JvmAnnotationValue value : reference.getValues()) {
			if (value instanceof JvmTypeAnnotationValue) {
				for (final JvmTypeReference strValue : ((JvmTypeAnnotationValue) value).getValues()) {
					if (strValue != null) {
						values.add(strValue);
					}
				}
			}
		}
		return values;
	}
1301805
@Override
    public Map<String, Object> getProperties() {
        JsonObject json = null;
        JsonObject tmp;

        tmp = config.getJsonObject(CONFIG_PROPERTIES);
        if (tmp != null) {
            json = tmp;
        }

        tmp = config.getJsonObject(CONFIG_RESOURCE_CONFIG);
        if (tmp != null) {
            if (json == null) {
                json = tmp;
            } else {
                json.mergeIn(tmp);
            }
        }

        return json == null ? null : json.getMap();
    }
28117
public Collection<MethodDescriptor<KEY>> getAllServiceDescriptors()
            throws IllegalStateException {
        Preconditions.checkNotNull(serviceDescriptors, "serviceDescriptors cannot be null");
        return serviceDescriptors.values();
    }
339161
@Override
    public ServiceReference<?> getServiceReference(String clazz) {
    	Collection<ServiceReference<?>> servrefs = serviceRegistrations.get(clazz);
    	if (servrefs == null || servrefs.size() == 0) {
            return null;
    	}

        return servrefs.iterator().next();
    }
1290652
public ServiceRefType<WebAppDescriptor> getOrCreateServiceRef()
   {
      List<Node> nodeList = model.get("service-ref");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ServiceRefTypeImpl<WebAppDescriptor>(this, "service-ref", model, nodeList.get(0));
      }
      return createServiceRef();
   }
117396
@Override
    public Properties getProperties() {
        Properties properties = new Properties();
        if (persistenceUnitXml.getProperties() != null && persistenceUnitXml.getProperties().getProperty() != null) {
            for (Persistence.PersistenceUnit.Properties.Property p : persistenceUnitXml.getProperties().getProperty()) {
                properties.put(p.getName(), p.getValue());
            }
        }
        return properties;
    }
589833
@Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE)
    protected Map<String, Object> setAuthorization(ServiceReference<AuthorizationService> ref) {
        if (hasPropertiesFromFile(ref)) {
            String id = (String) ref.getProperty(KEY_ID);
            if (id != null) {
                authorization.putReference(id, ref);
            } else {
                Tr.error(tc, "SECURITY_SERVICE_REQUIRED_SERVICE_WITHOUT_ID", KEY_AUTHORIZATION);
            }
        } else {
            authorization.putReference(String.valueOf(ref.getProperty(KEY_SERVICE_ID)), ref);
        }

        // determine a new authorization service
        authzService.set(null);
        return getServiceProperties();
    }
1104219
public String getRefCollectionType(Reference ref) {
		String type = ref.getCollectionType();
		return (type == null ? "set" : type.toLowerCase());
	}