Examples of GatewayObject


Examples of org.apache.ace.client.repository.object.GatewayObject

        throw new UnsupportedOperationException("Removing StatefulGatewayObjects is not supported.");
    }

    public StatefulGatewayObject preregister(Map<String, String> attributes, Map<String, String> tags) {
        synchronized(m_repository) {
            GatewayObject go = m_gatewayRepository.create(attributes, tags);
            return createStateful(go.getID());
        }
    }
View Full Code Here

Examples of org.apache.ace.client.repository.object.GatewayObject

     */
    @Test( groups = { TestUtils.UNIT } )
    public void testLicense2GatewayAssociations() {
        initializeRepositoryAdmin();
        LicenseObject l1 = createBasicLicenseObject("license1");
        GatewayObject g1 = createBasicGatewayObject("gateway1");
        m_license2gatewayRepository.create(l1, g1);

        assert l1.getGroups().size() == 0 : "License 1 should not be associated with any groups; it is associated with " + l1.getGroups().size() + ".";
        assert l1.getGateways().size() == 1 : "License 1 should be associated with exactly one gateway; it is associated with " + l1.getGateways().size() + ".";

        assert g1.getLicenses().size() == 1 : "Gateway 1 should be associated with exactly one license; it is associated with " + g1.getLicenses().size() + ".";
    }
View Full Code Here

Examples of org.apache.ace.client.repository.object.GatewayObject

        }
    }

    public void unregister(String gatewayID) {
        synchronized(m_repository) {
            GatewayObject go = getGatewayObject(gatewayID);
            if (go == null) {
                throw new IllegalArgumentException(gatewayID + " does not represent a GatewayObject.");
            }
            else {
                m_gatewayRepository.remove(go);
View Full Code Here

Examples of org.apache.ace.client.repository.object.GatewayObject

     * @param gatewayID A string representing a gateway.
     * @return An array of artifact URLs.
     * @throws java.io.IOException When there is a problem processing an artifact for deployment.
     */
    DeploymentArtifact[] getNecessaryDeploymentArtifacts(String gatewayID, String version) throws IOException {
        GatewayObject go = getGatewayObject(gatewayID);

        Map<ArtifactObject, String> bundles = new HashMap<ArtifactObject, String>();
        Map<ArtifactObject, String> artifacts = new HashMap<ArtifactObject, String>();

        // First, find all basic bundles and artifacts. An while we're traversing the
        // tree of objects, build the tree of properties.
        if (go != null) {
            for (LicenseObject license : go.getLicenses()) {
                for (GroupObject group : license.getGroups()) {
                    for (ArtifactObject artifact : group.getArtifacts()) {
                        if (m_bundleHelper.canUse(artifact)) {
                            bundles.put(artifact, m_bundleHelper.getResourceProcessorPIDs(artifact));
                        }
View Full Code Here

Examples of org.apache.ace.client.repository.object.GatewayObject

    /**
     * Quick method to find all artifacts that need to be deployed to a gateway.
    */
    ArtifactObject[] getNecessaryArtifacts(String gatewayID) {
        List<ArtifactObject> result = new ArrayList<ArtifactObject>();
        GatewayObject go = getGatewayObject(gatewayID);

        Map<String, ArtifactObject> allProcessors = new HashMap<String, ArtifactObject>();
        for (ArtifactObject bundle : m_artifactRepository.getResourceProcessors()) {
            allProcessors.put(m_bundleHelper.getResourceProcessorPIDs(bundle), bundle);
        }

        if (go != null) {
            for (LicenseObject license : go.getLicenses()) {
                for (GroupObject group : license.getGroups()) {
                    for (ArtifactObject artifact : group.getArtifacts()) {
                        result.add(artifact);
                        if (!m_bundleHelper.canUse(artifact)) {
                            ArtifactObject processor = allProcessors.get(artifact.getProcessorPID());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.