Package org.apache.lenya.cms.metadata

Examples of org.apache.lenya.cms.metadata.MetaDataException


    }

    public void setValue(String key, String value) throws MetaDataException {
        checkKey(key);
        if (value == null) {
            throw new MetaDataException("The value for key [" + key + "] must not be null.");
        }
        getHandler().setValue(this.namespaceUri, key, value);
    }
View Full Code Here


    }

    public void addValue(String key, String value) throws MetaDataException {
        checkKey(key);
        if (!getElementSet().getElement(key).isMultiple() && getValues(key).length > 0) {
            throw new MetaDataException("The element [" + key
                    + "] doesn't support multiple values!");
        }
        getHandler().addValue(this.namespaceUri, key, value);
    }
View Full Code Here

    public long getLastModified() throws MetaDataException {
        try {
            return getHandler().getLastModified();
        } catch (RepositoryException e) {
            throw new MetaDataException(e);
        }
    }
View Full Code Here

           
            MetaDataRegistry registry = null;
            try {
                registry = (MetaDataRegistry) this.manager.lookup(MetaDataRegistry.ROLE);
                if (!registry.isRegistered(namespaceUri)) {
                    throw new MetaDataException("The namespace [" + namespaceUri
                            + "] is not registered!");
                }
            } catch (ServiceException e) {
                throw new MetaDataException(e);
            } finally {
                if (registry != null) {
                    this.manager.release(registry);
                }
            }
View Full Code Here

                        this.namespace2metamap.put(namespace, element2values);
                    }
                }
            }
        } catch (Exception e) {
            throw new MetaDataException(e);
        }
    }
View Full Code Here

                    }
                }
            } catch (MetaDataException e) {
                throw e;
            } catch (Exception e) {
                throw new MetaDataException(e);
            } finally {
                if (registry != null) {
                    this.manager.release(registry);
                }
            }
View Full Code Here

        MetaDataRegistry registry = null;
        try {
            registry = (MetaDataRegistry) this.manager.lookup(MetaDataRegistry.ROLE);
            return registry.getNamespaceUris();
        } catch (ServiceException e) {
            throw new MetaDataException(e);
        } finally {
            if (registry != null) {
                this.manager.release(registry);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.metadata.MetaDataException

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.