Examples of ResourceProperty


Examples of com.sun.enterprise.repository.ResourceProperty

        mailProperties.put(MAIL_FROM, mailFrom);
        mailProperties.put(MAIL_DEBUG, (debug ? "true" : "false"));

        // Get the properties and save to Property list
        Set properties = mailResource.getProperties();
        ResourceProperty property = null;
        String name = null;
        String value = null;

        String protRelatedHostName = MAIL_PREFIX + storeProtocol +
                        MAIL_SUFFIX_HOST;
        String protRelatedUserName = MAIL_PREFIX + storeProtocol +
                        MAIL_SUFFIX_USER;

        for (Iterator it = properties.iterator(); it.hasNext();) {
            property = (ResourceProperty)it.next();
            name = property.getName();
            value = (String)property.getValue();

            if(name.startsWith(PROP_NAME_PREFIX_LEGACY)) {
                name = name.replace(PROP_NAME_DELIM_LEGACY, MAIL_DELIM);
            }
View Full Code Here

Examples of de.fuberlin.wiwiss.pubby.ResourceDescription.ResourceProperty

    if (resource == null) return false;

    Model descriptions = config.getDataSource().listPropertyValues(
        controller.getAbsoluteIRI(), predicate, isInverse);
    if (descriptions.isEmpty()) return false;
    ResourceProperty property = new ResourceDescription(
        controller, descriptions, config).getProperty(predicate, isInverse);
    if (property == null) return false// Can happen if prefix is declared in URI space of a data source rather than in web space
   
    VelocityHelper template = new VelocityHelper(getServletContext(), response);
    Context context = template.getVelocityContext();
    context.put("project_name", config.getProjectName());
    context.put("project_link", config.getProjectLink());
    context.put("uri", resource.getURI());
    context.put("server_base", config.getWebApplicationBaseURI());
    context.put("title", resource.getTitle());
    context.put("head_title", resource.getTitle() + " \u00BB " + property.getCompleteLabel());
    context.put("property", property);
    context.put("back_uri", controller.getBrowsableURL());
    context.put("back_label", resource.getTitle());
    context.put("rdf_link", isInverse ? controller.getInverseValuesDataURL(predicate) : controller.getValuesDataURL(predicate));
    context.put("showLabels", config.showLabels());
View Full Code Here

Examples of de.fuberlin.wiwiss.pubby.ResourceDescription.ResourceProperty

    if (resource == null) return false;

    Model descriptions = config.getDataSource().listPropertyValues(
        controller.getAbsoluteIRI(), predicate, isInverse);
    if (descriptions.isEmpty()) return false;
    ResourceProperty property = new ResourceDescription(
        controller, descriptions, config).getProperty(predicate, isInverse);
    if (property == null) return false// Can happen if prefix is declared in URI space of a data source rather than in web space

    addDocumentMetadata(descriptions, controller,
        addQueryString(
            isInverse
                ? controller.getInverseValuesDataURL(predicate)
                : controller.getValuesDataURL(predicate),
            request),
        getDocumentTitle(
            resource.getTitle(), property.getCompleteLabel(), isInverse));
   
    new ModelResponse(descriptions, request, response).serve();
    return true;
  }
View Full Code Here

Examples of org.apache.sling.validation.api.ResourceProperty

                            }
                        }
                        validatorsMap.put(v, validatorArgumentsMap);
                    }
                }
                ResourceProperty f = new ResourcePropertyImpl(fieldName, type, propertyMultiple, validatorsMap);
                properties.add(f);
            }
        }
        return properties;
    }
View Full Code Here

Examples of org.apache.ws.resource.properties.ResourceProperty

        }
        if ( nameOfPropToBeDeleted == null )
        {
            throw new DeleteResourcePropertyRequestFailedFaultException( getNamespaceSet(), MSG.getMessage( Keys.DEL_MISSING_RP_ATTRIB ) );
        }
        ResourceProperty prop = getProperties().get( nameOfPropToBeDeleted );
        if ( prop == null )
        {
            if ( getProperties().getMetaData().isOpenContent() )
            {
                return;
            }
            else
            {
                throw new InvalidResourcePropertyQNameFaultException( getNamespaceSet(), nameOfPropToBeDeleted );
            }
        }
        throwFaultIfPropertyIsReadOnly( prop );
        throwFaultIfDeletionViolatesSchema( prop );
        try
        {
            deletePropertyCallback( prop );
        }
        catch ( RuntimeException re )
        {
            throw new DeleteResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }
        Object[] oldValue = getValue( prop );
        prop.clear();
        Object[] newValue = null;
        firePropChangeEvents( prop, oldValue, newValue );
    }
