Examples of FailedToUpdateFolderException


Examples of org.apache.jetspeed.page.document.FailedToUpdateFolderException

        // create underlying folder if it does not exist
        File folderFile = new File(documentRootDir, path);
        if ((folderFile.exists() && !folderFile.isDirectory()) || (!folderFile.exists() && !folderFile.mkdir()))
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" does not exist and cannot be created.");
        }

        // update metadata
        try
        {
            FolderMetaDataImpl metadata = folderImpl.getFolderMetaData();
            metadata.setPath(path + Folder.PATH_SEPARATOR + FolderMetaDataImpl.DOCUMENT_TYPE);
            metadataDocHandler.updateDocument(metadata);
        }
        catch (Exception e)
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" failed to update folder.metadata", e);
        }

        // add to cache
        addToCache(path, folder);
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.FailedToUpdateFolderException

        // create underlying folder if it does not exist
        File folderFile = new File(documentRootDir, path);
        if ((folderFile.exists() && !folderFile.isDirectory()) || (!folderFile.exists() && !folderFile.mkdir()))
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" does not exist and cannot be created.");
        }

        // update metadata
        try
        {
            FolderMetaDataImpl metadata = folderImpl.getFolderMetaData();
            metadata.setPath(path + Folder.PATH_SEPARATOR + FolderMetaDataImpl.DOCUMENT_TYPE);
            metadataDocHandler.updateDocument(metadata);
        }
        catch (Exception e)
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" failed to update folder.metadata", e);
        }

        // add to cache
        addToCache(path, folder);
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.FailedToUpdateFolderException

        // create underlying folder if it does not exist
        File folderFile = new File(documentRootDir, path);
        if ((folderFile.exists() && !folderFile.isDirectory()) || (!folderFile.exists() && !folderFile.mkdir()))
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" does not exist and cannot be created.");
        }

        // update metadata
        try
        {
            FolderMetaDataImpl metadata = folderImpl.getFolderMetaData();
            metadata.setPath(path + Folder.PATH_SEPARATOR + FolderMetaDataImpl.DOCUMENT_TYPE);
            metadataDocHandler.updateDocument(metadata);
        }
        catch (Exception e)
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" failed to update folder.metadata", e);
        }

        // add to cache
        addToCache(path, folder);
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.FailedToUpdateFolderException

        // create underlying folder if it does not exist
        File folderFile = new File(documentRootDir, path);
        if ((folderFile.exists() && !folderFile.isDirectory()) || (!folderFile.exists() && !folderFile.mkdir()))
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" does not exist and cannot be created.");
        }

        // update metadata
        try
        {
            FolderMetaDataImpl metadata = folderImpl.getFolderMetaData();
            metadata.setPath(path + Folder.PATH_SEPARATOR + FolderMetaDataImpl.DOCUMENT_TYPE);
            metadataDocHandler.updateDocument(metadata);
        }
        catch (Exception e)
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" failed to update folder.metadata", e);
        }

        // add to cache
        addToCache(path, folder);
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.FailedToUpdateFolderException

        // create underlying folder if it does not exist
        File folderFile = new File(documentRootDir, path);
        if ((folderFile.exists() && !folderFile.isDirectory()) || (!folderFile.exists() && !folderFile.mkdir()))
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" does not exist and cannot be created.");
        }

        // update metadata
        try
        {
            FolderMetaDataImpl metadata = folderImpl.getFolderMetaData();
            metadata.setPath(path + Folder.PATH_SEPARATOR + FolderMetaDataImpl.DOCUMENT_TYPE);
            metadataDocHandler.updateDocument(metadata);
        }
        catch (Exception e)
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" failed to update folder.metadata", e);
        }

        // add to cache
        addToCache(path, folder);
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.FailedToUpdateFolderException

        // create underlying folder if it does not exist
        File folderFile = new File(documentRootDir, path);
        if ((folderFile.exists() && !folderFile.isDirectory()) || (!folderFile.exists() && !folderFile.mkdir()))
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" does not exist and cannot be created.");
        }

        // update metadata
        try
        {
            FolderMetaDataImpl metadata = folderImpl.getFolderMetaData();
            metadata.setPath(path + Folder.PATH_SEPARATOR + FolderMetaDataImpl.DOCUMENT_TYPE);
            metadataDocHandler.updateDocument(metadata);
        }
        catch (Exception e)
        {
            throw new FailedToUpdateFolderException(folderFile.getAbsolutePath()+" failed to update folder.metadata", e);
        }

        // add to cache
        addToCache(path, 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.