Package org.alfresco.repo.policy

Examples of org.alfresco.repo.policy.JavaBehaviour


  @Test
  public void testContentBehaviour() {
    verify(policyComponent).bindClassBehaviour(
        eq(NodeServicePolicies.OnCreateNodePolicy.QNAME),
        eq(ContentModel.TYPE_CONTENT),
        refEq(new JavaBehaviour(contentBehaviour, "onCreateNode", Behaviour.NotificationFrequency.EVERY_EVENT),
            "proxies", "disabled")
    );
  }
View Full Code Here


  public void testAssociationBehaviour() {
    verify(policyComponent).bindAssociationBehaviour(
        eq(NodeServicePolicies.OnCreateAssociationPolicy.QNAME),
        eq(ContentModel.TYPE_CONTENT),
        eq(ContentModel.ASSOC_CONTAINS),
        refEq(new JavaBehaviour(associationBehaviourInheritClassAndContain, "onCreateAssociation", Behaviour.NotificationFrequency.FIRST_EVENT),
            "proxies", "disabled")
    );
    verify(policyComponent).bindAssociationBehaviour(
        eq(NodeServicePolicies.OnCreateAssociationPolicy.QNAME),
        eq(ContentModel.TYPE_FOLDER),
        eq(ContentModel.ASSOC_CONTAINS),
        refEq(new JavaBehaviour(associationBehaviourContain, "onCreateAssociation", Behaviour.NotificationFrequency.TRANSACTION_COMMIT),
            "proxies", "disabled")
    );
    verify(policyComponent).bindAssociationBehaviour(
        eq(NodeServicePolicies.OnCreateAssociationPolicy.QNAME),
        eq(associationBehaviourVoid),
        refEq(new JavaBehaviour(associationBehaviourVoid, "onCreateAssociation", Behaviour.NotificationFrequency.EVERY_EVENT),
            "proxies", "disabled")
    );
  }
View Full Code Here

  public void testPropertyBehaviour() {
    verify(policyComponent).bindPropertyBehaviour(
        eq(DummyPropertyPolicy.QNAME),
        eq(ContentModel.TYPE_CONTENT),
        eq(ContentModel.PROP_NAME),
        refEq(new JavaBehaviour(propertyBehaviour, "onNewValue", Behaviour.NotificationFrequency.EVERY_EVENT),
            "proxies", "disabled")
    );
  }
View Full Code Here

      classNames = parseQNames(classPolicy.value(), classPolicy);
      if (classPolicy.event().equals(Event.INHERITED_OR_ALL) == false) {
        notificationFrequency = classPolicy.event().toNotificationFrequency();
      }
    }
    final JavaBehaviour behaviour = new JavaBehaviour(bean, method.getName(), notificationFrequency);
    if (classNames.length > 0) {
      for (final QName className : classNames) {
        if (className != null) {
          if (logger.isDebugEnabled()) {
            logger.debug(
View Full Code Here

      assocationName = parseQName(associationPolicy.association(), associationPolicy);
      if (associationPolicy.event().equals(Event.INHERITED_OR_ALL) == false) {
        notificationFrequency = associationPolicy.event().toNotificationFrequency();
      }
    }
    final JavaBehaviour behaviour = new JavaBehaviour(bean, method.getName(), notificationFrequency);
    if (classNames.length > 0) {
      for (final QName className : classNames) {
        if (assocationName != null) {
          if (logger.isDebugEnabled()) {
            logger.debug(
View Full Code Here

      propertyName = parseQName(propertyPolicy.property(), propertyPolicy);
      if (propertyPolicy.event().equals(Event.INHERITED_OR_ALL) == false) {
        notificationFrequency = propertyPolicy.event().toNotificationFrequency();
      }
    }
    final JavaBehaviour behaviour = new JavaBehaviour(bean, method.getName(), notificationFrequency);
    if (classNames.length > 0) {
      for (final QName className : classNames) {
        if (propertyName != null) {
          if (logger.isDebugEnabled()) {
            logger.debug(
View Full Code Here

TOP

Related Classes of org.alfresco.repo.policy.JavaBehaviour

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.