Package org.apache.jetspeed.om.registry

Examples of org.apache.jetspeed.om.registry.InvalidEntryException


                {
                    Integer pos = ((Integer)idx.get(name));

                    if (pos == null)
                    {
                        throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
                    }

                    entry = (RegistryEntry)entries.get(pos.intValue()) ;
                }
            }
        }
        catch(Exception e)
        {
            // this will happen if for some reasons the index and vector are desynchronized.
            // before throwing an exception, rebuild the idx to prevent further errors
            synchronized(entries)
            {
                buildIdx();
            }

            logger.error("getEntry: index and vector are not in synch.", e);
            throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
        }

        return entry;
    }
View Full Code Here


                buildIdx();
            }

            if ( this.idx.containsKey( entry.getName() ) == false )
            {
                throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+entry.getName());
            }

            int pos = ((Integer)idx.get(entry.getName())).intValue();

            this.entries.set( pos, entry );
View Full Code Here

                buildIdx();
            }

            if ( this.idx.containsKey( entry.getName() ) )
            {
                throw new InvalidEntryException( InvalidEntryException.ENTRY_ALREADY_PRESENT );
            }

            int pos = this.entries.size();
            this.entries.add( entry );
            this.idx.put( entry.getName(), new Integer(pos) );
View Full Code Here

                {
                    Integer pos = ((Integer)idx.get(name));

                    if (pos == null)
                    {
                        throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
                    }

                    entry = (RegistryEntry)entries.get(pos.intValue()) ;
                }
            }
        }
        catch(Exception e)
        {
            // this will happen if for some reasons the index and vector are desynchronized.
            // before throwing an exception, rebuild the idx to prevent further errors
            synchronized(entries)
            {
                buildIdx();
            }

            logger.error("getEntry: index and vector are not in synch.", e);
            throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
        }

        return entry;
    }
View Full Code Here

                buildIdx();
            }

            if ( this.idx.containsKey( entry.getName() ) == false )
            {
                throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+entry.getName());
            }

            int pos = ((Integer)idx.get(entry.getName())).intValue();

            this.entries.set( pos, entry );
View Full Code Here

                buildIdx();
            }

            if ( this.idx.containsKey( entry.getName() ) )
            {
                throw new InvalidEntryException( InvalidEntryException.ENTRY_ALREADY_PRESENT );
            }

            int pos = this.entries.size();
            this.entries.add( entry );
            this.idx.put( entry.getName(), new Integer(pos) );
View Full Code Here

                {
                    Integer pos = ((Integer)idx.get(name));

                    if (pos == null)
                    {
                        throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
                    }

                    entry = (RegistryEntry)entries.get(pos.intValue()) ;
                }
            }
        }
        catch(Exception e)
        {
            // this will happen if for some reasons the index and vector are desynchronized.
            // before throwing an exception, rebuild the idx to prevent further errors
            synchronized(entries)
            {
                buildIdx();
            }

            throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
        }

        return entry;
    }
View Full Code Here

                buildIdx();
            }

            if ( this.idx.containsKey( entry.getName() ) == false )
            {
                throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+entry.getName());
            }

            int pos = ((Integer)idx.get(entry.getName())).intValue();

            this.entries.set( pos, entry );
View Full Code Here

                buildIdx();
            }

            if ( this.idx.containsKey( entry.getName() ) )
            {
                throw new InvalidEntryException( InvalidEntryException.ENTRY_ALREADY_PRESENT );
            }

            int pos = this.entries.size();
            this.entries.add( entry );
            this.idx.put( entry.getName(), new Integer(pos) );
View Full Code Here

            entry = (RegistryEntry)this.entries.get( name ) ;
        }

        if (entry == null)
        {
            throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
        }

        return entry;
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.registry.InvalidEntryException

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.