Package org.jdesktop.wonderland.modules.contentrepo.client

Examples of org.jdesktop.wonderland.modules.contentrepo.client.ContentRepositoryRegistry


      throw new AudioCacheHandlerException("Nonexistent file to upload " + s);
  }

  logger.warning("Upload File: " + s);

        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();

        ContentRepository repo = registry.getRepository(LoginManager.getPrimary());
 
        ContentCollection audioCollection = null;

        try {
      ContentCollection c = repo.getUserRoot();
View Full Code Here


    }
   
    private String uploadImage(File image) {

        String uri = "";
        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();
        ContentRepository repo = registry.getRepository(LoginManager.getPrimary());
        try {
            ContentCollection c = repo.getUserRoot();
            try {
                /*
                 * Remove file if it exists.
View Full Code Here

    }
   
    private String uploadFile(File file) {
        String fileName = file.getName();
        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();
        ContentRepository repo = registry.getRepository(LoginManager.getPrimary());
        ContentCollection userRoot;

        // First try to find the resource, if it exists, then simply upload the
        // new bits. Otherwise create the resource and upload the new bits
        try {
View Full Code Here

     * @param The user ContentCollection for the current primary session
     */
    private static ContentCollection getUserContentRepository()
            throws ContentRepositoryException {

        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();
        return registry.getLocalRepository();
    }
View Full Code Here

     */
    private static ContentCollection getSystemContentRepository()
            throws ContentRepositoryException {

        ServerSessionManager session = LoginManager.getPrimary();
        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();
        return registry.getRepository(session).getSystemRoot();
    }
View Full Code Here

        } catch (IOException ex) {
            Logger.getLogger(PlacemarkComponentProperties.class.getName()).log(Level.SEVERE, null, ex);
        }
       
        String uri = "";
        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();
        ContentRepository repo = registry.getRepository(LoginManager.getPrimary());
        try {
            ContentCollection c = repo.getUserRoot();
            try {
                /*
                 * Remove file if it exists.
View Full Code Here

     * @return A ContentCollection root for all server avatar config info
     */
    public static synchronized ContentCollection getBaseServerCollection(ServerSessionManager manager)
            throws ContentRepositoryException {

        ContentRepositoryRegistry reg = ContentRepositoryRegistry.getInstance();
        ContentRepository repository = reg.getRepository(manager);
        ContentCollection userDir = repository.getUserRoot(true);
        if (userDir == null) {
            logger.warning("Unable to find user content directory");
            throw new ContentRepositoryException("Unable to find user dir");
        }
View Full Code Here

        treeScrollPane.setViewportView(jtree);
        treePanel.add(treeScrollPane);

        // Add roots in the JTree for the System area and Users area in the
        // default content repository.
        ContentRepositoryRegistry registry =
                ContentRepositoryRegistry.getInstance();
        ContentRepository repo = registry.getRepository(session);
        try {
            ContentCollection sysCollection = repo.getSystemRoot();
            ContentCollection userCollection =
                    (ContentCollection) repo.getRoot().getChild("users");
            jtree.addTreeRoot(BUNDLE.getString("System"), sysCollection);
View Full Code Here

        if (session == null) {
            session = LoginManager.getPrimary();
        }

        // Fetch the content repository for the server session
        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();
        ContentRepository contentrepo = registry.getRepository(session);

        // Munge the asset path to include the system or user root prefix
        String totalPath = root + "/" + assetPath;
        try {
            // Fetch the content node based upon the path from the root and
View Full Code Here

     * @inheritDoc()
     */
    @Override
    public String isContentExists(File file) {
        String fileName = file.getName();
        ContentRepositoryRegistry registry = ContentRepositoryRegistry.getInstance();
        ContentRepository repo = registry.getRepository(loginInfo);
        try {
            ContentCollection userRoot = repo.getUserRoot();
            if (userRoot.getChild(fileName) != null) {
                return "wlcontent://users/" + loginInfo.getUsername() + "/" + fileName;
            }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.contentrepo.client.ContentRepositoryRegistry

Copyright © 2018 www.massapicom. 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.