Examples of Resources


Examples of com.sun.research.wadl.x2006.x10.Resources

     * Converts the <code>Application</code> XMLBean into a <code>UnitActionPackage</code> object.
     * @param application  the <code>Application</code> XMLBean to convert.
     * @return the converted <code>UnitActionPackage</code> object.
     */
    public static UnitActionPackage convertWADLtoUnitActionPackage(final Application application) {
        Resources resources = application.getResources();
        String baseURL = resources.getBase();
        if (!baseURL.endsWith("/")) {
            baseURL += "/";
        }
        List<Resource> resourceList = resources.getResourceList();

        List<UnitAction> unitActionList = new ArrayList<UnitAction>();
        for (Resource resource : resourceList) {
            unitActionList.addAll(convertResourceToUnitAction(resource));
        }
View Full Code Here

Examples of com.sun.research.ws.wadl.Resources

     * @return the JAXB WADL application bean
     */
    public ApplicationDescription generate(UriInfo info, Set<AbstractResource> resources) {
       
        Application wadlApplication = _wadlGenerator.createApplication(info);
        Resources wadlResources = _wadlGenerator.createResources();

        // for each resource
        for (AbstractResource r : resources) {
            Resource wadlResource = generateResource(r, null);
            wadlResources.getResource().add(wadlResource);
        }
        wadlApplication.getResources().add(wadlResources);

        addVersion(wadlApplication);

View Full Code Here

Examples of com.tonbeller.tbutils.res.Resources

     * If no dataSource name is given, values for jdbcDriver etc are needed. If these
     * values are present, they are taken. Otherwise, they are looked up in the resources
     * with the keys "jdbc.driver", "jdbc.url", "jdbc.user" and "jdbc.password".
     */
    public void allowOverride(RequestContext context) {
      Resources res = context.getResources();

      // get default values
      setRole(getDefault(res, "mondrian.role", getRole()));
      setDynResolver(getDefault(res, "mondrian.dynResolver", getDynResolver()));
      setDynLocale(getDefault(res, "mondrian.dynLocale", getDynLocale()));
View Full Code Here

Examples of de.matrixweb.smaller.resource.Resources

  }

  @Deprecated
  private Result prepareResult(final VFS vfs, final ResourceResolver resolver,
      final Task task) throws IOException {
    final Resources resources = new Resources();
    for (final String out : task.getOut()) {
      LOGGER.info("Preparing output file: {}", out);
      final String ext = FilenameUtils.getExtension(out);
      final VFile file = findLastModified(vfs.find("/"), ext);
      if (file != null) {
        final VFile target = vfs.find('/' + out);
        LOGGER.info("Copy '{}' -> '{}'", file, target);
        VFSUtils.copy(file, target);
        resources.addResource(resolver.resolve(target.getPath()));
      }
    }
    return new Result(resources);
  }
View Full Code Here

Examples of etch.util.Resources

   * @throws Exception
   */
  public static Resources initResources( Resources resources ) throws Exception
  {
    if (resources == null)
      resources = new Resources();
    else
      resources = new Resources( resources );
   
    if (!resources.containsKey( QUEUED_POOL ))
      resources.put( QUEUED_POOL, new QueuedPool() );
   
    if (!resources.containsKey( FREE_POOL ))
View Full Code Here

Examples of javax.annotation.Resources

        assert annotation instanceof Resource || annotation instanceof Resources : annotation;

        if (annotation instanceof Resource) {
            injectResourceClassLevel(clz, (Resource)annotation);
        } else if (annotation instanceof Resources) {
            Resources resources = (Resources)annotation;
            for (Resource resource : resources.value()) {
                injectResourceClassLevel(clz, resource);
            }
        }

    }
View Full Code Here

Examples of javax.annotation.Resources

         loadEnvEntry(container, xml.getEnvironmentEntries());
   }

   public void handleClassAnnotations(Class<?> clazz, InjectionContainer container)
   {
      Resources resources = container.getAnnotation(Resources.class, clazz);
      if (resources != null)
      {
      for (Resource ref : resources.value())
      {
         handleClassAnnotation(ref, container, clazz);
      }
      }
      Resource res = container.getAnnotation(Resource.class, clazz);
View Full Code Here

Examples of javax.annotation.Resources

//         loadEnvEntry(container, xml.getEnvironmentEntries());
   }

   public void handleClassAnnotations(Class<?> clazz, InjectionContainer container)
   {
      Resources resources = container.getAnnotation(Resources.class, clazz);
      if (resources != null)
      {
         for (Resource ref : resources.value())
         {
            handleClassAnnotation(ref, container, clazz);
         }
      }
      Resource res = container.getAnnotation(Resource.class, clazz);
View Full Code Here

Examples of javax.annotation.Resources

        }
        /* Process Resources annotation.
         * Ref JSR 250
         */
        if (classClass.isAnnotationPresent(Resources.class)) {
            Resources annotation = (Resources)
                classClass.getAnnotation(Resources.class);
            for (int i = 0; annotation.value() != null && i < annotation.value().length; i++) {
                addResource(context, annotation.value()[i]);
            }
        }
        /* Process EJB annotation.
         * Ref JSR 224, equivalent to the ejb-ref or ejb-local-ref
         * element in the deployment descriptor.
        if (classClass.isAnnotationPresent(EJB.class)) {
            EJB annotation = (EJB)
            classClass.getAnnotation(EJB.class);
           
            if ((annotation.mappedName().length() == 0) ||
                    annotation.mappedName().equals("Local")) {
               
                ContextLocalEjb ejb = new ContextLocalEjb();
               
                ejb.setName(annotation.name());
                ejb.setType(annotation.beanInterface().getCanonicalName());
                ejb.setDescription(annotation.description());
               
                ejb.setHome(annotation.beanName());
               
                context.getNamingResources().addLocalEjb(ejb);
               
            } else if (annotation.mappedName().equals("Remote")) {
               
                ContextEjb ejb = new ContextEjb();
               
                ejb.setName(annotation.name());
                ejb.setType(annotation.beanInterface().getCanonicalName());
                ejb.setDescription(annotation.description());
               
                ejb.setHome(annotation.beanName());
               
                context.getNamingResources().addEjb(ejb);
               
            }
           
        }
         */
        /* Process WebServiceRef annotation.
         * Ref JSR 224, equivalent to the service-ref element in
         * the deployment descriptor.
         * The service-ref registration is not implemented
        if (classClass.isAnnotationPresent(WebServiceRef.class)) {
            WebServiceRef annotation = (WebServiceRef)
            classClass.getAnnotation(WebServiceRef.class);
           
            ContextService service = new ContextService();
           
            service.setName(annotation.name());
            service.setWsdlfile(annotation.wsdlLocation());
           
            service.setType(annotation.type().getCanonicalName());
           
            if (annotation.value() == null)
                service.setServiceinterface(annotation.type().getCanonicalName());
           
            if (annotation.type().getCanonicalName().equals("Service"))
                service.setServiceinterface(annotation.type().getCanonicalName());
           
            if (annotation.value().getCanonicalName().equals("Endpoint"))
                service.setServiceendpoint(annotation.type().getCanonicalName());
           
            service.setPortlink(annotation.type().getCanonicalName());
           
            context.getNamingResources().addService(service);
           
           
        }
         */
        /* Process DeclareRoles annotation.
         * Ref JSR 250, equivalent to the security-role element in
         * the deployment descriptor
         */
        if (classClass.isAnnotationPresent(DeclareRoles.class)) {
            DeclareRoles annotation = (DeclareRoles)
                classClass.getAnnotation(DeclareRoles.class);
            for (int i = 0; annotation.value() != null && i < annotation.value().length; i++) {
                context.addSecurityRole(annotation.value()[i]);
            }
        }
       
       
    }
View Full Code Here

Examples of javax.annotation.Resources

        List<Class> classeswithResources = classFinder.findAnnotatedClasses(Resources.class);

        // Class-level annotation(s)
        List<Resource> resourceList = new ArrayList<Resource>();
        for (Class cls : classeswithResources) {
            Resources resources = (Resources) cls.getAnnotation(Resources.class);
            if (resources != null) {
                resourceList.addAll(Arrays.asList(resources.value()));
            }
            for (Resource resource : resourceList) {
                resourceProcessor.processResource(annotatedApp, resource, cls, null, null);
            }
            resourceList.clear();
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.