All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.internet2.middleware.grouper.grouperUi.beans.ui.SubjectSourceContainer Maven / Gradle / Ivy

The newest version!
package edu.internet2.middleware.grouper.grouperUi.beans.ui;

import java.util.ArrayList;
import java.util.List;

import edu.internet2.middleware.grouper.app.subectSource.SubjectSourceConfiguration;
import edu.internet2.middleware.grouper.privs.PrivilegeHelper;
import edu.internet2.middleware.grouper.ui.GrouperUiFilter;
import edu.internet2.middleware.subject.Source;
import edu.internet2.middleware.subject.Subject;

public class SubjectSourceContainer {
  
  private List sources = new ArrayList<>();
  
  /**
   * subject source id that is being edited
   */
  private String subjectSourceId;
  
  /**
   * subject source configuration user is currently viewing/editing/adding
   */
  private GuiSubjectSourceConfiguration guiSubjectSourceConfiguration;
  
  /**
   * all configured subject source configurations
   */
  private List guiSubjectSourceConfigurations = new ArrayList();

  
  /**
   * current grouped config index we are looping through
   */
  private int index;
  
  
  public List getSources() {
    return sources;
  }

  
  public void setSources(List sources) {
    this.sources = sources;
  }

  /**
   * @return true if can view subject sources
   */
  public boolean isCanViewSubjectSources() {
    
    Subject loggedInSubject = GrouperUiFilter.retrieveSubjectLoggedIn();
    return PrivilegeHelper.isWheelOrRoot(loggedInSubject);
  }
  
  public List getAllSubjectSourceConfigurationTypes() {
    return SubjectSourceConfiguration.retrieveAllSubjectSourceConfigurationTypes();
  }


  
  public GuiSubjectSourceConfiguration getGuiSubjectSourceConfiguration() {
    return guiSubjectSourceConfiguration;
  }


  
  public void setGuiSubjectSourceConfiguration(
      GuiSubjectSourceConfiguration guiSubjectSourceConfiguration) {
    this.guiSubjectSourceConfiguration = guiSubjectSourceConfiguration;
  }


  
  public List getGuiSubjectSourceConfigurations() {
    return guiSubjectSourceConfigurations;
  }


  
  public void setGuiSubjectSourceConfigurations(
      List guiSubjectSourceConfigurations) {
    this.guiSubjectSourceConfigurations = guiSubjectSourceConfigurations;
  }

  
  public int getIndex() {
    return index;
  }
  
  public void setIndex(int index) {
    this.index = index;
  }
  
  
  private String currentConfigSuffix;
  
  public String getCurrentConfigSuffix() {
    return currentConfigSuffix;
  }

  
  public void setCurrentConfigSuffix(String currentConfigSuffix) {
    this.currentConfigSuffix = currentConfigSuffix;
  }


  
  public String getSubjectSourceId() {
    return subjectSourceId;
  }


  
  public void setSubjectSourceId(String subjectSourceId) {
    this.subjectSourceId = subjectSourceId;
  }
  
  
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy