Package org.apache.jetspeed.om.folder

Examples of org.apache.jetspeed.om.folder.FolderNotFoundException


            Folder folder = (Folder)getPersistenceBrokerTemplate().getObjectByQuery(query);
           
            // return folder or throw exception
            if (folder == null)
            {
                throw new FolderNotFoundException("Folder " + folderPath + " not found.");
            }

            // check for view access on folder
            folder.checkAccess(JetspeedActions.VIEW);

            return folder;
        }
        catch (FolderNotFoundException fnfe)
        {
            throw fnfe;
        }
        catch (SecurityException se)
        {
            throw se;
        }
        catch (Exception e)
        {
            throw new FolderNotFoundException("Folder " + folderPath + " not found.", e);
        }
    }
View Full Code Here


        {
            throw fnfe;
        }
        catch (Exception e)
        {
            throw new FolderNotFoundException("Folder " + folderPath + " not found.", e);
        }
    }
View Full Code Here

    {
        // get folder
        Folder folder = (Folder) getAllNodes().subset(Folder.FOLDER_TYPE).get(name);
        if (folder == null)
        {
            throw new FolderNotFoundException("Jetspeed PSML folder not found: " + name);
        }

        // check access
        if (checkAccess)
        {
View Full Code Here

            if (folder != null)
            {
                return folder;
            }
        }
        throw new FolderNotFoundException("Folder " + name + " not found at " + getPath());
    }
View Full Code Here

        // return search folders
        if (!searchFolders.isEmpty())
        {
            return searchFolders;
        }
        throw new FolderNotFoundException("Search folders at " + getPath() + " not found or accessible");
    }
View Full Code Here

        // return inheritance folders
        if (!inheritanceFolders.isEmpty())
        {
            return inheritanceFolders;
        }
        throw new FolderNotFoundException("Inheritance folders at " + getPath() + " not found or accessible");
    }
View Full Code Here

    {
        Folder folder = null;
        File folderFile = new File(documentRootDir, path);
        if(!folderFile.exists())
        {
            throw new FolderNotFoundException(folderFile.getAbsolutePath()+" does not exist.");
        }
       
        if(!folderFile.isDirectory())
        {
            throw new InvalidFolderException(folderFile.getAbsolutePath()+" is not a valid directory.");
View Full Code Here

    public NodeSet getFolders( String path ) throws FolderNotFoundException, InvalidFolderException, NodeException
    {
        File parent = new File(documentRootDir, path);
        if (!parent.exists())
        {
            throw new FolderNotFoundException("No folder exists at the path: " + parent.getAbsolutePath());
        }
        else
        {
            String[] children = getChildrenNames(path, FOLDER_FILTER);
            NodeSetImpl folders = new NodeSetImpl(path);
View Full Code Here

    protected String[] getChildrenNames( String path, FilenameFilter filter ) throws FolderNotFoundException
    {
        File parent = new File(documentRootDir, path);
        if (!parent.exists())
        {
            throw new FolderNotFoundException("No folder exists at the path: " + parent.getAbsolutePath());
        }
        else
        {
            if (filter != null)
            {
View Full Code Here

                    matchedFolders.add(matchedFolder);
                }
            }
            if ((matchedFolders == null) || (matchedFolders.size() == 0))
            {
                throw new FolderNotFoundException("Cannot find folder" + folderName + " in " + folder.getPath());
            }

            // match recursively over matched folders
            path = path.substring(separatorIndex);
            Iterator matchedFoldersIter = matchedFolders.iterator();
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.folder.FolderNotFoundException

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.