Package org.apache.excalibur.source

Examples of org.apache.excalibur.source.SourceException


                if (((String) children.nextElement()).startsWith(this.config.getFilesPath())) {
                    i++;
                }
            return i;
        } catch (SlideException se) {
            throw new SourceException("Could not get children", se);
        }
    }
View Full Code Here


                    i++;
                }
            }
            return null;
        } catch (SlideException se) {
            throw new SourceException("Could not get children", se);
        }
    }
View Full Code Here

            try {
                nat.rollback();
            } catch (Exception rbe) {
                getLogger().error("Rollback failed for creating collection", rbe);
            }
            throw new SourceException("Could not create collection.", se);
        }
    }
View Full Code Here

            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof SubjectNode)) {
                    throw new SourceException("Principal '"+
                                              ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for principal '"+
                                          ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                          "'", se);
            }

        } else if (sourcepermission instanceof GroupSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((GroupSourcePermission) sourcepermission).getGroup();

            // Test if group exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof GroupNode)) {
                    throw new SourceException("Group '"+
                                              ((GroupSourcePermission) sourcepermission).getGroup()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for group '"+
                                          ((GroupSourcePermission) sourcepermission).getGroup()+
                                          "'", se);
            }

            subject = "+"+subject; // Additional '+' to expand the group
        } else {
            throw new SourceException("Does't support category of permission");
        }

        boolean negative = sourcepermission.isNegative();
        boolean inheritable = sourcepermission.isInheritable();
View Full Code Here

            try {
                nat.rollback();
            } catch (Exception rbe) {
                getLogger().error("Rollback failed for granting permission", rbe);
            }  
            throw new SourceException("Couldn't grant permission", se);
        }
    }
View Full Code Here

            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof SubjectNode)) {
                    throw new SourceException("Principal '"+
                                              ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for principal '"+
                                          ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                          "'", se);
            }

        } else if (sourcepermission instanceof GroupSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((GroupSourcePermission) sourcepermission).getGroup();

            // Test if group exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof GroupNode)) {
                    throw new SourceException("Group '"+
                                              ((GroupSourcePermission) sourcepermission).getGroup()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for group '"+
                                          ((GroupSourcePermission) sourcepermission).getGroup()+
                                          "'", se);
            }

            subject = "+"+subject; // Additional '+' to expand the group
        } else {
            throw new SourceException("Does't support category of permission");
        }

        boolean negative = sourcepermission.isNegative();
        boolean inheritable = sourcepermission.isInheritable();
View Full Code Here

            try {
                nat.rollback();
            } catch (Exception rbe) {
                getLogger().error("Rollback failed for removing permission", rbe);
            }
            throw new SourceException("Couldn't remove permission", se);
        }
    }
View Full Code Here

                        }

                        sourcepermissions.add(sourcepermission);
                    }
                } catch (SlideException se) {
                    throw new SourceException("Exception eccurs while retrieveing source permission",
                                              se);
                }

                inheritedPermissions = true;

                try {
                    current = structure.getParent(this.slideToken, current);
                } catch (SlideException e) {
                    break;
                }
            }

            SourcePermission[] sourcepermissionArray = new SourcePermission[sourcepermissions.size()];

            return (SourcePermission[]) sourcepermissions.toArray((Object[]) sourcepermissionArray);

        } catch (SlideException se) {
            throw new SourceException("Exception eccurs while retrieveing source permission",
                                      se);
        }
    }
View Full Code Here

     * @param sourcelock Lock, which should be added
     *
     * @throws SourceException If an exception occurs during this operation
     */
    public void addSourceLocks(SourceLock sourcelock) throws SourceException {
        throw new SourceException("Operation not yet supported");
    }
View Full Code Here

                                                      lock.isExclusive()));
            }

            return sourcelocks.elements();
        } catch (SlideException se) {
            throw new SourceException("Could not retrieve locks", se);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.SourceException

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.