Examples of WrappedMap


Examples of helma.util.WrappedMap

     * Returns an read-only map of the custom cron jobs registered with the app
     *
     * @return a map of cron jobs
     */
    public Map getCronJobs() {
        return new WrappedMap(app.customCronJobs, true);
    }
View Full Code Here

Examples of helma.util.WrappedMap

     *
     * @return a readonly wrapper around the application's app properties
     */
    public Map getProperties() {
        if (properties == null) {
            properties = new WrappedMap(app.getProperties(), true);
        }
        return properties;
    }
View Full Code Here

Examples of helma.util.WrappedMap

     * Get a wrapper around the app's db properties
     *
     * @return a readonly wrapper around the application's db properties
     */
    public Map getDbProperties() {
        return new WrappedMap(app.getDbProperties(), true);
    }
View Full Code Here

Examples of helma.util.WrappedMap

     */
    public Map getAppsProperties() {
        Server server = Server.getServer();
        if (server == null)
            return new SystemMap();
        return new WrappedMap(server.getAppsProperties(app.getName()), true);
    }
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.jaxb.WrappedMap

      {
         StreamSource source = new StreamSource(entityStream);
         JAXBContext ctx = finder.findCacheContext(mediaType, annotations, JaxbMap.class, JaxbMap.Entry.class, valueType);
         JAXBElement<JaxbMap> ele = ctx.createUnmarshaller().unmarshal(source, JaxbMap.class);

         WrappedMap wrapped = FindAnnotation.findAnnotation(annotations, WrappedMap.class);
         if (wrapped != null)
         {
            if (!wrapped.map().equals(ele.getName().getLocalPart()))
            {
               throw new JAXBUnmarshalException("Map wrapping failed, expected root element name of " + wrapped.map() + " got " + ele.getName().getLocalPart());
            }
            if (!wrapped.namespace().equals(ele.getName().getNamespaceURI()))
            {
               throw new JAXBUnmarshalException("Map wrapping failed, expect namespace of " + wrapped.namespace() + " got " + ele.getName().getNamespaceURI());
            }
         }

         jaxbMap = ele.getValue();

         HashMap map = new HashMap();

         Unmarshaller unmarshaller = ctx.createUnmarshaller();
         unmarshaller = AbstractJAXBProvider.decorateUnmarshaller(valueType, annotations, mediaType, unmarshaller);

         for (int i = 0; i < jaxbMap.getValue().size(); i++)
         {
            Element element = (Element) jaxbMap.getValue().get(i);
            NamedNodeMap attributeMap = element.getAttributes();
            String keyValue = null;
            if (wrapped != null)
            {
               keyValue = element.getAttribute(wrapped.key());

            }
            else
            {
               if (attributeMap.getLength() == 0)
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.jaxb.WrappedMap

         String entryName = "entry";
         String keyName = "key";
         String namespaceURI = "";
         String prefix = "";

         WrappedMap wrapped = FindAnnotation.findAnnotation(annotations, WrappedMap.class);
         if (wrapped != null)
         {
            mapName = wrapped.map();
            entryName = wrapped.entry();
            namespaceURI = wrapped.namespace();
            prefix = wrapped.prefix();
            keyName = wrapped.key();
         }

         JaxbMap map = new JaxbMap(entryName, keyName, namespaceURI);

         Map<Object, Object> targetMap = (Map) target;
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.jaxb.WrappedMap

      return ann;
   }

   public static WrappedMap create(final String map, final String entry, final String key, final String namespace, final String prefix)
   {
      return new WrappedMap()
      {
         public String map()
         {
            return map == null ? "" : map;
         }
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.jaxb.WrappedMap

               source = new StreamSource(entityStream);
            }
           
            ele = ctx.createUnmarshaller().unmarshal(source, JaxbMap.class);
         }
         WrappedMap wrapped = FindAnnotation.findAnnotation(annotations, WrappedMap.class);
         if (wrapped != null)
         {
            if (!wrapped.map().equals(ele.getName().getLocalPart()))
            {
               throw new JAXBUnmarshalException("Map wrapping failed, expected root element name of " + wrapped.map() + " got " + ele.getName().getLocalPart());
            }
            if (!wrapped.namespace().equals(ele.getName().getNamespaceURI()))
            {
               throw new JAXBUnmarshalException("Map wrapping failed, expect namespace of " + wrapped.namespace() + " got " + ele.getName().getNamespaceURI());
            }
         }

         jaxbMap = ele.getValue();

         HashMap map = new HashMap();

         Unmarshaller unmarshaller = ctx.createUnmarshaller();
         unmarshaller = AbstractJAXBProvider.decorateUnmarshaller(valueType, annotations, mediaType, unmarshaller);

         for (int i = 0; i < jaxbMap.getValue().size(); i++)
         {
            Element element = (Element) jaxbMap.getValue().get(i);
            NamedNodeMap attributeMap = element.getAttributes();
            String keyValue = null;
            if (wrapped != null)
            {
               keyValue = element.getAttribute(wrapped.key());

            }
            else
            {
               if (attributeMap.getLength() == 0)
View Full Code Here

Examples of org.jboss.resteasy.annotations.providers.jaxb.WrappedMap

         String entryName = "entry";
         String keyName = "key";
         String namespaceURI = "";
         String prefix = "";

         WrappedMap wrapped = FindAnnotation.findAnnotation(annotations, WrappedMap.class);
         if (wrapped != null)
         {
            mapName = wrapped.map();
            entryName = wrapped.entry();
            namespaceURI = wrapped.namespace();
            prefix = wrapped.prefix();
            keyName = wrapped.key();
         }

         JaxbMap map = new JaxbMap(entryName, keyName, namespaceURI);

         Map<Object, Object> targetMap = (Map) target;
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.