Changeset 7005


Ignore:
Timestamp:
Nov 9, 2015, 10:48:11 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #1958: Add Kit item

Added KitValidator for validating kit items in the "Item overview".

Location:
trunk/src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/taglib/Select.java

    r7001 r7005  
    598598    sb.append("<div class=\"interactable ").append(getButtonclass()).append(disabled ? " disabled": "").append("\"");
    599599    sb.append(" id=\"").append(getId()).append(".select\"");
    600     sb.append(" data-list-name=\"").append(getId()).append(".list\"");
     600    sb.append(" data-list-name=\"").append(getId()).append("\"");
    601601    if (!disabled)
    602602    {
  • trunk/src/core/net/sf/basedb/util/overview/OverviewUtil.java

    r6960 r7005  
    111111            Validator.MISSING_DERIVEDBIOASSAY, Validator.MISSING_ARRAYDESIGN, Validator.MISSING_PROTOCOL,
    112112            Validator.MISSING_HARDWARE, Validator.MISSING_SOFTWARE, Validator.MISSING_TAG,
     113            Validator.MISSING_KIT,
    113114            Validator.MISSING_ARRAYSLIDE, Validator.MISSING_ARRAYBATCH, Validator.MISSING_ANYTOANY
    114115          })
     
    122123            Validator.INCORRECT_DERIVEDBIOASSAY_TYPE, Validator.INCORRECT_PROTOCOLTYPE,
    123124            Validator.INCORRECT_HARDWARETYPE, Validator.INCORRECT_SOFTWARETYPE,
    124             Validator.INCORRECT_TAGTYPE
     125            Validator.INCORRECT_TAGTYPE, Validator.INCORRECT_KITTYPE
    125126          })
    126127        );
     
    155156            Validator.DENIED_BIOSOURCE, Validator.DENIED_SAMPLE, Validator.DENIED_EXTRACT, Validator.DENIED_BIOPLATE,
    156157            Validator.DENIED_TAG, Validator.DENIED_PHYSICALBIOASSAY, Validator.DENIED_DERIVEDBIOASSAY,
    157             Validator.DENIED_ARRAYDESIGN, Validator.DENIED_PLATFORM, Validator.DENIED_PROTOCOL, Validator.DENIED_HARDWARE,
    158             Validator.DENIED_SOFTWARE, Validator.DENIED_ARRAYSLIDE, Validator.DENIED_ARRAYBATCH,
     158            Validator.DENIED_ARRAYDESIGN, Validator.DENIED_PLATFORM, Validator.DENIED_PROTOCOL,
     159            Validator.DENIED_HARDWARE, Validator.DENIED_SOFTWARE, Validator.DENIED_KIT,
     160            Validator.DENIED_ARRAYSLIDE, Validator.DENIED_ARRAYBATCH,
    159161            Validator.DENIED_ANYTOANY
    160162          })
     
    176178          {
    177179            Validator.NONMATCHING_SPOTCOUNT, Validator.INCORRECT_BIOASSAY_POSITION,
    178             Validator.NONUNIQUE_NAME_FOR_TYPE, Validator.NONUNIQUE_NAME_GLOBAL
     180            Validator.NONUNIQUE_NAME_FOR_TYPE, Validator.NONUNIQUE_NAME_GLOBAL,
     181            Validator.KIT_USED_AFTER_EXPIRATIONDATE
    179182          })
    180183        );
  • trunk/src/core/net/sf/basedb/util/overview/Validator.java

    r6960 r7005  
    154154
    155155  /**
     156    Validator rule that checks for missing kits. Default severity level
     157    is WARNING.
     158    @since 3.7
     159  */
     160  public static final Validator MISSING_KIT = new Validator(
     161      "missing.kit", "Missing kit",
     162      "Checks if a kit has been specified for " +
     163      "item that can have a kit.",
     164      "Missing kit", Severity.WARNING
     165    );
     166 
     167  /**
     168    Validator rule that checks for denied access to kit. Default severity level
     169    is WARNING.
     170    @since 3.7
     171  */
     172  public static final Validator DENIED_KIT = new Validator(
     173      "denied.kit", "Access denied to kit",
     174      "Checks if the user is denied access to a kit",
     175      "Access denied to kit", Severity.WARNING
     176    );
     177
     178 
     179  /**
    156180    Validator rule that checks for missing physical bioassay. Default severity level
    157181    is WARNING.
     
    549573    );
    550574 
     575  /**
     576    Validator rule that checks if the kit attached to an item
     577    has a correct kit type. Default severity level is WARNING.
     578    @since 3.7
     579  */
     580  public static final Validator INCORRECT_KITTYPE = new Validator(
     581      "subtype.kit", "Incorrect kit subtype",
     582      "Checks if the kit attached to an item has a correct kit type.",
     583      "Incorrect kit subtype", Severity.WARNING
     584    );
     585
    551586  /**
    552587    Validator that checks if the parent biosource of a sample
     
    874909      "Too many files", Severity.WARNING
    875910    );
    876  
     911
     912  /**
     913    Validator rule that checks if a kit has been used after
     914    it's exiration date. Default severity level is WARNING.
     915    @since 3.7
     916  */
     917  public static final Validator KIT_USED_AFTER_EXPIRATIONDATE = new Validator(
     918      "kit.usedafterexpirationdate", "Kit used after expiration date",
     919      "Checks if a kit has been used after the expiration date.",
     920      "Kit used after expiration date", Severity.WARNING
     921    );
     922
    877923  private String id;
    878924  private String title;
  • trunk/src/core/net/sf/basedb/util/overview/validator/BasicItemNodeValidatorFactory.java

    r6959 r7005  
    213213    registerCheckedNodeValidator(Item.SOFTWARE, SoftwareValidator.class);
    214214    registerCheckedNodeValidator(Item.HARDWARE, HardwareValidator.class);
     215    registerCheckedNodeValidator(Item.KIT, KitValidator.class);
    215216    registerCheckedNodeValidator(Item.ANNOTATION, AnnotationValidator.class);
    216217    registerCheckedNodeValidator(Item.PLATFORM, PlatformValidator.class);
Note: See TracChangeset for help on using the changeset viewer.