Examples of ArtifactHelper


Examples of org.apache.ace.client.repository.helper.ArtifactHelper

      }
  }

    public void testStatefulApprovalWithArtifacts() throws Exception {
        // some setup: we need a helper.
        ArtifactHelper myHelper = new MockArtifactHelper("mymime");

        Properties serviceProps = new Properties();
        serviceProps.put(ArtifactHelper.KEY_MIMETYPE, "mymime");

        Component myHelperService = m_dependencyManager.createComponent()
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

        return new ArrayList<ArtifactObject>();
    }

    @Override
    ArtifactObjectImpl createNewInhabitant(Map<String, String> attributes) {
        ArtifactHelper helper = getHelper(attributes.get(ArtifactObject.KEY_MIMETYPE));
        return new ArtifactObjectImpl(helper.checkAttributes(attributes), helper.getMandatoryAttributes(), this, this);
    }
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

        return new ArtifactObjectImpl(helper.checkAttributes(attributes), helper.getMandatoryAttributes(), this, this);
    }

    @Override
    ArtifactObjectImpl createNewInhabitant(Map<String, String> attributes, Map<String, String> tags) {
        ArtifactHelper helper = getHelper(attributes.get(ArtifactObject.KEY_MIMETYPE));
        ArtifactObjectImpl ao = new ArtifactObjectImpl(helper.checkAttributes(attributes), helper.getMandatoryAttributes(), tags, this, this);
        return ao;
    }
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

        synchronized (m_helpers) {
            if ((mimetype == null) || (mimetype.length() == 0)) {
                throw new IllegalArgumentException("Without a mimetype, we cannot find a helper.");
            }

            ArtifactHelper helper = m_helpers.get(mimetype.toLowerCase());

            if (helper == null) {
                throw new IllegalArgumentException("There are no ArtifactHelpers known for type '" + mimetype + "'.");
            }
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

            }
            checkURL(artifact);

            Map<Class<?>, Object> fromArtifact = findRecognizerAndHelper(artifact);
            ArtifactRecognizer recognizer = (ArtifactRecognizer) fromArtifact.get(ArtifactRecognizer.class);
            ArtifactHelper helper = (ArtifactHelper) fromArtifact.get(ArtifactHelper.class);
            String mimetype = (String) fromArtifact.get(String.class);

            return importArtifact(artifact, recognizer, helper, mimetype, false, upload);
        }
        catch (IllegalArgumentException iae) {
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

            checkURL(artifact);

            Map<Class<?>, Object> fromMimetype = findRecognizerAndHelper(mimetype);
            ArtifactRecognizer recognizer = (ArtifactRecognizer) fromMimetype.get(ArtifactRecognizer.class);
            ArtifactHelper helper = (ArtifactHelper) fromMimetype.get(ArtifactHelper.class);

            return importArtifact(artifact, recognizer, helper, mimetype, true, upload);
        }
        catch (IllegalArgumentException iae) {
            m_log.log(LogService.LOG_INFO, "Error importing artifact: " + iae.getMessage());
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

        TestUtils.configureObject(m_artifactRepository, BundleContext.class, bc);
    }

    @Test( groups = { TestUtils.UNIT } )
    public void testAttributeChecking() {
        ArtifactHelper helper = new MockHelper("yourURL");

        try {
            createArtifact("myMime", "myUrl", null, null);
            assert false : "There is no helper for this type of artifact.";
        }
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

    public void testStatefulApprovalWithArtifacts() throws Exception {
        setupRepository();
       
        // some setup: we need a helper.
        ArtifactHelper myHelper = new MockArtifactHelper("mymime");

        Properties serviceProps = new Properties();
        serviceProps.put(ArtifactHelper.KEY_MIMETYPE, "mymime");

        Component myHelperService = m_dependencyManager.createComponent()
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

        return new ArrayList<ArtifactObject>();
    }

    @Override
    ArtifactObjectImpl createNewInhabitant(Map<String, String> attributes, Map<String, String> tags) {
        ArtifactHelper helper = getHelper(attributes.get(ArtifactObject.KEY_MIMETYPE));
        ArtifactObjectImpl ao = new ArtifactObjectImpl(helper.checkAttributes(attributes), helper.getMandatoryAttributes(), tags, this, this);
        return ao;
    }
View Full Code Here

Examples of org.apache.ace.client.repository.helper.ArtifactHelper

        synchronized (m_helpers) {
            if ((mimetype == null) || (mimetype.length() == 0)) {
                throw new IllegalArgumentException("Without a mimetype, we cannot find a helper.");
            }

            ArtifactHelper helper = m_helpers.get(mimetype.toLowerCase());

            if (helper == null) {
                throw new IllegalArgumentException("There are no ArtifactHelpers known for type '" + mimetype + "'.");
            }
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.