/** * @return Returns the coverages. */ public Collection getCoverages() { return metadata.getFields(COVERAGE); }
/** * @return Returns the identifiers. */ public Collection getIdentifiers() { return metadata.getFields(IDENTIFIER); }
/** * @return Returns the sources. */ public Collection getSources() { return metadata.getFields(SOURCE); }
/** * @return Returns the creators. */ public Collection getCreators() { return metadata.getFields(CREATOR); }
/** * @return Returns the formats. */ public Collection getFormats() { return metadata.getFields(FORMAT); }
/** * @return Returns the rights. */ public Collection getRights() { return metadata.getFields(RIGHT); }
/** * @return Returns the subjects. */ public Collection getSubjects() { return metadata.getFields(SUBJECT); }
/** * @return Returns the contributors. */ public Collection getContributors() { return metadata.getFields(CONTRIBUTOR); }
/** * @return Returns the languages. */ public Collection getLanguages() { return metadata.getFields(LANGUAGE); }
/** * @return Returns the relations. */ public Collection getRelations() { return metadata.getFields(RELATION); }
/** * @return Returns the titles */ public Collection getTitles() { return metadata.getFields(TITLE); }
/** * @return Returns the descriptions. */ public Collection getDescriptions() { return metadata.getFields(DESCRIPTION); }
/** * @return Returns the publishers. */ public Collection getPublishers() { return metadata.getFields(PUBLISHER); }
/** * @return Returns the types. */ public Collection getTypes() { return metadata.getFields(TYPE); }
public GenericMetadataBean(final GenericMetadata metadata) { Collection<LocalizedField> fields = metadata.getFields(); if (fields != null) { List<LocalizedFieldBean> localizedFieldBeanList = new ArrayList<LocalizedFieldBean>(); for (LocalizedField field : fields) { localizedFieldBeanList.add(new LocalizedFieldBean(field)); } localizedFieldBeans = localizedFieldBeanList; } }
private LocalizedField getLocalizedField(GenericMetadata metadata, Locale locale, String name) { Collection<LocalizedField> fields = metadata.getFields(name); if (fields != null) { for (LocalizedField field : fields) { if (locale.equals(field.getLocale())) { return field; } } } return null; }
protected String getRefreshFunction(PortletDefinition portletDefinition) { String refreshFunction = null; Collection<LocalizedField> refreshFields = null; if (portletDefinition != null) { refreshFields = portletDefinition.getMetadata().getFields(PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_REFRESH_FUNCTION); } if (refreshFields != null && !refreshFields.isEmpty()) { refreshFunction = refreshFields.iterator().next().getValue(); } return refreshFunction; }
protected boolean enforceSecurityConstraint(PortletDefinition portlet) { Collection c = portlet.getMetadata().getFields("render-time.security-constraints"); if (c != null) { Iterator it = c.iterator(); if (it.hasNext()) { LocalizedField field = (LocalizedField) it.next(); return Boolean.parseBoolean(field.getValue()); } } return false; }
/** * setMetadata - set metadata fields * * @param metadata metadata */ public void setMetadata(GenericMetadata metadata) { getPageMetadata().setFields(metadata.getFields()); }
static protected void updateField(Folder folder, Locale locale, String name, String value) { Locale addLocale = (locale == null) ? Locale.ENGLISH : locale; GenericMetadata metadata = folder.getMetadata(); Collection<LocalizedField> fields = metadata.getFields(); if (fields == null || fields.size() == 0) metadata.addField(addLocale, name, value); else { if (!updateMetaField(fields, locale, name, value)) { metadata.addField(addLocale, name, value); } } }