Examples of TargetObject


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

        }
    }

    public StatefulTargetObject preregister(Map<String, String> attributes, Map<String, String> tags) {
        synchronized (m_repository) {
            TargetObject to = m_targetRepository.create(attributes, tags);
            return createStateful(to.getID());
        }
    }
View Full Code Here

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

        }
    }

    public void unregister(String targetID) {
        synchronized (m_repository) {
            TargetObject to = getTargetObject(targetID);
            if (to == null) {
                throw new IllegalArgumentException(targetID + " does not represent a TargetObject.");
            }
            else {
                m_targetRepository.remove(to);
View Full Code Here

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

     * @return An array of artifact URLs.
     * @throws java.io.IOException
     *             When there is a problem processing an artifact for deployment.
     */
    DeploymentArtifact[] getNecessaryDeploymentArtifacts(String targetID, String version) throws IOException {
        TargetObject to = getTargetObject(targetID);

        Map<ArtifactObject, String> bundles = new HashMap<ArtifactObject, String>();
        Map<ArtifactObject, String> artifacts = new HashMap<ArtifactObject, String>();
        Map<ArtifactObject, Map<FeatureObject, List<DistributionObject>>> path =
            new HashMap<ArtifactObject, Map<FeatureObject, List<DistributionObject>>>();

        // First, find all basic bundles and artifacts. An while we're traversing the
        // tree of objects, build the tree of properties.
        if (to != null) {
            for (DistributionObject distribution : to.getDistributions()) {
                for (FeatureObject feature : distribution.getFeatures()) {
                    for (ArtifactObject artifact : feature.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.TargetObject

     * Quick method to find all artifacts that need to be deployed to a target.
     */
    // TODO this method strongly resembles part of getNecessaryDeploymentArtifacts(), merge code?!
    ArtifactObject[] getNecessaryArtifacts(String targetID) {
        List<ArtifactObject> result = new ArrayList<ArtifactObject>();
        TargetObject to = getTargetObject(targetID);

        Map<String, ArtifactObject> allProcessors = getAllProcessors();
        if (to != null) {
            for (DistributionObject distribution : to.getDistributions()) {
                for (FeatureObject feature : distribution.getFeatures()) {
                    for (ArtifactObject artifact : feature.getArtifacts()) {
                        result.add(artifact);
                        if (!m_bundleHelper.canUse(artifact)) {
                            String processorPID = artifact.getProcessorPID();
View Full Code Here

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

     */
    @Test(groups = { TestUtils.UNIT })
    public void testDistribution2TargetAssociations() {
        initializeRepositoryAdmin();
        DistributionObject d1 = createBasicDistributionObject("distribution1");
        TargetObject t1 = createBasicTargetObject("target1");
        m_distribution2TargetRepository.create(d1, t1);

        assert d1.getFeatures().size() == 0 : "Distribution 1 should not be associated with any features; it is associated with " + d1.getFeatures().size() + ".";
        assert d1.getTargets().size() == 1 : "Distribution 1 should be associated with exactly one target; it is associated with " + d1.getTargets().size() + ".";

        assert t1.getDistributions().size() == 1 : "Target 1 should be associated with exactly one distribution; it is associated with " + t1.getDistributions().size() + ".";
    }
View Full Code Here

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

            if (StatefulTargetObject.TOPIC_CHANGED.equals(topic) || RepositoryAdmin.TOPIC_STATUSCHANGED.equals(topic)) {
                update(target);
            }
        }
        else {
            TargetObject target = (TargetObject) entity;
            if (TargetObject.TOPIC_ADDED.equals(topic)) {
                addToTable(target);
            }
            if (TargetObject.TOPIC_REMOVED.equals(topic)) {
                removeFromTable(target);
View Full Code Here

Examples of org.cedj.geekseek.domain.relation.test.model.TargetObject

    private GraphRelationRepository repository;

    @Before
    public void createTypes() {
        source = new SourceObject(SOURCE_ID);
        target = new TargetObject(TARGET_ID);
        type = "SPEAKING";
    }
View Full Code Here

Examples of org.cedj.geekseek.domain.relation.test.model.TargetObject

    }

    @Before
    public void createTypes() {
        source = new SourceObject(SOURCE_ID);
        target = new TargetObject(TARGET_ID);
    }
View Full Code Here

Examples of org.cedj.geekseek.domain.relation.test.model.TargetObject

        return new TargetRepresentation(source.getId(), uriInfo);
    }

    @Override
    public TargetObject to(UriInfo uriInfo, TargetRepresentation representation) {
        return new TargetObject(representation.getId());
    }
View Full Code Here

Examples of org.cedj.geekseek.domain.relation.test.model.TargetObject

    }

    @Before
    public void createTypes() {
        source = new SourceObject(SOURCE_ID);
        target = new TargetObject(TARGET_ID);
        type = "SPEAKING";
    }
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.