Package org.apache.jetspeed.prefs.om

Examples of org.apache.jetspeed.prefs.om.Property


        String value = null;
        Collection properties = node.getNodeProperties();

        for (Iterator i = properties.iterator(); i.hasNext();)
        {
            Property curProp = (Property) i.next();
            if ((null != curProp) && (null != curProp.getPropertyName()) && (curProp.getPropertyName().equals(key)))
            {
                value = curProp.getPropertyValue();
            }
        }
        return value;
    }
View Full Code Here


        Collection propCol = node.getNodeProperties();
        if ((null != propCol) && propCol.size() > 0)
        {
            for (Iterator j = propCol.iterator(); j.hasNext();)
            {
                Property curprop = (Property) j.next();
                if ((null != curprop) && (null != curprop.getPropertyName())
                        && !propertyNames.contains(curprop.getPropertyName()))
                {
                    propertyNames.add(curprop.getPropertyName());
                }
            }
        }

        return (String[]) propertyNames.toArray(new String[propertyNames.size()]);
View Full Code Here

        // If the property exists, update its value.
        boolean propFound = false;
        for (Iterator i = properties.iterator(); i.hasNext();)
        {
            Property curProp = (Property) i.next();
            if ((null != curProp) && (null != curProp.getPropertyName()) && curProp.getPropertyName().equals(key))
            {
                propFound = true;
                curProp.setPropertyValue(value);
                curProp.setModifiedDate(new Timestamp(System.currentTimeMillis()));
                if (log.isDebugEnabled())
                {
                    log.debug("Update existing property: " + curProp.toString());
                }
                // Property found, we break.
                break;
            }
        }
View Full Code Here

    {
        Collection properties = node.getNodeProperties();

        for (Iterator i = properties.iterator(); i.hasNext();)
        {
            Property curProp = (Property) i.next();

            if ((curProp.getPropertyName().equals(key)))
            {
                i.remove();
            }
        }
        // Update node.
View Full Code Here

        Collection properties = node.getNodeProperties();
        // if the property exists, update its value.
        boolean propFound = false;
        for (Iterator i = properties.iterator(); i.hasNext();)
        {
            Property curProp = (Property) i.next();
            if ((null != curProp) && (null != curProp.getPropertyName()) && curProp.getPropertyName().equals(key))
            {
                propFound = true;
                curProp.setPropertyValue(value);
                curProp.setModifiedDate(new Timestamp(System.currentTimeMillis()));
                break;
            }
        }
        // add new property value
        if (!propFound)
View Full Code Here

        Node node = getNode();
        Collection properties = node.getNodeProperties();
        // return value
        for (Iterator i = properties.iterator(); i.hasNext();)
        {
            Property curProp = (Property) i.next();
            if ((null != curProp) && (null != curProp.getPropertyName()) && (curProp.getPropertyName().equals(key)))
            {
                return curProp.getPropertyValue();
            }
        }
        return def;
    }
View Full Code Here

        Collection properties = node.getNodeProperties();
        // remove property if found
        boolean removed = false;
        for (Iterator i = properties.iterator(); i.hasNext();)
        {
            Property curProp = (Property) i.next();
            if ((curProp.getPropertyName().equals(key)))
            {
                i.remove();
                removed = true;
                break;
            }
View Full Code Here

        ArrayList propertyNames = new ArrayList();
        if ((null != properties) && properties.size() > 0)
        {
            for (Iterator j = properties.iterator(); j.hasNext();)
            {
                Property curprop = (Property) j.next();
                if ((null != curprop) && (null != curprop.getPropertyName()) && !propertyNames.contains(curprop.getPropertyName()))
                {
                    propertyNames.add(curprop.getPropertyName());
                }
            }
        }
        return (String[]) propertyNames.toArray(new String[propertyNames.size()]);
    }
View Full Code Here

        String value = null;
        Collection properties = node.getNodeProperties();

        for (Iterator i = properties.iterator(); i.hasNext();)
        {
            Property curProp = (Property) i.next();
            if ((null != curProp) && (null != curProp.getPropertyName()) && (curProp.getPropertyName().equals(key)))
            {
                value = curProp.getPropertyValue();
            }
        }
        return value;
    }
View Full Code Here

        Collection propCol = node.getNodeProperties();
        if ((null != propCol) && propCol.size() > 0)
        {
            for (Iterator j = propCol.iterator(); j.hasNext();)
            {
                Property curprop = (Property) j.next();
                if ((null != curprop) && (null != curprop.getPropertyName())
                        && !propertyNames.contains(curprop.getPropertyName()))
                {
                    propertyNames.add(curprop.getPropertyName());
                }
            }
        }

        return (String[]) propertyNames.toArray(new String[propertyNames.size()]);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.prefs.om.Property

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.