C# 클래스 Rock.Model.GroupService

Data Access/service class for Rock.Model.Group entity type objects that extends the functionality of Rock.Data.Service
파일 보기 프로젝트 열기: NewSpring/Rock 1 사용 예제들

공개 메소드들

메소드 설명
AddNewGroupAddress ( RockContext rockContext, Group group, string locationTypeGuid, Location location, bool moveExistingToPrevious = false ) : void

Adds the new group address.

AddNewGroupAddress ( RockContext rockContext, Group group, string locationTypeGuid, int locationId, bool moveExistingToPrevious = false ) : void

Adds the new group address.

AddNewGroupAddress ( RockContext rockContext, Group group, string locationTypeGuid, string street1, string street2, string city, string state, string postalCode, string country, bool moveExistingToPrevious = false ) : void

Adds the new group address.

Delete ( Group item ) : bool

Deletes a specified group. Returns a boolean flag indicating if the deletion was successful.

GetAllAncestorIds ( int childGroupId ) : IOrderedEnumerable

Returns an enumerable collection of the Rock.Model.Group Ids that are ancestors of a specified groupId sorted starting with the most immediate parent

GetAllDescendents ( int parentGroupId ) : IEnumerable

Returns an enumerable collection of Groups that are descendants of a specified group.

GetByGroupTypeId ( int groupTypeId ) : IQueryable

Returns an enumerable collection of Rock.Model.Group entities that by their Rock.Model.GroupType Id.

GetByGuid ( System.Guid guid ) : Group

Returns the Rock.Model.Group containing a Guid property that matches the provided value.

GetByIsSecurityRole ( bool isSecurityRole ) : IQueryable

Returns an enumerable collection of Groups by their IsSecurityRole flag.

GetByParentGroupId ( int parentGroupId ) : IQueryable

Returns a collection of Rock.Model.Group">Groups by the Id of its parent

GetByParentGroupIdAndName ( int parentGroupId, string name ) : IQueryable

Returns an enumerable collection of Rock.Model.Group">Groups by the Id of their parent

GetChildren ( int id, int rootGroupId, bool limitToSecurityRoleGroups, List groupTypeIncludedIds, List groupTypeExcludedIds, bool includeInactiveGroups, bool limitToShowInNavigation ) : IQueryable

Gets immediate children of a group (id) or a rootGroupId. Specify 0 for both Id and rootGroupId to get top level groups limited

GetGeofencedFamilies ( System.Guid groupGuid ) : IQueryable

Gets the family groups that are geofenced by any of the selected group's locations

GetGeofencedFamilies ( List geofences ) : IQueryable

Gets the family groups that are geofenced by any of the selected geofences

GetGeofencedFamilies ( int groupId ) : IQueryable

Gets the family groups that are geofenced by any of the selected group's locations

GetGeofencingGroups ( IQueryable points, System.Guid groupTypeGuid ) : IQueryable

Gets the groups of a selected type that have a geofence location that surrounds any of the selected points

GetGeofencingGroups ( IQueryable points, int groupTypeId ) : IQueryable

Gets the groups of a selected type that have a geofence location that surrounds any of the selected points

GetGeofencingGroups ( int personId, System.Guid groupTypeGuid ) : IQueryable

Gets the groups of a particular type that geofence the selected person's mapped location(s)

GetGeofencingGroups ( int personId, int groupTypeId ) : IQueryable

Gets the groups of a particular type that geofence the selected person's mapped location(s)

GetNavigationChildren ( int id, int rootGroupId, bool limitToSecurityRoleGroups, List groupTypeIncludedIds, List groupTypeExcludedIds, bool includeInactiveGroups = true ) : IQueryable

Gets immediate navigation children of a group (id) or a rootGroupId. Specify 0 for both Id and rootGroupId to get top level groups limited

GetNearestGroup ( int personId, int groupTypeId ) : Group

Gets the nearest group.

GroupAncestorPathName ( int groupId ) : string

Groups the name of the ancestor path.

GroupMembersNotMeetingRequirements ( int groupId, bool includeWarnings, bool includeInactive = false ) : Dictionary>

Groups the members not meeting requirements.

SaveNewFamily ( RockContext rockContext, List familyMembers, int campusId, bool savePersonAttributes ) : Group

Saves the new family.

SaveNewGroup ( RockContext rockContext, int groupTypeId, System.Guid parentGroupGuid, string groupName, List groupMembers, int campusId, bool savePersonAttributes ) : Group

Saves the new group.

비공개 메소드들

