/** * @return Returns the coverages. */ public Collection getCoverages() { return metadata.getFields(COVERAGE); }
public void addType(Locale locale, String type) { metadata.addField(locale, TYPE, type); } }
/** * @param identifiers The identifiers to set. */ public void setIdentifiers(Collection identifiers) { metadata.setFields(IDENTIFIER, identifiers); }
definition.getMetadata().copyFields(addDefinition.getMetadata().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); } } }
if (isBlank(name) || isBlank(language)) throw new AJAXException("Invalid Metadata: name, language invalid data."); Collection cfields = node.getMetadata().getFields(name); Collection allFields = node.getMetadata().getFields(); if (cfields == null || cfields.size() == 0) if (allFields.remove(field)) node.getMetadata().setFields(allFields);
public String getShortTitle(Locale locale) { String localeSpecificShortTitle = getMetadata().getText("short-title", locale); if (localeSpecificShortTitle == null) { localeSpecificShortTitle = getMetadata().getText("title", locale); } return ((localeSpecificShortTitle != null) ? localeSpecificShortTitle : ((shortTitle != null) ? shortTitle : title)); }
definition.getMetadata().copyFields(addDefinition.getMetadata().getFields());
public String getTitle(Locale locale) { String localeSpecificTitle = getMetadata().getText("title", locale); return ((localeSpecificTitle != null) ? localeSpecificTitle : title); }
/** * @return Returns the identifiers. */ public Collection getIdentifiers() { return metadata.getFields(IDENTIFIER); }
/** * Copy shared fragments attributes. * * @param source source fragments * @param copyIds flag indicating whether to copy or preserve fragment ids * @param dest destination fragments * @throws NodeException on error creating fragments */ protected void copyFragmentsAttributes(BaseFragmentsElement source, boolean copyIds, BaseFragmentsElement dest) throws NodeException { // create the new page and copy attributes dest.setTitle(source.getTitle()); dest.setShortTitle(source.getShortTitle()); dest.setVersion(source.getVersion()); // copy locale specific metadata dest.getMetadata().copyFields(source.getMetadata().getFields()); // copy security constraints SecurityConstraints srcSecurity = source.getSecurityConstraints(); if ((srcSecurity != null) && !srcSecurity.isEmpty()) { SecurityConstraints copiedSecurity = copySecurityConstraints(PAGE_NODE_TYPE, srcSecurity); dest.setSecurityConstraints(copiedSecurity); } // copy fragments BaseFragmentElement root = copyFragment(source.getRootFragment(), null, copyIds); dest.setRootFragment(root); }
public void addCoverage(Locale locale, String coverage) { metadata.addField(locale, COVERAGE, coverage); }
/** * @param languages The languages to set. */ public void setLanguages(Collection languages) { metadata.setFields(LANGUAGE, languages); }
/** * @return Returns the sources. */ public Collection getSources() { return metadata.getFields(SOURCE); }
public Link copyLink(Link source, String path) throws NodeException { // create the new link and copy attributes Link link = newLink(path); link.setTitle(source.getTitle()); link.setShortTitle(source.getShortTitle()); link.setSkin(source.getSkin()); link.setVersion(source.getVersion()); link.setTarget(source.getTarget()); link.setUrl(source.getUrl()); link.setHidden(source.isHidden()); // copy locale specific metadata link.getMetadata().copyFields(source.getMetadata().getFields()); // copy security constraints SecurityConstraints srcSecurity = source.getSecurityConstraints(); if ((srcSecurity != null) && !srcSecurity.isEmpty()) { SecurityConstraints copiedSecurity = copySecurityConstraints(LINK_NODE_TYPE, srcSecurity); link.setSecurityConstraints(copiedSecurity); } return link; }
public void addRelation(Locale locale, String relation) { metadata.addField(locale, RELATION, relation); }
/** * @param subjects The subjects to set. */ public void setSubjects(Collection subjects) { metadata.setFields(SUBJECT, subjects); }
/** * @return Returns the creators. */ public Collection getCreators() { return metadata.getFields(CREATOR); }
menu.getMetadata().copyFields(source.getMetadata().getFields()); menuSeparator.getMetadata().copyFields(source.getMetadata().getFields());