@Override public Object getService(QName service) { return beanFactory.getBean(service.getLocalName()); }
@Override public PolicyComponent getPolicyComponent() { return (PolicyComponent)beanFactory.getBean(POLICY_COMPONENT.getLocalName()); }
private String findUsernameInProperties(Map<QName, Serializable> map, String usernameField, String invalidValue) { Optional<QName> first = map.keySet().stream().filter(q -> q.getLocalName().equals(usernameField)).findFirst(); if (first.isPresent()) { return map.get(first.get()).toString(); } return invalidValue; }
public String getAttributeName(Object o) { // Get the local name return ISO9075.encode(((Property) o).qname.getLocalName()); }
public void addAttribute(AttributesImpl attrs, QName name, int value) { attrs.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver), "int", Integer.toString(value)); }
public void addAttribute(AttributesImpl attrs, QName name, String value) { attrs.addAttribute(name.getNamespaceURI(), name.getLocalName(), name.toPrefixString(prefixResolver), "String", value); }
public String getElementName(Object o) { QName qName = ((ChildAssociationRef) o).getQName(); if(qName == null) { return ""; } return ISO9075.encode(qName.getLocalName()); }
public ActionNonParameterField(String name, QName type) { this.name = name; this.fieldDef = new PropertyFieldDefinition(this.name, type.getLocalName()); this.fieldDef.setLabel(this.name); this.fieldDef.setDataKeyName(this.name); }
public void endACL(NodeRef nodeRef) { try { contentHandler.endElement(ACL_QNAME.getNamespaceURI(), ACL_QNAME.getLocalName(), toPrefixString(ACL_QNAME)); } catch (SAXException e) { throw new ExporterException("Failed to process end ACL event - node ref " + nodeRef.toString()); } }
public void endProperty(NodeRef nodeRef, QName property) { try { QName encodedProperty = QName.createQName(property.getNamespaceURI(), ISO9075.encode(property.getLocalName())); contentHandler.endElement(encodedProperty.getNamespaceURI(), encodedProperty.getLocalName(), toPrefixString(encodedProperty)); } catch (SAXException e) { throw new ExporterException("Failed to process end property event - nodeRef " + nodeRef + "; property " + toPrefixString(property), e); } }
public void startAssoc(NodeRef nodeRef, QName assoc) { try { contentHandler.startElement(assoc.getNamespaceURI(), assoc.getLocalName(), toPrefixString(assoc), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start assoc event - nodeRef " + nodeRef + "; association " + toPrefixString(assoc), e); } }
@Override public QName getBaseName(QName name, boolean forceForNonTenant) { String baseNamespaceURI = getBaseName(name.getNamespaceURI(), forceForNonTenant); return QName.createQName(baseNamespaceURI, name.getLocalName()); }
public void endAssoc(NodeRef nodeRef, QName assoc) { try { contentHandler.endElement(assoc.getNamespaceURI(), assoc.getLocalName(), toPrefixString(assoc)); } catch (SAXException e) { throw new ExporterException("Failed to process end assoc event - nodeRef " + nodeRef + "; association " + toPrefixString(assoc), e); } }
public void startProperty(NodeRef nodeRef, QName property) { try { QName encodedProperty = QName.createQName(property.getNamespaceURI(), ISO9075.encode(property.getLocalName())); contentHandler.startElement(encodedProperty.getNamespaceURI(), encodedProperty.getLocalName(), toPrefixString(encodedProperty), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start property event - nodeRef " + nodeRef + "; property " + toPrefixString(property), e); } }
public void startAspect(NodeRef nodeRef, QName aspect) { try { contentHandler.startElement(aspect.getNamespaceURI(), aspect.getLocalName(), toPrefixString(aspect), EMPTY_ATTRIBUTES); } catch (SAXException e) { throw new ExporterException("Failed to process start aspect event - node ref " + nodeRef.toString() + "; aspect " + toPrefixString(aspect), e); } }
public void endNode(NodeRef nodeRef) { try { QName type = nodeService.getType(nodeRef); contentHandler.endElement(type.getNamespaceURI(), type.getLocalName(), toPrefixString(type)); } catch (SAXException e) { throw new ExporterException("Failed to process end node event - node ref " + nodeRef.toString(), e); } }
public void endAspect(NodeRef nodeRef, QName aspect) { try { contentHandler.endElement(aspect.getNamespaceURI(), aspect.getLocalName(), toPrefixString(aspect)); } catch (SAXException e) { throw new ExporterException("Failed to process end aspect event - node ref " + nodeRef.toString() + "; aspect " + toPrefixString(aspect), e); } }
@Override public NodeRef doWork() throws Exception { NodeRef system = getSystemContainer(nodeService, repositoryHelper); NodeRef container = nodeService.createNode( system, ContentModel.ASSOC_CHILDREN, childName, ContentModel.TYPE_CONTAINER ).getChildRef(); nodeService.setProperty(container, ContentModel.PROP_NAME, childName.getLocalName()); return container; } });
public Pair<Long, QName> createValue(QName qname) { String uri = qname.getNamespaceURI(); String localName = qname.getLocalName(); // Create namespace Pair<Long, String> namespaceEntity = getOrCreateNamespace(uri); Long nsId = namespaceEntity.getFirst(); // Create QName QNameEntity entity = createQNameEntity(nsId, localName); return new Pair<Long, QName>(entity.getId(), qname); }
@Override protected FieldDefinition makeTransientFieldDefinition() { String dataKeyName = PROP_DATA_PREFIX + KEY; PropertyFieldDefinition sizeField = new PropertyFieldDefinition(KEY, DataTypeDefinition.LONG.getLocalName()); sizeField.setLabel(I18NUtil.getMessage(MSG_SIZE_LABEL)); sizeField.setDescription(I18NUtil.getMessage(MSG_SIZE_DESC)); sizeField.setDataKeyName(dataKeyName); sizeField.setProtectedField(true); return sizeField; }