Package org.alfresco.service.namespace

Examples of org.alfresco.service.namespace.QName


        configKey);
    List<JsonModelEntry> model = new ArrayList<JsonModelEntry>();
    for (String type : spaceTypes) {
      try {
        ServiceRegistry serviceRegistry = AlfrescoUtil.getServiceRegistry();
        QName qName = QName.createQName(type, serviceRegistry.getNamespaceService());
        TypeDefinition td = serviceRegistry.getDictionaryService().getType(qName);
        if (td != null) {
          String title = td.getTitle();
          if (StringUtils.isEmpty(title)) {
            title = type;
View Full Code Here


        return data;
    }

    public void write(NodeRef nodeRefer, byte[] data) {
        // Getting Mimetype of node       
        QName PROP_QNAME_CONTENT = QName.createQName(
                "http://www.alfresco.org/model/content/1.0", "content");
        ContentData contentData = (ContentData) serviceRegistry.getNodeService()
                .getProperty(nodeRefer, PROP_QNAME_CONTENT);
        String originalMimeType = contentData.getMimetype();
View Full Code Here

  @SuppressWarnings("unchecked")
  protected void bindAssocationPolicyBehaviour(final Object bean, final Method method, final QName policyName,
      QName[] classNames, NotificationFrequency notificationFrequency) {
    final AssociationPolicy associationPolicy = AnnotationUtils.findAnnotation(method, AssociationPolicy.class);
    QName assocationName = null;
    if (associationPolicy != null) {
      final String[] localClassNames = associationPolicy.value();
      if (localClassNames.length > 0) {
        // fall back to @Behaviour classnames if none provided on @AssociationPolicy
        classNames = parseQNames(localClassNames, associationPolicy);
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  protected void bindPropertyPolicyBehaviour(final Object bean, final Method method, final QName policyName,
      QName[] classNames, NotificationFrequency notificationFrequency) {
    final PropertyPolicy propertyPolicy = AnnotationUtils.findAnnotation(method, PropertyPolicy.class);
    QName propertyName = null;
    if (propertyPolicy != null) {
      if (propertyPolicy.value().length > 0) {
        classNames = parseQNames(propertyPolicy.value(), propertyPolicy);
      }
      propertyName = parseQName(propertyPolicy.property(), propertyPolicy);
View Full Code Here

  }

  /* Utility operations */

  private QName getPolicyQName(final Class<? extends Policy> policyClass) {
    QName qName = null;
    try {
      final Field field = policyClass.getField("QNAME");
      /* Field must be static, public and of type QName. */
      final int modifiers = field.getModifiers();
      if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)
View Full Code Here

      dataType = getDictionaryService().getDataType(parseQName(actionParameter.type(), actionParameter));
      if (dataType == null) {
        throw new RuntimeException(String.format("Invalid or unknown DataType: %s", actionParameter.type()));
      }
    } else {
      final QName qName = parameterTypes.get(clazz);
      if (qName == null) {
        throw new RuntimeException(String.format("%s is not a standard parameter type, specify the type explicitly", clazz));
      }
      dataType = getDictionaryService().getDataType(qName);
    }
View Full Code Here

  /* Main operations */

  @Override
  public void unregisterModels() {
    for (final Iterator<QName> it = registeredModelNames.iterator(); it.hasNext();) {
      final QName modelName = it.next();
      try {
                logger.debug("Unregistering model '{}' via DictionaryDAO", modelName);
                getDictionaryDao().removeModel(modelName);
      } finally {
        it.remove();
View Full Code Here

    }
  }

  @Override
  protected void registerModel(M2ModelResource modelResource) {
    final QName qName;
    qName = dictionaryDao.putModel(modelResource.getM2Model());
    registeredModelNames.add(qName);
  }
View Full Code Here

  private String bundleRepositoryLocation = DEFAULT_BUNDLE_REPOSITORY_LOCATION;

  /* Main operations */

  public NodeRef getBaseFolder(final boolean createIfNotExists) {
    final QName name = qName("cm", "dynamic_extensions");
    final NodeRef dataDictionary = getDataDictionary();
    NodeRef nodeRef = getChildOf(dataDictionary, name);
    if (nodeRef == null && createIfNotExists) {
      nodeRef = createFolder(dataDictionary, name, "Dynamic Extensions", getBaseFolderDescription());
            permissionService.setInheritParentPermissions(nodeRef, false);
View Full Code Here

    }
    return nodeRef;
  }

  public NodeRef getBundleFolder(final boolean createIfNotExists) {
    final QName name = qName("cm", "bundles");
    final NodeRef baseFolder = getBaseFolder(createIfNotExists);
    NodeRef nodeRef = getChildOf(baseFolder, name);
    if (nodeRef == null && createIfNotExists) {
      nodeRef = createFolder(baseFolder, name, "Bundles", getBundleFolderDescription());
    }
View Full Code Here

TOP

Related Classes of org.alfresco.service.namespace.QName

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.