Package com.eaglegenomics.simlims.core

Examples of com.eaglegenomics.simlims.core.SecurityProfile


  /**
   * Construct a new SequencerPartitionContainer with a default empty SecurityProfile
   */
  public SequencerPartitionContainerImpl() {
    setSecurityProfile(new SecurityProfile());
  }
View Full Code Here


    }
    return list;
  }

  public static void inheritUsersAndGroups(SecurableByProfile child, SecurityProfile parentProfile) {
    SecurityProfile childProfile = child.getSecurityProfile();
    childProfile.setReadGroups(parentProfile.getReadGroups());
    childProfile.setWriteGroups(parentProfile.getWriteGroups());
    childProfile.setReadUsers(parentProfile.getReadUsers());
    childProfile.setWriteUsers(parentProfile.getWriteUsers());
  }
View Full Code Here

   * Construct a new SequencerPartitionContainer with a SecurityProfile owned by the given User
   *
   * @param user of type User
   */
  public SequencerPartitionContainerImpl(User user) {
    setSecurityProfile(new SecurityProfile(user));
  }
View Full Code Here

  public JSONObject bulkSaveSamples(HttpSession session, JSONObject json) {
    if (json.has("samples")) {
      try {
        Project p = requestManager.getProjectById(json.getLong("projectId"));
        SecurityProfile sp = p.getSecurityProfile();
        JSONArray a = JSONArray.fromObject(json.get("samples"));
        Set<Sample> saveSet = new HashSet<Sample>();

        for (JSONObject j : (Iterable<JSONObject>) a) {
          try {
            String alias = j.getString("alias");

            if (sampleNamingScheme.validateField("alias", alias)) {
              String descr = j.getString("description");
              String scientificName = j.getString("scientificName");
              DateFormat df = new SimpleDateFormat("dd/mm/yyyy");
              String type = j.getString("sampleType");
              String locationBarcode = j.getString("locationBarcode");

              Sample news = new SampleImpl();
              news.setProject(p);
              news.setAlias(alias);
              news.setDescription(descr);
              news.setScientificName(scientificName);
              news.setSecurityProfile(sp);
              news.setSampleType(type);
              news.setLocationBarcode(locationBarcode);

              if (j.has("receivedDate") && !"".equals(j.getString("receivedDate"))) {
                Date date = df.parse(j.getString("receivedDate"));
                news.setReceivedDate(date);
              }

              if (!j.getString("note").equals("")) {
                Note note = new Note();
                note.setOwner(sp.getOwner());
                note.setText(j.getString("note"));
                note.setInternalOnly(true);

                if (j.has("receivedDate") && !"".equals(j.getString("receivedDate"))) {
                  Date date = df.parse(j.getString("receivedDate"));
View Full Code Here

public class SampleImpl extends AbstractSample implements Serializable {
  /**
   * Construct a new Sample with a default empty SecurityProfile
   */
  public SampleImpl() {
    setSecurityProfile(new SecurityProfile());
  }
View Full Code Here

  * Construct a new Sample with a SecurityProfile owned by the given User
   *
   * @param user of type User
   */
  public SampleImpl(User user) {
    setSecurityProfile(new SecurityProfile(user));
  }
View Full Code Here

    if (project.userCanRead(user)) {
      setProject(project);
      setSecurityProfile(project.getSecurityProfile());
    }
    else {
      setSecurityProfile(new SecurityProfile(user));
    }
  }
View Full Code Here

  public static final String PREFIX = "LPO";

  private final String units = "beads/&#181;l";

  public LS454Pool() {
    setSecurityProfile(new SecurityProfile());
    setPlatformType(PlatformType.LS454);
  }
View Full Code Here

    setSecurityProfile(new SecurityProfile());
    setPlatformType(PlatformType.LS454);
  }

  public LS454Pool(User user) {
    setSecurityProfile(new SecurityProfile(user));
    setPlatformType(PlatformType.LS454);
  }
View Full Code Here

    setSecurityProfile(new SecurityProfile());
    setPlatformType(PlatformType.SOLID);
  }

  public SolidPool(User user) {
    setSecurityProfile(new SecurityProfile(user));
    setPlatformType(PlatformType.SOLID);
  }
View Full Code Here

TOP

Related Classes of com.eaglegenomics.simlims.core.SecurityProfile

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.