Examples of ResourceProxy


Examples of com.sun.star.lib.sandbox.ResourceProxy

    _applet = null;
    }
   
    private void loadArchive(String archive) throws MalformedURLException, IOException {
    ResourceProxy jarResourceProxy = ResourceProxy.load(new URL(_baseURL, archive), null /*_protectionDomain*/);
    jarResourceProxy.loadJar(_baseURL);
    _jarResourceProxys.addElement(jarResourceProxy);
    }
View Full Code Here

Examples of com.sun.star.lib.sandbox.ResourceProxy

    public native void showDocument( URL url, String aTarget );
    public native void showStatus( String status );
    */
   
    public AudioClip getAudioClip(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        AudioClip audioClip = resourceProxy.getAudioClip();

    return audioClip;
    }
View Full Code Here

Examples of com.sun.star.lib.sandbox.ResourceProxy

    return audioClip;
    }

    public Image getImage(URL url) {
    ResourceProxy resourceProxy = ResourceProxy.load(url, null);
        Image image = toolkit.createImage(resourceProxy.getImageProducer());
   
    return image;
    }
View Full Code Here

Examples of com.sun.star.lib.sandbox.ResourceProxy

    return content;
  }
 
    public void connect() throws IOException {
    debug("Looking for "+cachedURL+" in AppletResourceLoader");
    ResourceProxy resourceProxy = ResourceProxy.load(cachedURL, null);

    Object content = getContent(resourceProxy, cachedURL);

    if (content == null) {
      debug("Invalid resource name");
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

        assertThat(serializationData, is(nullValue()));
    }

    private ResourceProxy newResourceWithProperties(Map<String, Object> properties) {
        ResourceProxy resource = new ResourceProxy("/");
        for (Map.Entry<String, Object> entry : properties.entrySet()) {
            resource.addProperty(entry.getKey(), entry.getValue());
        }
        return resource;
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

            path = parent.getPath() + name;
        } else {
            path = parent.getPath() + "/" + name;
        }

        ResourceProxy resourceProxy = new ResourceProxy(path);
        // set defaults
        resourceProxy.addProperty("jcr:nodeTypeName", name);
        resourceProxy.addProperty("jcr:primaryType", "nt:nodeType");
        resourceProxy.addProperty("jcr:isMixin", false);
        resourceProxy.addProperty("jcr:mixinTypes", new String[] {});
        return new NodeTypeResourceBuilder(resourceProxy);
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

    @Override
    protected ResourceProxy execute0(Session session) throws RepositoryException {

        Node node = session.getNode(getPath());

        ResourceProxy parent = nodeToResource(node);

        addChildren(parent, node, levels-1);
       
        return parent;
    }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

            // TODO - this should not be needed if we obey the vlt filters
            if (childNode.getPath().equals("/jcr:system")) {
                continue;
            }

            final ResourceProxy childResourceProxy = nodeToResource(childNode);
            parent.addChild(childResourceProxy);
           
            if (remainingLevels>0) {
                addChildren(childResourceProxy, childNode, remainingLevels-1);
            }
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

        //TODO change responseAsString with something like
        //return EncodingUtil.getString(rawdata, m.getResponseCharSet());
            if (!isSuccessStatus(responseStatus))
                return failureResultForStatusCode(responseStatus);

            ResourceProxy resource = new ResourceProxy(path);

            JSONObject json = new JSONObject(get.getResponseBodyAsString());
            String primaryType = json.optString(Repository.JCR_PRIMARY_TYPE);
            if (primaryType != null) { // TODO - needed?
                resource.addProperty(Repository.JCR_PRIMARY_TYPE, primaryType);
            }

            // TODO - populate all properties

            for (Iterator<?> keyIterator = json.keys(); keyIterator.hasNext();) {

                String key = (String) keyIterator.next();
                JSONObject value = json.optJSONObject(key);
                if (value != null) {
                    ResourceProxy child = new ResourceProxy(PathUtil.join(path, key));
                    child.addProperty(Repository.JCR_PRIMARY_TYPE, value.optString(Repository.JCR_PRIMARY_TYPE));
                    resource.addChild(child);
                }
            }
       
            return AbstractResult.success(resource);
View Full Code Here

Examples of org.apache.sling.ide.transport.ResourceProxy

            SerializationDataHandler h = new SerializationDataHandler();

            saxParser.parse(new InputSource(source), h);

            return new ResourceProxy(filePath, h.getResult());
        } catch (ParserConfigurationException e) {
            // TODO proper exception handling
            throw new RuntimeException(e);
        } catch (SAXException e) {
            // TODO proper exception handling
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.