-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from diging/develop
prepare release
- Loading branch information
Showing
56 changed files
with
2,266 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,4 @@ | |
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
vspace/src/main/java/edu/asu/diging/simpleusers/web/admin/UsersUtility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package edu.asu.diging.simpleusers.web.admin; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import org.springframework.security.core.authority.SimpleGrantedAuthority; | ||
|
||
/** | ||
* Utility class that contains methods for ListUsersController | ||
* @author Glen Dsouza | ||
*/ | ||
public class UsersUtility { | ||
|
||
/** | ||
* This method checks if the User has a specific Role assigned to them. | ||
* It takes as parameter a set of User Roles of the type SimpleGrantedAuthority | ||
* and it validates if the User Role exists with the second parameter which is | ||
* a String of the type of Role we need to validate. | ||
* @param userRoles a set of SimpleGrantedAuthority containing details of the roles assigned to a User | ||
* @param role the role that needs to be checked against userRoles | ||
* @return Boolean: True if User is assigned the role, else False. | ||
*/ | ||
public static Boolean checkUserRoleExists(Set<SimpleGrantedAuthority> userRoles, String role) { | ||
return userRoles.stream().anyMatch(roleKey -> (roleKey.toString().equals(role))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
vspace/src/main/java/edu/asu/diging/vspace/core/data/TextContentBlockRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
package edu.asu.diging.vspace.core.data; | ||
|
||
import org.javers.spring.annotation.JaversSpringDataAuditable; | ||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import edu.asu.diging.vspace.core.model.ISlide; | ||
import edu.asu.diging.vspace.core.model.impl.TextBlock; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface TextContentBlockRepository extends PagingAndSortingRepository<TextBlock, String> { | ||
|
||
@Query("SELECT DISTINCT c.slide FROM ContentBlock c, TextBlock t WHERE c.id = t.id AND t.text LIKE %?1%") | ||
public Page<ISlide> findWithNameOrDescription(Pageable requestedPage, String searchText); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
vspace/src/main/java/edu/asu/diging/vspace/core/services/IStaffSearchManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package edu.asu.diging.vspace.core.services; | ||
|
||
import org.springframework.data.domain.Page; | ||
|
||
import edu.asu.diging.vspace.core.model.IModule; | ||
import edu.asu.diging.vspace.core.model.ISlide; | ||
import edu.asu.diging.vspace.core.model.ISpace; | ||
|
||
public interface IStaffSearchManager { | ||
|
||
Page<ISpace> searchInSpaces(String searchTerm, int page); | ||
|
||
Page<IModule> searchInModules(String searchTerm, int page); | ||
|
||
Page<ISlide> searchInSlides(String searchTerm, int page); | ||
|
||
Page<ISlide> searchInSlideTexts(String searchTerm, int page); | ||
} |
Oops, something went wrong.