Parcourir la source

make passthru optional, default to false

tags/v0.9.11
Jonathan Cobb il y a 4 ans
Parent
révision
22f0074ca7
2 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. +5
    -0
      bubble-server/src/main/java/bubble/dao/app/AppMatcherDAO.java
  2. +1
    -1
      bubble-server/src/main/java/bubble/model/app/AppMatcher.java

+ 5
- 0
bubble-server/src/main/java/bubble/dao/app/AppMatcherDAO.java Voir le fichier

@@ -52,6 +52,11 @@ public class AppMatcherDAO extends AppTemplateEntityDAO<AppMatcher> {
return list(criteria().add(gt(MTIME, lastMod)));
}

@Override public Object preCreate(AppMatcher matcher) {
if (matcher.getPassthru() == null) matcher.setPassthru(false);
return super.preCreate(matcher);
}

@Override public AppMatcher postUpdate(AppMatcher matcher, Object context) {
final BubbleApp app = appDAO.findByUuid(matcher.getApp());
if (app == null) return die("postUpdate("+ matcher.getUuid()+"): app not found: "+ matcher.getApp());


+ 1
- 1
bubble-server/src/main/java/bubble/model/app/AppMatcher.java Voir le fichier

@@ -125,7 +125,7 @@ public class AppMatcher extends IdentifiableBase implements AppTemplateEntity, H
@ECIndex @Column(nullable=false)
@Getter @Setter private Boolean enabled = true;

@ECSearchable @ECField(index=120)
@ECSearchable @ECField(index=120, required=EntityFieldRequired.optional)
@ECIndex @Column(nullable=false)
@Getter @Setter private Boolean passthru;
public boolean passthru () { return bool(passthru); }


Chargement…
Annuler
Enregistrer