Initializes the properties from a multiple resources.

@param resources Sources of properties.
@throws IOException IO exception.
428945
public void setResources(Resource[] resources) throws IOException {
        clear();
        
        for (Resource resource : resources) {
            addResource(resource);
        }
    }
106809
public void setSources(java.util.Collection<SourceConfig> sources) {
        if (sources == null) {
            this.sources = null;
            return;
        }

        this.sources = new java.util.ArrayList<SourceConfig>(sources);
    }
1075838
public void setSources(java.util.Collection<Source> sources) {
        if (sources == null) {
            this.sources = null;
            return;
        }

        this.sources = new java.util.ArrayList<Source>(sources);
    }
388721
public void setS3Resources(java.util.Collection<S3Resource> s3Resources) {
        if (s3Resources == null) {
            this.s3Resources = null;
            return;
        }

        this.s3Resources = new java.util.ArrayList<S3Resource>(s3Resources);
    }
218351
@PostConstruct
    public void init(Map<String,String> properties) {

        vmTransportUrl = properties.getOrDefault(KEY_VM_TRANSPORT_URL, KEY_VM_TRANSPORT_URL_DEFAULT);
        memberInteractionsQueueName = properties.getOrDefault(KEY_MEMBER_INTERACTIONS_QUEUE,
                KEY_MEMBER_INTERACTIONS_QUEUE_DEFAULT);

        jmsConnectionFactory = new ActiveMQConnectionFactory(vmTransportUrl);

        try {
            jmsConnection = jmsConnectionFactory.createConnection();
        } catch (JMSException e) {
            LOG.error("Unable to create connection", e);
            throw new RuntimeException(e);
        }

        try {
            jmsConnection.start();
        } catch (JMSException e) {
            LOG.error("Unable to start connection", e);
            closeSafely(jmsConnection);
            jmsConnection = null;
        }
    }
290225
private void init(Set<CmsResource> resources, List<CmsUser> user) {

        addStyleName("o-no-padding");
        m_container = new IndexedContainer();
        m_container.addContainerProperty(PROP_ELEMENT, CmsResourceInfo.class, null);

        for (CmsResource res : resources) {
            Item item = m_container.addItem(res);
            if (item != null) { //Item is null if resource is dependency of multiple groups/user to delete
                item.getItemProperty(PROP_ELEMENT).setValue(new CmsResourceInfo(res));
            }
        }
        if (user != null) {
            for (CmsUser us : user) {
                Item item = m_container.addItem(us);
                if (item != null) { //Item is null if User is dependency of multiple groups to delete
                    item.getItemProperty(PROP_ELEMENT).setValue(
                        new CmsResourceInfo(
                            us.getSimpleName(),
                            us.getDescription(),
                            new CmsCssIcon(OpenCmsTheme.ICON_USER)));
                }
            }
        }
        setColumnHeaderMode(ColumnHeaderMode.HIDDEN);
        setContainerDataSource(m_container);
        setVisibleColumns(PROP_ELEMENT);

    }
813148
public static void copyResource(String resource, File destination) throws IOException {
        InputStream is = null;
        FileOutputStream fos = null;

        try {
            is = FileUtils.class.getResourceAsStream("/" + resource);
            fos = new FileOutputStream(destination);

            final byte[] buffer = new byte[10 * 1024];
            int len;
            while ((len = is.read(buffer)) > 0) {
                fos.write(buffer, 0, len);
            }
        } finally {
            close(is);
            close(fos);
        }

    }
695608
public void init(CmsObject cms, List<CmsResource> resources) {

        m_cms = cms;
        m_resources = resources;
    }
162327
public static PropertiesSettings from(String resource) throws IOException
    {
        return from(resource, Thread.currentThread().getContextClassLoader());
    }
116354
public void add(List<T> resources)
    {
        for(T resource : resources)
        {
            if(resource.getId() != null)
                ids.put(resource.getId(), resource);
            if(resource instanceof NamedResource)
                addName((NamedResource)resource);
        }
    }
219083
protected Properties loadProperties(Resource resource, String filename) throws IOException {
		InputStream is = resource.getInputStream();
		Properties props = new Properties();
		try {
			if (resource.getFilename().endsWith(XML_SUFFIX)) {
				if (logger.isDebugEnabled()) {
					logger.debug("Loading properties [" + resource.getFilename() + "]");
				}
				this.propertiesPersister.loadFromXml(props, is);
			}
			else {
				String encoding = null;
				if (this.fileEncodings != null) {
					encoding = this.fileEncodings.getProperty(filename);
				}
				if (encoding == null) {
					encoding = this.defaultEncoding;
				}
				if (encoding != null) {
					if (logger.isDebugEnabled()) {
						logger.debug("Loading properties [" + resource.getFilename() + "] with encoding '" + encoding + "'");
					}
					this.propertiesPersister.load(props, new InputStreamReader(is, encoding));
				}
				else {
					if (logger.isDebugEnabled()) {
						logger.debug("Loading properties [" + resource.getFilename() + "]");
					}
					this.propertiesPersister.load(props, is);
				}
			}
			return props;
		}
		finally {
			is.close();
		}
	}
293038
public void setAllocatedResource(final AllocatedResource resource) {

		final Iterator<ExecutionVertex> it = this.vertices.iterator();
		while (it.hasNext()) {
			final ExecutionVertex vertex = it.next();
			vertex.setAllocatedResource(resource);
		}
	}
146386
public static Properties loadFromResource(ServletContext servletContext, String resource) throws IOException {
		Properties props = new Properties();
		InputStream in = servletContext.getResourceAsStream(resource);
		if(in==null) throw new LocalizedIOException(accessor, "PropertiesUtils.readProperties.resourceNotFound", resource);
		try {
			props.load(in);
		} finally {
			in.close();
		}
		return props;
	}
924076
@Override
    public void initialize(Map<String, Object> puProperties)
    {
        this.externalProperties = puProperties;

        this.propertyReader = new ESClientPropertyReader(externalProperties, kunderaMetadata.getApplicationMetadata()
                .getPersistenceUnitMetadata(getPersistenceUnit()));
        propertyReader.read(getPersistenceUnit());
    }
780842
public void setResources(java.util.Collection<HandshakeResource> resources) {
        if (resources == null) {
            this.resources = null;
            return;
        }

        this.resources = new java.util.ArrayList<HandshakeResource>(resources);
    }
623623
public void setProperties(final Properties properties) {
    this.properties = (null == properties) ? new Properties() : (Properties)properties.clone();
  }
601394
private void init(CmsResource resource, CmsObject cms) {

        List<CmsProperty> properties;

        try {
            properties = cms.readPropertyObjects(resource, false);
        } catch (CmsException e) {
            m_priority = 0;
            m_title = "";
            return;
        }

        try {
            m_priority = Integer.parseInt(
                CmsProperty.get(CmsPriorityResourceCollector.PROPERTY_PRIORITY, properties).getValue());
        } catch (NumberFormatException e) {
            m_priority = CmsPriorityResourceCollector.PRIORITY_STANDARD;
        }

        m_title = CmsProperty.get(CmsPropertyDefinition.PROPERTY_TITLE, properties).getValue();
        if (CmsStringUtil.isEmpty(m_title)) {
            m_title = "";
        }
    }