메소드 설명
AddNewFamilyAddress ( RockContext rockContext, Group family, string locationTypeGuid, Location location, bool moveExistingToPrevious = false ) : void
AddNewFamilyAddress ( RockContext rockContext, Group family, string locationTypeGuid, int locationId, bool moveExistingToPrevious = false ) : void
AddNewFamilyAddress ( RockContext rockContext, Group family, string locationTypeGuid, string street1, string street2, string city, string state, string postalCode, string country, bool moveExistingToPrevious = false ) : void

메소드 상세

AddNewGroupAddress() 공개 정적인 메소드

Adds the new group address.
public static AddNewGroupAddress ( RockContext rockContext, Group group, string locationTypeGuid, Location location, bool moveExistingToPrevious = false ) : void
rockContext Rock.Data.RockContext The rock context.
group Group The group.
locationTypeGuid string The location type unique identifier.
location Location The location.
moveExistingToPrevious bool if set to true [move existing to previous].
리턴 void

AddNewGroupAddress() 공개 정적인 메소드

Adds the new group address.
public static AddNewGroupAddress ( RockContext rockContext, Group group, string locationTypeGuid, int locationId, bool moveExistingToPrevious = false ) : void
rockContext Rock.Data.RockContext The rock context.
group Group The group.
locationTypeGuid string The location type unique identifier.
locationId int The location identifier.
moveExistingToPrevious bool if set to true [move existing to previous].
리턴 void

AddNewGroupAddress() 공개 정적인 메소드

Adds the new group address.
public static AddNewGroupAddress ( RockContext rockContext, Group group, string locationTypeGuid, string street1, string street2, string city, string state, string postalCode, string country, bool moveExistingToPrevious = false ) : void
rockContext Rock.Data.RockContext The rock context.
group Group The group.
locationTypeGuid string The location type unique identifier.
street1 string The street1.
street2 string The street2.
city string The city.
state string The state.
postalCode string The postal code.
country string The country.
moveExistingToPrevious bool if set to true [move existing to previous].
리턴 void

Delete() 공개 메소드

Deletes a specified group. Returns a boolean flag indicating if the deletion was successful.
public Delete ( Group item ) : bool
item Group The to delete.
리턴 bool

GetAllAncestorIds() 공개 메소드

Returns an enumerable collection of the Rock.Model.Group Ids that are ancestors of a specified groupId sorted starting with the most immediate parent
public GetAllAncestorIds ( int childGroupId ) : IOrderedEnumerable
childGroupId int The child group identifier.
리턴 IOrderedEnumerable

GetAllDescendents() 공개 메소드

Returns an enumerable collection of Groups that are descendants of a specified group.
public GetAllDescendents ( int parentGroupId ) : IEnumerable
parentGroupId int An representing the Id of the to retrieve descendants for.
리턴 IEnumerable

GetByGroupTypeId() 공개 메소드

Returns an enumerable collection of Rock.Model.Group entities that by their Rock.Model.GroupType Id.
public GetByGroupTypeId ( int groupTypeId ) : IQueryable
groupTypeId int An representing the Id of the that they belong to.
리턴 IQueryable

GetByGuid() 공개 메소드

Returns the Rock.Model.Group containing a Guid property that matches the provided value.
public GetByGuid ( System.Guid guid ) : Group
guid System.Guid A to find a by.
리턴 Group

GetByIsSecurityRole() 공개 메소드

Returns an enumerable collection of Groups by their IsSecurityRole flag.
public GetByIsSecurityRole ( bool isSecurityRole ) : IQueryable
isSecurityRole bool A representing the IsSecurityRole flag value to search by.
리턴 IQueryable

GetByParentGroupId() 공개 메소드

Returns a collection of Rock.Model.Group">Groups by the Id of its parent
public GetByParentGroupId ( int parentGroupId ) : IQueryable
parentGroupId int A representing the Id of the parent to search by. This value /// is nullable and a null value will search for Groups that do not inherit from other groups.
리턴 IQueryable

GetByParentGroupIdAndName() 공개 메소드

Returns an enumerable collection of Rock.Model.Group">Groups by the Id of their parent
public GetByParentGroupIdAndName ( int parentGroupId, string name ) : IQueryable
parentGroupId int An representing the Id of the parent to search by.
name string A containing the Name of the to search by.
리턴 IQueryable

GetChildren() 공개 메소드

Gets immediate children of a group (id) or a rootGroupId. Specify 0 for both Id and rootGroupId to get top level groups limited
public GetChildren ( int id, int rootGroupId, bool limitToSecurityRoleGroups, List groupTypeIncludedIds, List groupTypeExcludedIds, bool includeInactiveGroups, bool limitToShowInNavigation ) : IQueryable
id int The ID of the Group to get the children of (or 0 to use rootGroupId)
rootGroupId int The root group ID
limitToSecurityRoleGroups bool if set to true [limit to security role groups].
groupTypeIncludedIds List The group type included ids.
groupTypeExcludedIds List The group type excluded ids.
includeInactiveGroups bool if set to true [include inactive groups].
limitToShowInNavigation bool if set to true [limit to show in navigation].
리턴 IQueryable

