Package org.apache.jetspeed.om.portlet

Examples of org.apache.jetspeed.om.portlet.LocalizedField


        }
        boolean found = false;
        Iterator fields = cfields.iterator();
        while (fields.hasNext())
        {
            LocalizedField field = (LocalizedField) fields.next();
            if (areFieldsSame(field.getName(), oldMetaData.getName())
                    && areFieldsSame(field.getLocale().toString(), oldMetaData
                            .getLanguage()))
            {
                field.setName(metaData.getName());
                field.setLocale(new Locale(metaData.getLanguage()));
                field.setValue(metaData.getValue());
                found = true;
                break;
            }
        }
        if (!found) insertMetadata(metaData, node);
View Full Code Here


        if (cfields == null || cfields.size() == 0) { return; }
        boolean found = false;
        Iterator fields = cfields.iterator();
        while (fields.hasNext())
        {
            LocalizedField field = (LocalizedField) fields.next();
            if (areFieldsSame(field.getName(), metaData.getName())
                    && areFieldsSame(field.getLocale().toString(), metaData
                            .getLanguage()))
            {
                cfields.remove(field);
                if (allFields.remove(field))
                {
View Full Code Here

    {
        this.metaData = new ArrayList<JetspeedDocumentMetaData>();
        if (objectMetaData.getFields() != null)
        {
            Iterator metaData = objectMetaData.getFields().iterator();
            LocalizedField field;
            while (metaData.hasNext())
            {
                field = (LocalizedField) metaData.next();
                this.metaData.add(new JetspeedDocumentMetaData(field.getName(), field.getLocale().toString(), field.getValue()));
            }
        }
    }
View Full Code Here

        if (c != null)
        {
            Iterator it = c.iterator();
            if (it.hasNext())
            {
                LocalizedField roleField = (LocalizedField) it.next();
                String role = roleField.getValue();
                if (role != null)
                {
                    if (role.equals("*"))
                        doFilter = true;
                    else
View Full Code Here

            if ((pageOrTemplate.getMetadata() != null) && (pageOrTemplate.getMetadata().getFields() != null))
            {
                Iterator fieldIter = pageOrTemplate.getMetadata().getFields().iterator();
                while (fieldIter.hasNext())
                {
                    LocalizedField field = (LocalizedField)fieldIter.next();
                    Locale fieldLocale = field.getLocale();
                    String fieldName = field.getName();
                    if (fieldName != null)
                    {
                        boolean containsField = false;
                        Iterator containsFieldIterator = contentPageImpl.getMetadata().getFields().iterator();
                        while (!containsField && containsFieldIterator.hasNext())
                        {
                            LocalizedField testField = (LocalizedField)containsFieldIterator.next();
                            Locale testFieldLocale = testField.getLocale();
                            String testFieldName = testField.getName();
                            containsField = (fieldName.equals(testFieldName) &&
                                    (((fieldLocale == null) && (testFieldLocale == null)) ||
                                            ((fieldLocale != null) && fieldLocale.equals(testFieldLocale))));
                        }
                        if (!containsField)
View Full Code Here

       
        Collection<LocalizedField> fields = pd.getMetadata().getFields("selector.conditional.role");
       
        if (fields != null && !fields.isEmpty())
        {
            LocalizedField field = fields.iterator().next();
            String role = field.getValue();
           
            if (!StringUtils.isBlank(role))
            {
                if (role.equals("*"))
                {
View Full Code Here

    {
        this.metaData = new ArrayList<JetspeedDocumentMetaData>();
        if (objectMetaData.getFields() != null)
        {
            Iterator metaDataIterator = objectMetaData.getFields().iterator();
            LocalizedField field;
            while (metaDataIterator.hasNext())
            {
                field = (LocalizedField) metaDataIterator.next();
                this.metaData.add(new JetspeedDocumentMetaData(field.getName(), field.getLocale().toString(), field.getValue()));
            }
        }
    }
View Full Code Here

        }
        boolean found = false;
        Iterator fields = cfields.iterator();
        while (fields.hasNext())
        {
            LocalizedField field = (LocalizedField) fields.next();
            if (areFieldsSame(field.getName(), oldMetaData.getName())
                    && areFieldsSame(field.getLocale().toString(), oldMetaData
                            .getLanguage()))
            {
                field.setName(metaData.getName());
                field.setLocale(new Locale(metaData.getLanguage()));
                field.setValue(metaData.getValue());
                found = true;
                break;
            }
        }
        if (!found) insertMetadata(metaData, node);
View Full Code Here

        if (cfields == null || cfields.size() == 0) { return; }
        boolean found = false;
        Iterator fields = cfields.iterator();
        while (fields.hasNext())
        {
            LocalizedField field = (LocalizedField) fields.next();
            if (areFieldsSame(field.getName(), metaData.getName())
                    && areFieldsSame(field.getLocale().toString(), metaData
                            .getLanguage()))
            {
                cfields.remove(field);
                if (allFields.remove(field))
                {
View Full Code Here

        if (c != null)
        {
            Iterator it = c.iterator();
            if (it.hasNext())
            {
                LocalizedField roleField = (LocalizedField) it.next();
                String role = roleField.getValue();
                if (role != null)
                {
                    if (role.equals("*"))
                        doFilter = true;
                    else
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.portlet.LocalizedField

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.