Package fr.openwide.maven.artifact.notifier.core.business.artifact.model

Examples of fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactNotificationRule


  }
 
  @Override
  public void addArtifactNotificationRule(FollowedArtifact followedArtifact, String regex, ArtifactNotificationRuleType type)
      throws ServiceException, SecurityServiceException {
    ArtifactNotificationRule rule = new ArtifactNotificationRule(followedArtifact, regex, type);
    artifactNotificationRuleService.create(rule);
   
    followedArtifact.addArtifactNotificationRule(rule);
    update(followedArtifact);
  }
View Full Code Here


         
          @Override
          public void onClick(AjaxRequestTarget target) {
            try {
              FollowedArtifact followedArtifact = FollowedArtifactNotificationRulesPanel.this.getModelObject();
              ArtifactNotificationRule rule = getModelObject();
             
              followedArtifactService.removeArtifactNotificationRule(followedArtifact, rule);
              Session.get().success(getString("artifact.rules.delete.success"));
            } catch (Exception e) {
              LOGGER.error("An error occured while removing the rule", e);
View Full Code Here

    AjaxButton validate = new AjaxButton("save", ruleForm) {
      private static final long serialVersionUID = 1L;
     
      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        ArtifactNotificationRule rule = ArtifactNotificationRuleFormPopupPanel.this.getModelObject();
        FollowedArtifact followedArtifact = rule.getFollowedArtifact();
       
        if (StringUtils.hasText(rule.getRegex()) && rule.getType() != null) {
          try {
            if (artifactNotificationRuleService.isRuleValid(rule.getRegex())) {
             
              ArtifactNotificationRule ruleDuplicate =
                  artifactNotificationRuleService.getByFollowedArtifactAndRegex(followedArtifact, rule.getRegex());
              if (ruleDuplicate == null || rule.equals(ruleDuplicate)) {
                artifactNotificationRuleService.update(rule);
                getSession().success(getString("artifact.rules.edit.success"));
                closePopup(target);
View Full Code Here

TOP

Related Classes of fr.openwide.maven.artifact.notifier.core.business.artifact.model.ArtifactNotificationRule

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.