Examples of FragmentProperty


Examples of org.apache.jetspeed.om.page.FragmentProperty

    {
        // iterate through properties list to get property value
        Iterator propertiesIter = getProperties().iterator();
        while (propertiesIter.hasNext())
        {
            FragmentProperty fragmentProperty = (FragmentProperty)propertiesIter.next();
            if (fragmentProperty.getName().equals(propName))
            {
                // compare scopes
                String fragmentPropertyScope = fragmentProperty.getScope();
                if ((fragmentPropertyScope == null) && (scope == null))
                {
                    return fragmentProperty.getValue();                   
                }
                else if ((fragmentPropertyScope != null) && fragmentPropertyScope.equals(scope))
                {
                    // default user scope value
                    if ((scopeValue == null) && scope.equals(USER_PROPERTY_SCOPE))
                    {
                        scopeValue = Utils.getCurrentUserScopeValue();
                    }
                    // compare scope values
                    String fragmentPropertyScopeValue = fragmentProperty.getScopeValue();
                    if (((fragmentPropertyScopeValue == null) && (scopeValue == null)) ||
                        ((fragmentPropertyScopeValue != null) && fragmentPropertyScopeValue.equals(scopeValue)))
                    {
                        return fragmentProperty.getValue();                       
                    }
                }
            }
        }
        return null;
View Full Code Here

Examples of org.apache.jetspeed.om.page.FragmentProperty

     * @param value property value
     */
    public void setProperty(String propName, String scope, String scopeValue, String value)
    {
        // iterate through properties list to find property
        FragmentProperty fragmentProperty = null;
        Iterator propertiesIter = getProperties().iterator();
        while (propertiesIter.hasNext())
        {
            FragmentProperty findFragmentProperty = (FragmentProperty)propertiesIter.next();
            if (findFragmentProperty.getName().equals(propName))
            {
                // compare scopes
                String findFragmentPropertyScope = findFragmentProperty.getScope();
                if ((scope == null) && (findFragmentPropertyScope == null))
                {
                    fragmentProperty = findFragmentProperty;
                    break;
                }
                else if ((findFragmentPropertyScope != null) && findFragmentPropertyScope.equals(scope))
                {
                    // default user scope value
                    if ((scopeValue == null) && scope.equals(USER_PROPERTY_SCOPE))
                    {
                        scopeValue = Utils.getCurrentUserScopeValue();
                    }
                    // compare scope values                   
                    String findFragmentPropertyScopeValue = findFragmentProperty.getScopeValue();
                    if ((findFragmentPropertyScopeValue != null) && findFragmentPropertyScopeValue.equals(scopeValue))
                    {
                        fragmentProperty = findFragmentProperty;
                        break;
                    }
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.