View Full Code Here

Examples of org.apache.ws.resource.properties.ResourceProperty

        {
            throw new InvalidInsertResourcePropertiesRequestContentFaultException( getNamespaceSet(), MSG.getMessage( Keys.ERROR_INSERT_ELEMS_NOT_HOMOGENOUS ) );
        }

        QName propName = XmlBeanUtils.getName( propElemsToBeInserted[0] );
        ResourceProperty prop = getProperty( propName );

        if(prop == null)
        {
            prop = createAnyProperty(propName);
            getProperties().add(prop);
        }

        if(!prop.getMetaData().isAny())
        {
            throwFaultIfInsertionViolatesSchema( prop, propElemsToBeInserted );
        }

        throwFaultIfPropertyIsReadOnly( prop );

        try
        {
            insertPropertyCallback( prop, propElemsToBeInserted );
        }
        catch ( RuntimeException re )
        {
            throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }

        Object[] oldValue = getValue( prop );
        for ( int i = 0; i < propElemsToBeInserted.length; i++ )
        {
            try
            {
                prop.add( propElemsToBeInserted[i] );
            }
            catch ( MetaDataViolationException mdve )
            {
                throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), mdve );
            }
View Full Code Here

Examples of org.apache.ws.resource.properties.ResourceProperty

        if ( newPropElems.length == 0 )
        {
            return; // nothing to do
        }
        QName propName = XmlBeanUtils.getName( newPropElems[0] );
        ResourceProperty prop = getProperty( propName );

        throwFaultIfPropertyIsReadOnly( prop );
        if ( elementNamesNotHomogenous( newPropElems ) )
        {
            throw new InvalidUpdateResourcePropertiesRequestContentFaultException( getNamespaceSet(), MSG.getMessage( Keys.ERROR_UPDATE_ELEMS_NOT_HOMOGENOUS ) );
        }
        throwFaultIfUpdateViolatesSchema( prop, newPropElems );

        try
        {
            updatePropertyCallback( prop, newPropElems );
        }
        catch ( RuntimeException re )
        {
            throw new SetResourcePropertyRequestFailedFaultException( getNamespaceSet(), re.toString() );
        }

        Object[] oldValue = getValue( prop );

        try
        {
            prop.clear();
            for ( int i = 0; i < newPropElems.length; i++ )
            {
                prop.add( newPropElems[i] );
            }
        }
        catch ( MetaDataViolationException mdve )
        {
            throw new InvalidSetResourcePropertiesRequestContentFaultException( getNamespaceSet(), mdve );
View Full Code Here

Examples of org.apache.ws.resource.properties.ResourceProperty

    private ResourceProperty getProperty( QName propName )
    {
        LOG.debug( MSG.getMessage( Keys.GET_RP_WITH_NAME,
                propName.toString() ) );
        ResourceProperty prop = getProperties().get( propName );
        if ( prop == null )
        {
            if ( !getProperties().getMetaData().isOpenContent() )
            {
                throw new InvalidResourcePropertyQNameFaultException( getNamespaceSet(), propName );
View Full Code Here

Examples of org.apache.ws.resource.properties.ResourceProperty

    {
        if ( LOG.isDebugEnabled() )
        {
            LOG.debug( MSG.getMessage( Keys.GET_RP_REQ, propName ) );
        }
        ResourceProperty prop = getProperties().get( propName );
        if ( prop == null )
        {
            throw new InvalidResourcePropertyQNameFaultException( getNamespaceSet(), propName );
        }
        refreshProperty( prop );
View Full Code Here

Examples of org.apache.ws.resource.properties.ResourceProperty

    {
        LOG.debug( MSG.getMessage( Keys.CLEAR_PROP_SET ) );
        Collection props = m_propsMap.values();
        for ( Iterator iterator = props.iterator(); iterator.hasNext(); )
        {
            ResourceProperty prop = (ResourceProperty) iterator.next();
            prop.clear();
            m_propsMap.remove( prop.getMetaData().getName() );
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.