Examples of ResourceFactory


Examples of org.mcisb.ui.util.ResourceFactory

    super( dialog, new GenericBean() );
    this.parent = parent;
    this.recordModelFactory = recordModelFactory;
    this.node = node;
    this.experiment = experiment;
    init( resourceBundle.getString( "FileExporterApp.title" ), resourceBundle.getString( "FileExporterApp.error" ), new ResourceFactory().getImageIcon( resourceBundle.getString( "FileExporterApp.icon" ) ).getImage() ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  }

Examples of org.mortbay.resource.ResourceFactory

            out.close();
        }
       
        directory=Resource.newResource(files[0].getParentFile().getAbsolutePath());
       
        factory = new ResourceFactory()
        {
            public Resource getResource(String path)
            {
                try
                {

Examples of org.rhq.plugins.perftest.resource.ResourceFactory

        ResourceDiscoveryContext context = new ResourceDiscoveryContext(resourceType, null, null, null, null, null,
            "test", PluginContainerDeployment.AGENT);

        // Test
        ScenarioManager manager = ScenarioManager.getInstance();
        ResourceFactory resourceFactory = manager.getResourceFactory("server-a");
        Set<DiscoveredResourceDetails> resources = resourceFactory.discoverResources(context);

        // Verify
        assert resources != null : "Null set of resources returned from resource factory";
        assert resources.size() == 10 : "Incorrect number of resources returned from resource factory. Expected: 10, Found: "
            + resources.size();

Examples of org.rhq.plugins.perftest.resource.ResourceFactory

        ResourceDiscoveryContext context = new ResourceDiscoveryContext(resourceType, null, null, null, null, null,
            "test", PluginContainerDeployment.AGENT);

        // Test
        ScenarioManager manager = ScenarioManager.getInstance();
        ResourceFactory resourceFactory = manager.getResourceFactory("server-c");
        Set<DiscoveredResourceDetails> resources = resourceFactory.discoverResources(context);

        // Verify
        assert resources != null : "Null set of resources returned from resource factory";
        assert resources.size() == 0 : "Incorrect number of resources returned from resource factory. Expected: 0, Found: "
            + resources.size();

Examples of org.rhq.plugins.perftest.resource.ResourceFactory

        ResourceDiscoveryContext context = new ResourceDiscoveryContext(resourceType, null, null, null, null, null,
            "test", PluginContainerDeployment.AGENT);

        // Test
        ScenarioManager manager = ScenarioManager.getInstance();
        ResourceFactory resourceFactory = manager.getResourceFactory("server-b");
        Set<DiscoveredResourceDetails> resources = resourceFactory.discoverResources(context);

        // Verify
        assert resources != null : "Null set of resources returned from resource factory";
        assert resources.size() == 20 : "Incorrect number of resources returned from resource factory. Expected: 20, Found: "
            + resources.size();

Examples of org.rhq.plugins.perftest.resource.ResourceFactory

     *
     * @return resource factory instance to use to generate the discovery for resources of this type; this will never be
     *         <code>null</code>.
     */
    public ResourceFactory getResourceFactory(String resourceTypeName) {
        ResourceFactory resourceFactory = resourceFactories.get(resourceTypeName);

        // Lazy load the factory
        if (resourceFactory == null) {
            Resource resource = findResource(resourceTypeName);
            if (resource == null) {

Examples of org.rhq.plugins.perftest.resource.ResourceFactory

        ResourceType resourceType = context.getResourceType();

        ScenarioManager manager = ScenarioManager.getInstance();
        Set<DiscoveredResourceDetails> allResourceDetails = null;
        if (manager.isEnabled()) {
            ResourceFactory resourceFactory = manager.getResourceFactory(resourceType.getName());
            allResourceDetails = resourceFactory.discoverResources(context);

            String value = System.getProperty(SYSPROP_DISCOVERY);
            if (value != null) {
                if (value.equalsIgnoreCase("error")) {
                    throw new Exception("The rogue discovery component was configured to throw this exception");

Examples of org.rhq.plugins.perftest.resource.ResourceFactory

        ResourceType resourceType = context.getResourceType();

        ScenarioManager manager = ScenarioManager.getInstance();
        Set<DiscoveredResourceDetails> resourceDetails = null;
        if (manager.isEnabled()) {
            ResourceFactory resourceFactory = manager.getResourceFactory(resourceType.getName());
            if (resourceFactory==null)
                return Collections.emptySet();
           
            resourceDetails = resourceFactory.discoverResources(context);

            // If there is a plugin configuration factory defined, run it on each resource
            ConfigurationFactory configurationFactory = manager.getPluginConfigurationFactory(resourceType.getName());
            if (configurationFactory != null) {
                for (DiscoveredResourceDetails details : resourceDetails) {

Examples of org.richfaces.resource.ResourceFactory

        testFeatureSpecificMappingFile();
    }

    private void verifyResourcesPresent(Resource... expectedResources) {
        for (Resource expectedResource : expectedResources) {
            ResourceFactory resourceFactory = new ResourceFactoryImpl(null);
            Resource resource = resourceFactory.createResource(expectedResource.getResourceName(),
                    expectedResource.getLibraryName(), null);

            assertNotNull(
                    "resource is not present: " + expectedResource.getLibraryName() + ":" + expectedResource.getResourceName(),
                    resource);

Examples of org.richfaces.resource.ResourceFactory

        }
    }

    private void verifyResourceNotPresent(Resource... nonPresentResources) {
        for (Resource notPresentResource : nonPresentResources) {
            ResourceFactory resourceFactory = new ResourceFactoryImpl(null);
            Resource resource = resourceFactory.createResource(notPresentResource.getResourceName(),
                    notPresentResource.getLibraryName(), null);

            assertNull(resource);
        }
    }
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.