Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.PropertyInfo


        if (nid.getPath() == null) {
            PropertyId id = getIdFactory().createPropertyId(nid, NameConstants.JCR_UUID);
            QValue[] vs = new QValue[] {getQValueFactory().create(nid.getUniqueID(), PropertyType.STRING)};
            Path p = getPathFactory().create(nPath, NameConstants.JCR_UUID, true);
            PropertyInfo pi = new PropertyInfoImpl(id, p, PropertyType.STRING, false, vs);
            l.add(pi);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here


            throws ItemNotFoundException, RepositoryException {

        try {
            // Get item info from cache and use it if up to date
            Entry<PropertyInfo> cached = cache.getPropertyInfo(propertyId);
            PropertyInfo info;
            if (isUpToDate(cached, entry)) {
                info = cached.info;
            } else {
                // otherwise retreive item info from service and cache the whole batch
                info = service.getPropertyInfo(sessionInfo, propertyId);
View Full Code Here

            throws RepositoryException {

        try {
            // Get item info from cache
            Entry<PropertyInfo> cached = cache.getPropertyInfo(propertyId);
            PropertyInfo info;
            if (cached == null) {
                // or from service if not in cache
                info = service.getPropertyInfo(sessionInfo, propertyId);
            } else {
                info = cached.info;
View Full Code Here

        if (nid.getPath() == null) {
            PropertyId id = getIdFactory().createPropertyId(nid, NameConstants.JCR_UUID);
            QValue[] vs = new QValue[] {getQValueFactory().create(nid.getUniqueID(), PropertyType.STRING)};
            Path p = getPathFactory().create(nPath, NameConstants.JCR_UUID, true);
            PropertyInfo pi = new PropertyInfoImpl(id, p, PropertyType.STRING, false, vs);
            l.add(pi);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here

     */
    public PropertyState createPropertyState(PropertyId propertyId,
                                             PropertyEntry entry)
            throws ItemNotFoundException, RepositoryException {
        try {
            PropertyInfo info = service.getPropertyInfo(sessionInfo, propertyId);
            assertMatchingPath(info, entry);
            return createPropertyState(info, entry);
        } catch (PathNotFoundException e) {
            throw new ItemNotFoundException(e.getMessage());
        }
View Full Code Here

     * @inheritDoc
     * @see ItemStateFactory#createDeepPropertyState(PropertyId,NodeEntry)
     */
    public PropertyState createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException {
        try {
            PropertyInfo info = service.getPropertyInfo(sessionInfo, propertyId);
            PropertyState propState = createDeepPropertyState(info, anyParent, null);
            assertValidState(propState, info);
            return propState;
        } catch (PathNotFoundException e) {
            throw new ItemNotFoundException(e.getMessage());
View Full Code Here

        if (nid.getPath() == null) {
            PropertyId id = getIdFactory().createPropertyId(nid, NameConstants.JCR_UUID);
            QValue[] vs = new QValue[] {getQValueFactory().create(nid.getUniqueID(), PropertyType.STRING)};
            Path p = getPathFactory().create(nPath, NameConstants.JCR_UUID, true);
            PropertyInfo pi = new PropertyInfoImpl(id, p, PropertyType.STRING, false, vs);
            l.add(pi);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here

                isMultiValued = true;
            } else {
                throw new ItemNotFoundException("Unable to retrieve the property with id " + saveGetIdString(propertyId, resolver));
            }

            PropertyInfo pInfo = new PropertyInfoImpl(propertyId, path, type, isMultiValued, values);
            return pInfo;
        } catch (IOException e) {
            throw new RepositoryException(e);
        } catch (DavException e) {
            throw ExceptionConverter.generate(e);
View Full Code Here

            throws ItemNotFoundException, RepositoryException {

        try {
            // Get item info from cache and use it if up to date
            Entry<PropertyInfo> cached = cache.getPropertyInfo(propertyId);
            PropertyInfo info;
            if (isUpToDate(cached, entry)) {
                info = cached.info;
            } else {
                // otherwise retreive item info from service and cache the whole batch
                info = service.getPropertyInfo(sessionInfo, propertyId);
View Full Code Here

            throws RepositoryException {

        try {
            // Get item info from cache
            Entry<PropertyInfo> cached = cache.getPropertyInfo(propertyId);
            PropertyInfo info;
            if (cached == null) {
                // or from service if not in cache
                info = service.getPropertyInfo(sessionInfo, propertyId);
            } else {
                info = cached.info;
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.PropertyInfo

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.