GetGeofencedFamilies() 공개 메소드

Gets the family groups that are geofenced by any of the selected group's locations
public GetGeofencedFamilies ( System.Guid groupGuid ) : IQueryable
groupGuid System.Guid The group unique identifier.
리턴 IQueryable

GetGeofencedFamilies() 공개 메소드

Gets the family groups that are geofenced by any of the selected geofences
public GetGeofencedFamilies ( List geofences ) : IQueryable
geofences List The geofences.
리턴 IQueryable

GetGeofencedFamilies() 공개 메소드

Gets the family groups that are geofenced by any of the selected group's locations
public GetGeofencedFamilies ( int groupId ) : IQueryable
groupId int The group identifier.
리턴 IQueryable

GetGeofencingGroups() 공개 메소드

Gets the groups of a selected type that have a geofence location that surrounds any of the selected points
public GetGeofencingGroups ( IQueryable points, System.Guid groupTypeGuid ) : IQueryable
points IQueryable The points.
groupTypeGuid System.Guid The group type unique identifier.
리턴 IQueryable

GetGeofencingGroups() 공개 메소드

Gets the groups of a selected type that have a geofence location that surrounds any of the selected points
public GetGeofencingGroups ( IQueryable points, int groupTypeId ) : IQueryable
points IQueryable The points.
groupTypeId int The group type identifier.
리턴 IQueryable

GetGeofencingGroups() 공개 메소드

Gets the groups of a particular type that geofence the selected person's mapped location(s)
public GetGeofencingGroups ( int personId, System.Guid groupTypeGuid ) : IQueryable
personId int The person identifier.
groupTypeGuid System.Guid The group type unique identifier.
리턴 IQueryable

GetGeofencingGroups() 공개 메소드

Gets the groups of a particular type that geofence the selected person's mapped location(s)
public GetGeofencingGroups ( int personId, int groupTypeId ) : IQueryable
personId int The person identifier.
groupTypeId int The group type identifier.
리턴 IQueryable

GetNavigationChildren() 공개 메소드

Gets immediate navigation children of a group (id) or a rootGroupId. Specify 0 for both Id and rootGroupId to get top level groups limited
public GetNavigationChildren ( int id, int rootGroupId, bool limitToSecurityRoleGroups, List groupTypeIncludedIds, List groupTypeExcludedIds, bool includeInactiveGroups = true ) : IQueryable
id int The identifier.
rootGroupId int The root group identifier.
limitToSecurityRoleGroups bool if set to true [limit to security role groups].
groupTypeIncludedIds List The group type included ids.
groupTypeExcludedIds List The group type excluded ids.
includeInactiveGroups bool if set to true [include inactive groups].
리턴 IQueryable

GetNearestGroup() 공개 메소드

Gets the nearest group.
public GetNearestGroup ( int personId, int groupTypeId ) : Group
personId int The person identifier.
groupTypeId int The group type identifier.
리턴 Group

GroupAncestorPathName() 공개 메소드

Groups the name of the ancestor path.
public GroupAncestorPathName ( int groupId ) : string
groupId int The group identifier.
리턴 string

GroupMembersNotMeetingRequirements() 공개 메소드

Groups the members not meeting requirements.
public GroupMembersNotMeetingRequirements ( int groupId, bool includeWarnings, bool includeInactive = false ) : Dictionary>
groupId int The group identifier.
includeWarnings bool if set to true [include warnings].
includeInactive bool if set to true [include inactive].
리턴 Dictionary>

SaveNewFamily() 공개 정적인 메소드

Saves the new family.
public static SaveNewFamily ( RockContext rockContext, List familyMembers, int campusId, bool savePersonAttributes ) : Group
rockContext Rock.Data.RockContext The rock context.
familyMembers List The family members.
campusId int The campus identifier.
savePersonAttributes bool if set to true [save person attributes].
리턴 Group

SaveNewGroup() 공개 정적인 메소드

Saves the new group.
public static SaveNewGroup ( RockContext rockContext, int groupTypeId, System.Guid parentGroupGuid, string groupName, List groupMembers, int campusId, bool savePersonAttributes ) : Group
rockContext Rock.Data.RockContext The rock context.
groupTypeId int The group type identifier.
parentGroupGuid System.Guid The parent group unique identifier.
groupName string Name of the group.
groupMembers List The group members.
campusId int The campus identifier.
savePersonAttributes bool if set to true [save person attributes].
리턴 Group