/** * Get the prefix for the specified URI * @param qname the QName * @return the prefix (or null, if one is not registered) */ private String toPrefixString(QName qname) { return qname.toPrefixString(namespaceService); }
private boolean ignoreQName(QName qname) { String name = qname.toPrefixString(namespaceService); return ignoredFields.contains(name); }
private String makePropDataKey(QName propName) { String propPrefixName = propName.toPrefixString(namespaceService); String dataKey = FormFieldConstants.PROP_DATA_PREFIX + propPrefixName.replace(':', '_'); return dataKey; }
protected List<String> getDefaultIgnoredFields() { ArrayList<String> fields = new ArrayList<String>(8); // ignore system properties by default fields.add(ContentModel.PROP_NODE_DBID.toPrefixString(this.namespaceService)); fields.add(ContentModel.PROP_NODE_UUID.toPrefixString(this.namespaceService)); fields.add(ContentModel.PROP_STORE_IDENTIFIER.toPrefixString(this.namespaceService)); fields.add(ContentModel.PROP_STORE_PROTOCOL.toPrefixString(this.namespaceService)); // ignore associations that are system maintained fields.add(RenditionModel.ASSOC_RENDITION.toPrefixString(this.namespaceService)); return fields; }
public void addEscapedPropertyName(QName name) { escapedPropertyNames.add(name); escapedFieldNames.add(name.toPrefixString()); }
public Set<String> getAspectsAsStrings() { Set<String> strAspects = new HashSet<>(); for(QName aspect : aspects) { strAspects.add(aspect.toPrefixString(namespaceService)); } return strAspects; }
public void endValueMLText(NodeRef nodeRef) { try { contentHandler.endElement(NamespaceService.REPOSITORY_VIEW_PREFIX, MLVALUE_LOCALNAME, MLVALUE_QNAME.toPrefixString()); } catch (SAXException e) { throw new ExporterException("Failed to process end mltext", e); } }
@Override public void onAddAspect(NodeRef nodeRef, QName aspectTypeQName) { eventsService.nodeUpdated(nodeRef, null, null, null, Collections.singleton(aspectTypeQName.toPrefixString()), null); }
@Override protected String getItemType(TypeDefinition item) { return item.getName().toPrefixString(namespaceService); }
private String getPackageRef(Map<String, Object> executionVariables) { String packageName = WorkflowModel.ASSOC_PACKAGE.toPrefixString(namespaceService).replace(":", "_"); ScriptNode packageNode = (ScriptNode) executionVariables.get(packageName); String packageRef = packageNode.getNodeRef().toString(); return packageRef; }
public void addAttribute(AttributesImpl attrs, QName name, int value) { attrs.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver), "int", Integer.toString(value)); }
public Map<String, Serializable> getProperties() { Map<String, Serializable> properties = new HashMap<>(); String workingCopyOwner = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_WORKING_COPY_OWNER); if(workingCopyOwner != null) { properties.put(ContentModel.PROP_WORKING_COPY_OWNER.toPrefixString(namespaceService), workingCopyOwner); } retrieveAdditionalProps(properties, nodeRef); return properties; }
public Map<String, Serializable> getProperties() { Map<String, Serializable> properties = new HashMap<>(); String workingCopyOwner = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_WORKING_COPY_OWNER); if(workingCopyOwner != null) { properties.put(ContentModel.PROP_WORKING_COPY_OWNER.toPrefixString(namespaceService), workingCopyOwner); } retrieveAdditionalProps(properties, nodeRef); return properties; }
public void addAttribute(AttributesImpl attrs, QName name, String value) { attrs.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver), "String", value); }
private DataKeyInfo matchProperty(String dataKey) { String keyName = dataKey.substring(PROP_DATA_PREFIX.length()); Matcher matcher = propertyNamePattern.matcher(keyName); if (matcher.matches()) { QName qName = getQName(matcher); String name = qName.toPrefixString(namespaceService); return DataKeyInfo.makePropertyDataKeyInfo(name, qName); } return DataKeyInfo.makeTransientPropertyDataKeyInfo(keyName); }
/** * Given a long-form QName string, this method uses the namespace service to create a * short-form QName string. * * @param s Fully qualified QName string * @return the short form of the QName string, e.g. "cm:content" */ public String shortQName(String s) { return createQName(s).toPrefixString(services.getNamespaceService()); }
/** * Returns the name of this rendition definition in prefix:localName format. * * @return the name which uniquely identifies this rendition definition. */ public String getRenditionName() { QName qname = getRenditionDefinition().getRenditionName(); return qname.toPrefixString(services.getNamespaceService()); }
/** * {@inheritDoc} */ @Override protected String getItemType(WorkflowTask item) { TypeDefinition typeDef = item.getDefinition().getMetadata(); return typeDef.getName().toPrefixString(namespaceService); }
/** * @return Returns the type of the parent */ public String getParentTypeShort() { if (this.parentType == null) { this.parentType = this.services.getDictionaryService().getType(getType()).getParentName(); } return parentType.toPrefixString(this.services.getNamespaceService()); }
public AssociationFieldDefinition makeAssociationFieldDefinition(final AssociationDefinition assocDef, FieldGroup group) { String name = getPrefixedName(assocDef); String endpointType = assocDef.getTargetClass().getName().toPrefixString(namespaceService); AssociationFieldDefinition fieldDef = new AssociationFieldDefinition(name, endpointType, Direction.TARGET); populateFieldDefinition(assocDef, fieldDef, group, ASSOC_DATA_PREFIX); fieldDef.setEndpointMandatory(assocDef.isTargetMandatory()); fieldDef.setEndpointMany(assocDef.isTargetMany()); return fieldDef; }