Examples of ExternalResource


Examples of org.apache.syncope.core.persistence.beans.ExternalResource

        assertEquals(1, task.getExecs().size());
    }

    @Test
    public void save() {
        ExternalResource resource = resourceDAO.find("ws-target-resource-1");
        assertNotNull(resource);

        SyncopeUser user = userDAO.find(2L);
        assertNotNull(user);
View Full Code Here

Examples of org.apache.tapestry.asset.ExternalResource

    private IComponentSpecification createSimpleCompSpec(String componentName, Class<?> componentClass) throws NoSuchMethodError {
        IComponentSpecification compSpec = createMock(IComponentSpecification.class);
        expect(compSpec.getPublicId()).andReturn(null);
        expect(compSpec.getComponentClassName()).andReturn(componentClass.getName());
        expect(compSpec.getDescription()).andReturn(componentName);
        Resource res = new ExternalResource("dummy", null);
        expect(compSpec.getSpecificationLocation()).andReturn(res).anyTimes();
        return compSpec;
    }
View Full Code Here

Examples of org.apache.uima.fit.descriptor.ExternalResource

    for (Field field : cls.getDeclaredFields()) {
      if (!ReflectionUtil.isAnnotationPresent(field, ExternalResource.class)) {
        continue;
      }
     
      ExternalResource era = ReflectionUtil.getAnnotation(field, ExternalResource.class);

      // Get the resource key. If it is a nested resource, also get the prefix.
      String key = era.key();
      if (key.length() == 0) {
        key = field.getName();
      }
      if (object instanceof ExternalResourceAware) {
        String prefix = ((ExternalResourceAware) object).getResourceName();
        if (prefix != null) {
          key = prefix + PREFIX_SEPARATOR + key;
        }
      }

      // Obtain the resource
      Object value = getResourceObject(context, key);
      if (value instanceof ExternalResourceLocator) {
        value = ((ExternalResourceLocator) value).getResource();
      }

      // Sanity checks
      if (value == null && era.mandatory()) {
        throw new ResourceInitializationException(new IllegalStateException("Mandatory resource ["
                + key + "] is not set on [" + baseCls + "]"));
      }

      // Now record the setting and optionally apply it to the given
View Full Code Here

Examples of org.freeplane.view.swing.features.filepreview.ExternalResource

    private ExternalResource getExternalObjectModel() {
        return (ExternalResource) getDelegate().getExtension(ExternalResource.class);
    }

    public String getUri() {
        final ExternalResource externalObject = getExternalObjectModel();
        final URI uri = externalObject == null ? null : externalObject.getUri();
        return uri == null ? null : uri.toString();
    }
View Full Code Here

Examples of org.gradle.internal.resource.ExternalResource

        super(progressLoggerFactory);
        this.delegate = delegate;
    }

    public ExternalResource getResource(URI location) throws IOException {
        ExternalResource resource = delegate.getResource(location);
        if (resource != null) {
            return new ProgressLoggingExternalResource(resource);
        } else {
            return null;
        }
View Full Code Here

Examples of org.junit.rules.ExternalResource

        this.tearDownCallback = tearDownCallback;
        this.resourceResolverType = resourceResolverType;

        // user default rule that directly executes each test method once
        setResourceResolverType(this.resourceResolverType);
        this.delegate = new ExternalResource() {
            @Override
            protected void before() {
                SlingContext.this.setUp();
                SlingContext.this.executeSetUpCallback();
            }
View Full Code Here

Examples of q_impress.pmi.lib.project.ExternalResource

            ResourcesPlugin.getWorkspace().getRoot(),
            "Select the resource");
        if (dialog.open() == ContainerSelectionDialog.OK) {
          if (dialog.getResult().length == 1) {
            org.eclipse.core.resources.IResource selectedRes = (org.eclipse.core.resources.IResource) dialog.getResult()[0];
            ExternalResource resource = (ExternalResource) getSelectedResource();
            resource.setLocation(selectedRes.getFullPath().toOSString());
            resourceSectionPart.markStale();
            resourceSectionPart.markDirty();
          } else {
            MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
                "Resource selection", "Only one resource must be selected");
View Full Code Here

Examples of spark.resource.ExternalResource

     */
    public static void configureExternalStaticResources(String folder) {
        if (!externalStaticResourcesSet) {
            if (folder != null) {
                try {
                    ExternalResource resource = new ExternalResource(folder);
                    if (resource.getFile().isDirectory()) {
                        if (staticResourceHandlers == null) {
                            staticResourceHandlers = new ArrayList<>();
                        }
                        staticResourceHandlers.add(new ExternalResourceHandler(folder, "index.html"));
                        LOG.info("External StaticResourceHandler configured with folder = " + folder);
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.