Class WsQueryFilter

java.lang.Object
edu.internet2.middleware.grouper.ws.coresoap.WsQueryFilter

public class WsQueryFilter extends Object
this represents a query which can be and'ed or or'ed
  • Constructor Details

    • WsQueryFilter

      public WsQueryFilter()
  • Method Details

    • getTypeOfGroups

      public String getTypeOfGroups()
      comma separated type of groups can be an enum of TypeOfGroup, e.g. group, role, entity
      Returns:
      type of group
    • setTypeOfGroups

      public void setTypeOfGroups(String typeOfGroups1)
      comma separated type of groups can be an enum of TypeOfGroup, e.g. group, role, entity
      Parameters:
      typeOfGroups1 -
    • retrievePageSize

      public Integer retrievePageSize()
      page size if paging
      Returns:
      page size if paging
    • retrieveAscending

      public Boolean retrieveAscending()
      true or null for ascending, false for descending. If you pass true or false, must pass a sort string
      Returns:
      true or null for ascending, false for descending. If you pass true or false, must pass a sort string
    • retrievePageNumber

      public Integer retrievePageNumber()
      page number 1 indexed if paging
      Returns:
      page number 1 indexed if paging
    • getPageSize

      public String getPageSize()
      page size if paging
      Returns:
      the pageSize
    • setPageSize

      public void setPageSize(String pageSize1)
      page size if paging
      Parameters:
      pageSize1 - the pageSize to set
    • getPageNumber

      public String getPageNumber()
      page number 1 indexed if paging
      Returns:
      the pageNumber
    • setPageNumber

      public void setPageNumber(String pageNumber1)
      page number 1 indexed if paging
      Parameters:
      pageNumber1 - the pageNumber to set
    • getSortString

      public String getSortString()
      must be an hql query field, e.g. can sort on name, displayName, extension, displayExtension
      Returns:
      the sortString
    • setSortString

      public void setSortString(String sortString1)
      must be an hql query field, e.g. can sort on name, displayName, extension, displayExtension
      Parameters:
      sortString1 - the sortString to set
    • getAscending

      public String getAscending()
      true or null for ascending, false for descending. If you pass true or false, must pass a sort string
      Returns:
      the ascending
    • setAscending

      public void setAscending(String ascending1)
      true or null for ascending, false for descending. If you pass true or false, must pass a sort string
      Parameters:
      ascending1 - the ascending to set
    • validateNoGroupName

      public void validateNoGroupName()
      if there is a group name, there shouldnt be
    • validateHasGroupName

      public void validateHasGroupName()
      if there is no group name, there should be
    • validateNoTypeOfGroups

      public void validateNoTypeOfGroups()
      if there is a typeOfGroup name, there shouldnt be
    • validateNoEnabled

      public void validateNoEnabled()
      if there is an enabled name, there shouldnt be
    • validateNoStemName

      public void validateNoStemName()
      if there is a stem name, there shouldnt be
    • validateHasStemName

      public void validateHasStemName()
      if there is no stem name, there should be
    • validateNoStemNameScope

      public void validateNoStemNameScope()
      if there is a group name, there shouldnt be
    • validateHasStemNameScope

      public void validateHasStemNameScope()
      if there is no group name, there should be
    • validateNoGroupUuid

      public void validateNoGroupUuid()
      if there is a group uuid, there shouldnt be
    • validateHasGroupUuid

      public void validateHasGroupUuid()
      if there is no group uuid, there should be
    • validateNoGroupAttributeValue

      public void validateNoGroupAttributeValue()
      if there is a groupAttributeValue, there shouldnt be
    • validateHasGroupAttributeValue

      public void validateHasGroupAttributeValue()
      if there is no groupAttributeValue, there should be
    • validateNoGroupAttributeName

      public void validateNoGroupAttributeName()
      if there is a attribute name, there shouldnt be
    • validateShouldHavePagingSorting

      public void validateShouldHavePagingSorting(boolean canHavePagingSorting)
      if there is no attribute name, there should be
      Parameters:
      canHavePagingSorting - if can have paging/sorting
    • validateHasGroupAttributeName

      public void validateHasGroupAttributeName()
      if there is no attribute name, there should be
    • validateNoGroupTypeName

      public void validateNoGroupTypeName()
      if there is a type, there shouldnt be
    • validateHasGroupTypeName

      public void validateHasGroupTypeName()
      if there is no type, there should be
    • validateNoQueryFilter0

      public void validateNoQueryFilter0()
      if there is a query filter 0, there shouldnt be
    • validateHasQueryFilter0

      public void validateHasQueryFilter0()
      if there is no query filter 0, there should be
    • validateNoQueryFilter1

      public void validateNoQueryFilter1()
      if there is a query filter 1, there shouldnt be
    • validateHasQueryFilter1

      public void validateHasQueryFilter1()
      if there is no query filter 1, there should be
    • getQueryFilterType

      public String getQueryFilterType()
      findGroupType is the WsQueryFilterType enum for which type of find is happening: e.g. FIND_BY_GROUP_UUID, FIND_BY_GROUP_NAME_EXACT, FIND_BY_STEM_NAME, FIND_BY_APPROXIMATE_ATTRIBUTE, FIND_BY_ATTRIBUTE, FIND_BY_GROUP_NAME_APPROXIMATE, FIND_BY_TYPE, AND, OR, MINUS;
      Returns:
      the findGroupType
    • setQueryFilterType

      public void setQueryFilterType(String findGroupType1)
      findGroupType is the WsQueryFilterType enum for which type of find is happening: e.g. FIND_BY_GROUP_UUID, FIND_BY_GROUP_NAME_EXACT, FIND_BY_STEM_NAME, FIND_BY_APPROXIMATE_ATTRIBUTE, FIND_BY_ATTRIBUTE, FIND_BY_GROUP_NAME_APPROXIMATE, FIND_BY_TYPE, AND, OR, MINUS;
      Parameters:
      findGroupType1 - the findGroupType to set
    • getGroupName

      public String getGroupName()
      groupName search by group name (must match exactly), cannot use other params with this
      Returns:
      the groupName
    • setGroupName

      public void setGroupName(String groupName1)
      groupName search by group name (must match exactly), cannot use other params with this
      Parameters:
      groupName1 - the groupName to set
    • getStemName

      public String getStemName()
      stemName will return groups only in this stem
      Returns:
      the stemName
    • setStemName

      public void setStemName(String stemName1)
      stemName will return groups only in this stem
      Parameters:
      stemName1 - the stemName to set
    • getStemNameScope

      public String getStemNameScope()
      stemNameScope if searching by stem, ONE_LEVEL is for one level, ALL_IN_SUBTREE will return all in sub tree. Default is ALL_IN_SUBTREE
      Returns:
      the stemNameScope
    • retrieveStemScope

      public StemScope retrieveStemScope(StemScope defaultScope)
      convert the stem scope into a stem scope
      Parameters:
      defaultScope - is the default scope
      Returns:
      the stem scope, or the default
    • setStemNameScope

      public void setStemNameScope(String stemNameScope1)
      stemNameScope if searching by stem, ONE_LEVEL is for one level, ALL_IN_SUBTREE will return all in sub tree. Default is ALL_IN_SUBTREE
      Parameters:
      stemNameScope1 - the stemNameScope to set
    • getGroupUuid

      public String getGroupUuid()
      groupUuid search by group uuid (must match exactly), cannot use other
      Returns:
      the groupUuid
    • setGroupUuid

      public void setGroupUuid(String groupUuid1)
      groupUuid search by group uuid (must match exactly), cannot use other
      Parameters:
      groupUuid1 - the groupUuid to set
    • getQueryTerm

      public String getQueryTerm()
      queryTerm if searching by query, this is a term that will be matched to name, extension, etc
      Returns:
      the queryTerm
    • setQueryTerm

      public void setQueryTerm(String queryTerm1)
      queryTerm if searching by query, this is a term that will be matched to name, extension, etc
      Parameters:
      queryTerm1 - the queryTerm to set
    • getGroupAttributeName

      public String getGroupAttributeName()
      if querying, this is the attribute name, or null for search all attributes
      Returns:
      the attributeName
    • setGroupAttributeName

      public void setGroupAttributeName(String attributeName1)
      if querying, this is the attribute name, or null or search all attributes
      Parameters:
      attributeName1 - the attributeName to set
    • getGroupTypeName

      public String getGroupTypeName()
      if searching by type, this is the type to search for. not yet implemented
      Returns:
      the theType
    • setGroupTypeName

      public void setGroupTypeName(String theType1)
      if searching by type, this is the type to search for. not yet implemented
      Parameters:
      theType1 - the theType to set
    • getQueryFilter0

      public WsQueryFilter getQueryFilter0()
      if 'and' or 'or' this is the first group, and if complement, this is the group to complement
      Returns:
      the queryFilter0
    • setQueryFilter0

      public void setQueryFilter0(WsQueryFilter theQueryFilter0)
      if 'and' or 'or' this is the first group, and if complement, this is the group to complement
      Parameters:
      theQueryFilter0 - the queryFilter0 to set
    • getQueryFilter1

      public WsQueryFilter getQueryFilter1()
      if 'and' or 'or', this is the second group
      Returns:
      the queryFilter1
    • setQueryFilter1

      public void setQueryFilter1(WsQueryFilter theQueryFilter1)
      if 'and' or 'or', this is the second group
      Parameters:
      theQueryFilter1 - the queryFilter1 to set
    • retrieveQueryFilter

      public QueryFilter retrieveQueryFilter()
      convert the query into a query filter
      Returns:
      the query filter
    • retrieveQueryFilterType

      public WsQueryFilterType retrieveQueryFilterType()
      Returns:
    • retrieveTypeOfGroups

      public Set<TypeOfGroup> retrieveTypeOfGroups()
      Returns:
      type of group
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • validate

      public void validate()
      validate the tree of queries
    • retrieveStem

      public Stem retrieveStem()
      if there is no stem, return null. if there is a stem, then find it, and return it. If not found, then throw WsInvalidQueryException
      Returns:
      the stem or null
    • retrieveGroupType

      public GroupType retrieveGroupType()
      if there is no group type name, return null if there is a group type name, then find it, and return it. If not found, then throw WsInvalidQueryException
      Returns:
      the stem or null
    • retrieveGrouperSession

      public GrouperSession retrieveGrouperSession()
      grouper session
      Returns:
      the grouperSession
    • assignGrouperSession

      public void assignGrouperSession(GrouperSession grouperSession1)
      grouper session
      Parameters:
      grouperSession1 - the grouperSession to set
    • getGroupAttributeValue

      public String getGroupAttributeValue()
      groupAttributeValue if searching by query, this is a term that will be matched to
      Returns:
      the groupAttributeValue
    • setGroupAttributeValue

      public void setGroupAttributeValue(String groupAttributeValue1)
      groupAttributeValue if searching by query, this is a term that will be matched to
      Parameters:
      groupAttributeValue1 - the groupAttributeValue to set
    • getPageIsCursor

      public String getPageIsCursor()
      T|F default to F. if this is T then we are doing cursor paging
      Returns:
      the pageIsCursor
    • setPageIsCursor

      public void setPageIsCursor(String pageIsCursor1)
      T|F default to F. if this is T then we are doing cursor paging
      Parameters:
      pageIsCursor1 - the pageIsCursor to set
    • getPageLastCursorField

      public String getPageLastCursorField()
      field that will be sent back for cursor based paging
      Returns:
      the pageLastCursorField
    • setPageLastCursorField

      public void setPageLastCursorField(String pageLastCursorField1)
      field that will be sent back for cursor based paging
      Parameters:
      pageLastCursorField1 - the pageLastCursorField to set
    • getPageLastCursorFieldType

      public String getPageLastCursorFieldType()
      Returns:
      the pageLastCursorFieldType
    • setPageLastCursorFieldType

      public void setPageLastCursorFieldType(String pageLastCursorFieldType1)
      Parameters:
      pageLastCursorFieldType1 - the pageLastCursorFieldType to set
    • getPageCursorFieldIncludesLastRetrieved

      public String getPageCursorFieldIncludesLastRetrieved()
      Returns:
      the pageCursorFieldIncludesLastRetrieved
    • setPageCursorFieldIncludesLastRetrieved

      public void setPageCursorFieldIncludesLastRetrieved(String pageCursorFieldIncludesLastRetrieved1)
      Parameters:
      pageCursorFieldIncludesLastRetrieved1 - the pageCursorFieldIncludesLastRetrieved to set
    • getEnabled

      public String getEnabled()
      Returns:
      the enabled
    • setEnabled

      public void setEnabled(String enabled1)
      Parameters:
      enabled1 - the enabled to set
    • retrieveEnabledAsBoolean

      public Boolean retrieveEnabledAsBoolean()
      Returns:
      true if enabled only, false if disabled only, null if everything