new voucher system + jdoc
This commit is contained in:
@@ -17,9 +17,7 @@ import de.bstly.we.partey.api.controller.support.DebugLogger;
|
||||
import de.bstly.we.partey.api.security.ParteyApiAuthentication;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class DebugController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/api")
|
||||
@@ -29,7 +27,11 @@ public class DebugController extends DebugLogger {
|
||||
private ParteyApiAuthentication parteyApiAuthentication;
|
||||
|
||||
/**
|
||||
*
|
||||
* Debug.
|
||||
*
|
||||
* @param payload the payload
|
||||
* @param request the request
|
||||
* @param response the response
|
||||
*/
|
||||
@RequestMapping("/**")
|
||||
public void debug(@RequestBody Optional<Object> payload, HttpServletRequest request,
|
||||
|
||||
@@ -24,9 +24,7 @@ import de.bstly.we.partey.businesslogic.model.Room;
|
||||
import de.bstly.we.partey.model.GameRoomPolicyTypes;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class MapController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/api/map")
|
||||
@@ -38,10 +36,12 @@ public class MapController extends DebugLogger {
|
||||
private ParteyMapManager parteyMapManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param playUri
|
||||
* @param request
|
||||
* @return
|
||||
* Gets the map data.
|
||||
*
|
||||
* @param playUri the play uri
|
||||
* @param request the request
|
||||
* @param response the response
|
||||
* @return the map data
|
||||
*/
|
||||
@GetMapping
|
||||
public MapDetailsData getMapData(@RequestParam("playUri") String playUri, HttpServletRequest request,
|
||||
|
||||
@@ -17,8 +17,7 @@ import de.bstly.we.partey.api.security.ParteyApiAuthentication;
|
||||
import de.bstly.we.partey.businesslogic.ParteyUserReportManager;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ReportController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/api/report")
|
||||
@@ -29,6 +28,12 @@ public class ReportController extends DebugLogger {
|
||||
@Autowired
|
||||
private ParteyUserReportManager parteyUserReportManager;
|
||||
|
||||
/**
|
||||
* Report.
|
||||
*
|
||||
* @param userReport the user report
|
||||
* @param request the request
|
||||
*/
|
||||
@PostMapping("")
|
||||
public void report(@RequestBody UserReport userReport, HttpServletRequest request) {
|
||||
parteyApiAuthentication.authenticateRequest(request);
|
||||
|
||||
@@ -31,9 +31,7 @@ import de.bstly.we.partey.businesslogic.model.Room;
|
||||
import de.bstly.we.partey.model.ParteyUserTag;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class RoomController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/api/room")
|
||||
@@ -56,11 +54,12 @@ public class RoomController extends DebugLogger {
|
||||
private List<String> worldMapCache = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userIdentifier
|
||||
* @param roomId
|
||||
* @param request
|
||||
* @return
|
||||
* Access.
|
||||
*
|
||||
* @param userIdentifier the user identifier
|
||||
* @param roomId the room id
|
||||
* @param request the request
|
||||
* @return the member data
|
||||
*/
|
||||
@GetMapping("/access")
|
||||
public MemberData access(@RequestParam("userIdentifier") String userIdentifier,
|
||||
@@ -105,10 +104,11 @@ public class RoomController extends DebugLogger {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param roomUrl
|
||||
* @param request
|
||||
* @return
|
||||
* Same world.
|
||||
*
|
||||
* @param roomUrl the room url
|
||||
* @param request the request
|
||||
* @return the list
|
||||
*/
|
||||
@GetMapping("/sameWorld")
|
||||
public List<String> sameWorld(@RequestParam("roomUrl") String roomUrl,
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class CharacterTexture.
|
||||
*/
|
||||
public class CharacterTexture {
|
||||
|
||||
@@ -16,6 +14,8 @@ public class CharacterTexture {
|
||||
private String rights;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public int getId() {
|
||||
@@ -23,13 +23,17 @@ public class CharacterTexture {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the level.
|
||||
*
|
||||
* @return the level
|
||||
*/
|
||||
public int getLevel() {
|
||||
@@ -37,13 +41,17 @@ public class CharacterTexture {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param level the level to set
|
||||
* Sets the level.
|
||||
*
|
||||
* @param level the new level
|
||||
*/
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the url.
|
||||
*
|
||||
* @return the url
|
||||
*/
|
||||
public String getUrl() {
|
||||
@@ -51,13 +59,17 @@ public class CharacterTexture {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param url the url to set
|
||||
* Sets the url.
|
||||
*
|
||||
* @param url the new url
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the rights.
|
||||
*
|
||||
* @return the rights
|
||||
*/
|
||||
public String getRights() {
|
||||
@@ -65,7 +77,9 @@ public class CharacterTexture {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rights the rights to set
|
||||
* Sets the rights.
|
||||
*
|
||||
* @param rights the new rights
|
||||
*/
|
||||
public void setRights(String rights) {
|
||||
this.rights = rights;
|
||||
|
||||
@@ -10,9 +10,7 @@ import com.google.common.collect.Lists;
|
||||
import de.bstly.we.partey.model.GameRoomPolicyTypes;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class MapDetailsData.
|
||||
*/
|
||||
public class MapDetailsData {
|
||||
|
||||
@@ -24,34 +22,44 @@ public class MapDetailsData {
|
||||
private String iframeAuthentication;
|
||||
|
||||
/**
|
||||
* @return the mapUrl
|
||||
* Gets the map url.
|
||||
*
|
||||
* @return the map url
|
||||
*/
|
||||
public String getMapUrl() {
|
||||
return mapUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mapUrl the mapUrl to set
|
||||
* Sets the map url.
|
||||
*
|
||||
* @param mapUrl the new map url
|
||||
*/
|
||||
public void setMapUrl(String mapUrl) {
|
||||
this.mapUrl = mapUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the policy_type
|
||||
* Gets the policy type.
|
||||
*
|
||||
* @return the policy type
|
||||
*/
|
||||
public GameRoomPolicyTypes getPolicy_type() {
|
||||
return policy_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param policy_type the policy_type to set
|
||||
* Sets the policy type.
|
||||
*
|
||||
* @param policy_type the new policy type
|
||||
*/
|
||||
public void setPolicy_type(GameRoomPolicyTypes policy_type) {
|
||||
this.policy_type = policy_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the tags.
|
||||
*
|
||||
* @return the tags
|
||||
*/
|
||||
public List<String> getTags() {
|
||||
@@ -59,13 +67,17 @@ public class MapDetailsData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tags the tags to set
|
||||
* Sets the tags.
|
||||
*
|
||||
* @param tags the new tags
|
||||
*/
|
||||
public void setTags(List<String> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the textures.
|
||||
*
|
||||
* @return the textures
|
||||
*/
|
||||
public List<CharacterTexture> getTextures() {
|
||||
@@ -73,35 +85,45 @@ public class MapDetailsData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param textures the textures to set
|
||||
* Sets the textures.
|
||||
*
|
||||
* @param textures the new textures
|
||||
*/
|
||||
public void setTextures(List<CharacterTexture> textures) {
|
||||
this.textures = textures;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the authenticationMandatory
|
||||
* Checks if is authentication mandatory.
|
||||
*
|
||||
* @return true, if is authentication mandatory
|
||||
*/
|
||||
public boolean isAuthenticationMandatory() {
|
||||
return authenticationMandatory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param authenticationMandatory the authenticationMandatory to set
|
||||
* Sets the authentication mandatory.
|
||||
*
|
||||
* @param authenticationMandatory the new authentication mandatory
|
||||
*/
|
||||
public void setAuthenticationMandatory(boolean authenticationMandatory) {
|
||||
this.authenticationMandatory = authenticationMandatory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the iframeAuthentication
|
||||
* Gets the iframe authentication.
|
||||
*
|
||||
* @return the iframe authentication
|
||||
*/
|
||||
public String getIframeAuthentication() {
|
||||
return iframeAuthentication;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param iframeAuthentication the iframeAuthentication to set
|
||||
* Sets the iframe authentication.
|
||||
*
|
||||
* @param iframeAuthentication the new iframe authentication
|
||||
*/
|
||||
public void setIframeAuthentication(String iframeAuthentication) {
|
||||
this.iframeAuthentication = iframeAuthentication;
|
||||
|
||||
@@ -8,9 +8,7 @@ import java.util.List;
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class MemberData.
|
||||
*/
|
||||
public class MemberData {
|
||||
|
||||
@@ -22,20 +20,26 @@ public class MemberData {
|
||||
private boolean anonymous;
|
||||
|
||||
/**
|
||||
* @return the userUuid
|
||||
* Gets the user uuid.
|
||||
*
|
||||
* @return the user uuid
|
||||
*/
|
||||
public String getUserUuid() {
|
||||
return userUuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param userUuid the userUuid to set
|
||||
* Sets the user uuid.
|
||||
*
|
||||
* @param userUuid the new user uuid
|
||||
*/
|
||||
public void setUserUuid(String userUuid) {
|
||||
this.userUuid = userUuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the tags.
|
||||
*
|
||||
* @return the tags
|
||||
*/
|
||||
public List<String> getTags() {
|
||||
@@ -43,27 +47,35 @@ public class MemberData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tags the tags to set
|
||||
* Sets the tags.
|
||||
*
|
||||
* @param tags the new tags
|
||||
*/
|
||||
public void setTags(List<String> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the visitCardUrl
|
||||
* Gets the visit card url.
|
||||
*
|
||||
* @return the visit card url
|
||||
*/
|
||||
public String getVisitCardUrl() {
|
||||
return visitCardUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param visitCardUrl the visitCardUrl to set
|
||||
* Sets the visit card url.
|
||||
*
|
||||
* @param visitCardUrl the new visit card url
|
||||
*/
|
||||
public void setVisitCardUrl(String visitCardUrl) {
|
||||
this.visitCardUrl = visitCardUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the textures.
|
||||
*
|
||||
* @return the textures
|
||||
*/
|
||||
public List<CharacterTexture> getTextures() {
|
||||
@@ -71,13 +83,17 @@ public class MemberData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param textures the textures to set
|
||||
* Sets the textures.
|
||||
*
|
||||
* @param textures the new textures
|
||||
*/
|
||||
public void setTextures(List<CharacterTexture> textures) {
|
||||
this.textures = textures;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the messages.
|
||||
*
|
||||
* @return the messages
|
||||
*/
|
||||
public List<Object> getMessages() {
|
||||
@@ -85,21 +101,27 @@ public class MemberData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param messages the messages to set
|
||||
* Sets the messages.
|
||||
*
|
||||
* @param messages the new messages
|
||||
*/
|
||||
public void setMessages(List<Object> messages) {
|
||||
this.messages = messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the anonymous
|
||||
* Checks if is anonymous.
|
||||
*
|
||||
* @return true, if is anonymous
|
||||
*/
|
||||
public boolean isAnonymous() {
|
||||
return anonymous;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param anonymous the anonymous to set
|
||||
* Sets the anonymous.
|
||||
*
|
||||
* @param anonymous the new anonymous
|
||||
*/
|
||||
public void setAnonymous(boolean anonymous) {
|
||||
this.anonymous = anonymous;
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
package de.bstly.we.partey.api.controller.model;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class UserReport.
|
||||
*/
|
||||
public class UserReport {
|
||||
|
||||
@@ -15,56 +14,72 @@ public class UserReport {
|
||||
private String reportWorldSlug;
|
||||
|
||||
/**
|
||||
* @return the reportedUserUuid
|
||||
* Gets the reported user uuid.
|
||||
*
|
||||
* @return the reported user uuid
|
||||
*/
|
||||
public String getReportedUserUuid() {
|
||||
return reportedUserUuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportedUserUuid the reportedUserUuid to set
|
||||
* Sets the reported user uuid.
|
||||
*
|
||||
* @param reportedUserUuid the new reported user uuid
|
||||
*/
|
||||
public void setReportedUserUuid(String reportedUserUuid) {
|
||||
this.reportedUserUuid = reportedUserUuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the reportedUserComment
|
||||
* Gets the reported user comment.
|
||||
*
|
||||
* @return the reported user comment
|
||||
*/
|
||||
public String getReportedUserComment() {
|
||||
return reportedUserComment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportedUserComment the reportedUserComment to set
|
||||
* Sets the reported user comment.
|
||||
*
|
||||
* @param reportedUserComment the new reported user comment
|
||||
*/
|
||||
public void setReportedUserComment(String reportedUserComment) {
|
||||
this.reportedUserComment = reportedUserComment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the reporterUserUuid
|
||||
* Gets the reporter user uuid.
|
||||
*
|
||||
* @return the reporter user uuid
|
||||
*/
|
||||
public String getReporterUserUuid() {
|
||||
return reporterUserUuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reporterUserUuid the reporterUserUuid to set
|
||||
* Sets the reporter user uuid.
|
||||
*
|
||||
* @param reporterUserUuid the new reporter user uuid
|
||||
*/
|
||||
public void setReporterUserUuid(String reporterUserUuid) {
|
||||
this.reporterUserUuid = reporterUserUuid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the reportWorldSlug
|
||||
* Gets the report world slug.
|
||||
*
|
||||
* @return the report world slug
|
||||
*/
|
||||
public String getReportWorldSlug() {
|
||||
return reportWorldSlug;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportWorldSlug the reportWorldSlug to set
|
||||
* Sets the report world slug.
|
||||
*
|
||||
* @param reportWorldSlug the new report world slug
|
||||
*/
|
||||
public void setReportWorldSlug(String reportWorldSlug) {
|
||||
this.reportWorldSlug = reportWorldSlug;
|
||||
|
||||
@@ -14,8 +14,7 @@ import org.slf4j.LoggerFactory;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class DebugLogger.
|
||||
*/
|
||||
public class DebugLogger {
|
||||
|
||||
@@ -23,17 +22,19 @@ public class DebugLogger {
|
||||
protected Gson gson = new Gson();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param request
|
||||
* Debug print request.
|
||||
*
|
||||
* @param request the request
|
||||
*/
|
||||
public void debugPrintRequest(HttpServletRequest request) {
|
||||
debugPrintRequest(request, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param request
|
||||
* @param payload
|
||||
* Debug print request.
|
||||
*
|
||||
* @param request the request
|
||||
* @param payload the payload
|
||||
*/
|
||||
public void debugPrintRequest(HttpServletRequest request, Optional<Object> payload) {
|
||||
logger.debug(
|
||||
@@ -63,9 +64,10 @@ public class DebugLogger {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param response
|
||||
* @param payload
|
||||
* Debug print response.
|
||||
*
|
||||
* @param response the response
|
||||
* @param payload the payload
|
||||
*/
|
||||
public void debugPrintResponse(HttpServletRequest response, Optional<Object> payload) {
|
||||
if (payload.isPresent()) {
|
||||
|
||||
@@ -20,8 +20,7 @@ import de.bstly.we.controller.support.EntityResponseStatusException;
|
||||
import de.bstly.we.security.model.LocalUserDetails;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyApiAuthentication.
|
||||
*/
|
||||
@Component
|
||||
public class ParteyApiAuthentication {
|
||||
@@ -32,6 +31,11 @@ public class ParteyApiAuthentication {
|
||||
@Autowired
|
||||
private PermissionManager permissionManager;
|
||||
|
||||
/**
|
||||
* Authenticate request.
|
||||
*
|
||||
* @param request the request
|
||||
*/
|
||||
public void authenticateRequest(HttpServletRequest request) {
|
||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||
if (auth != null && auth.isAuthenticated()
|
||||
|
||||
@@ -28,8 +28,7 @@ import de.bstly.we.partey.model.ParteyMap;
|
||||
import de.bstly.we.partey.repository.ParteyMapRepository;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyMapManager.
|
||||
*/
|
||||
@Component
|
||||
public class ParteyMapManager {
|
||||
@@ -44,21 +43,23 @@ public class ParteyMapManager {
|
||||
private Pattern externalMapUriPattern = Pattern.compile("\\/_\\/(.+)");
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* Gets the.
|
||||
*
|
||||
* @param id the id
|
||||
* @return the partey map
|
||||
*/
|
||||
public ParteyMap get(String id) {
|
||||
return parteyMapRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param page
|
||||
* @param size
|
||||
* @param sortBy
|
||||
* @param descending
|
||||
* @return
|
||||
* Gets the.
|
||||
*
|
||||
* @param page the page
|
||||
* @param size the size
|
||||
* @param sortBy the sort by
|
||||
* @param descending the descending
|
||||
* @return the page
|
||||
*/
|
||||
public Page<ParteyMap> get(int page, int size, String sortBy, boolean descending) {
|
||||
PageRequest pageRequest = PageRequest.of(page, size,
|
||||
@@ -68,27 +69,30 @@ public class ParteyMapManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
* Save.
|
||||
*
|
||||
* @param parteyMap the partey map
|
||||
* @return the partey map
|
||||
*/
|
||||
public ParteyMap save(ParteyMap parteyMap) {
|
||||
return parteyMapRepository.save(parteyMap);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
public void delete(String id) {
|
||||
parteyMapRepository.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url
|
||||
* @param request
|
||||
* @return
|
||||
* Parses the room.
|
||||
*
|
||||
* @param url the url
|
||||
* @param request the request
|
||||
* @return the room
|
||||
*/
|
||||
public Room parseRoom(String url, HttpServletRequest request) {
|
||||
Room room = new Room();
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Interface ParteyPermissions.
|
||||
*/
|
||||
public interface ParteyPermissions {
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
package de.bstly.we.partey.businesslogic;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Interface ParteyQuotas.
|
||||
*/
|
||||
public interface ParteyQuotas {
|
||||
|
||||
|
||||
+26
-22
@@ -16,8 +16,7 @@ import de.bstly.we.partey.model.QParteyUserReport;
|
||||
import de.bstly.we.partey.repository.ParteyUserReportRepository;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyUserReportManager.
|
||||
*/
|
||||
@Component
|
||||
public class ParteyUserReportManager {
|
||||
@@ -29,12 +28,13 @@ public class ParteyUserReportManager {
|
||||
private QParteyUserReport qParteyUserReport = QParteyUserReport.parteyUserReport;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param reporter
|
||||
* @param user
|
||||
* @param comment
|
||||
* @param world
|
||||
* @return
|
||||
* Creates the.
|
||||
*
|
||||
* @param reporter the reporter
|
||||
* @param user the user
|
||||
* @param comment the comment
|
||||
* @param world the world
|
||||
* @return the partey user report
|
||||
*/
|
||||
public ParteyUserReport create(Long reporter, Long user, String comment, String world) {
|
||||
ParteyUserReport parteyUserReport = new ParteyUserReport();
|
||||
@@ -53,12 +53,13 @@ public class ParteyUserReportManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param page
|
||||
* @param size
|
||||
* @param sortBy
|
||||
* @param descending
|
||||
* @return
|
||||
* Gets the.
|
||||
*
|
||||
* @param page the page
|
||||
* @param size the size
|
||||
* @param sortBy the sort by
|
||||
* @param descending the descending
|
||||
* @return the page
|
||||
*/
|
||||
public Page<ParteyUserReport> get(int page, int size, String sortBy, boolean descending) {
|
||||
PageRequest pageRequest = PageRequest.of(page, size,
|
||||
@@ -68,32 +69,35 @@ public class ParteyUserReportManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyUserReport
|
||||
* @return
|
||||
* Save.
|
||||
*
|
||||
* @param parteyUserReport the partey user report
|
||||
* @return the partey user report
|
||||
*/
|
||||
public ParteyUserReport save(ParteyUserReport parteyUserReport) {
|
||||
return parteyUserReportRepository.save(parteyUserReport);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
public void delete(Long id) {
|
||||
parteyUserReportRepository.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Delete all.
|
||||
*/
|
||||
public void deleteAll() {
|
||||
parteyUserReportRepository.deleteAll();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param before
|
||||
* Delete all before.
|
||||
*
|
||||
* @param before the before
|
||||
*/
|
||||
public void deleteAllBefore(Instant before) {
|
||||
parteyUserReportRepository.deleteAll(
|
||||
|
||||
+18
-15
@@ -24,8 +24,7 @@ import de.bstly.we.partey.model.QParteyUserReportModerator;
|
||||
import de.bstly.we.partey.repository.ParteyUserReportModeratorRepository;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyUserReportModeratorManager.
|
||||
*/
|
||||
@Component
|
||||
public class ParteyUserReportModeratorManager {
|
||||
@@ -41,12 +40,13 @@ public class ParteyUserReportModeratorManager {
|
||||
private QParteyUserReportModerator qParteyUserReportModerator = QParteyUserReportModerator.parteyUserReportModerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param page
|
||||
* @param size
|
||||
* @param sortBy
|
||||
* @param descending
|
||||
* @return
|
||||
* Gets the.
|
||||
*
|
||||
* @param page the page
|
||||
* @param size the size
|
||||
* @param sortBy the sort by
|
||||
* @param descending the descending
|
||||
* @return the page
|
||||
*/
|
||||
public Page<ParteyUserReportModerator> get(int page, int size, String sortBy,
|
||||
boolean descending) {
|
||||
@@ -57,8 +57,9 @@ public class ParteyUserReportModeratorManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyUserReport
|
||||
* Send mail.
|
||||
*
|
||||
* @param parteyUserReport the partey user report
|
||||
*/
|
||||
public void sendMail(ParteyUserReport parteyUserReport) {
|
||||
String subject = "User in partey reported";
|
||||
@@ -91,17 +92,19 @@ public class ParteyUserReportModeratorManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyUserReportModerator
|
||||
* @return
|
||||
* Save.
|
||||
*
|
||||
* @param parteyUserReportModerator the partey user report moderator
|
||||
* @return the partey user report moderator
|
||||
*/
|
||||
public ParteyUserReportModerator save(ParteyUserReportModerator parteyUserReportModerator) {
|
||||
return parteyUserReportModeratorRepository.save(parteyUserReportModerator);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
public void delete(Long id) {
|
||||
parteyUserReportModeratorRepository.deleteById(id);
|
||||
|
||||
@@ -18,8 +18,7 @@ import de.bstly.we.partey.model.QParteyUserTag;
|
||||
import de.bstly.we.partey.repository.ParteyUserTagRepository;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyUserTagManager.
|
||||
*/
|
||||
@Component
|
||||
public class ParteyUserTagManager {
|
||||
@@ -29,12 +28,13 @@ public class ParteyUserTagManager {
|
||||
private QParteyUserTag qParteyUserTag = QParteyUserTag.parteyUserTag;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param page
|
||||
* @param size
|
||||
* @param sortBy
|
||||
* @param descending
|
||||
* @return
|
||||
* Gets the.
|
||||
*
|
||||
* @param page the page
|
||||
* @param size the size
|
||||
* @param sortBy the sort by
|
||||
* @param descending the descending
|
||||
* @return the page
|
||||
*/
|
||||
public Page<ParteyUserTag> get(int page, int size, String sortBy, boolean descending) {
|
||||
PageRequest pageRequest = PageRequest.of(page, size,
|
||||
@@ -44,9 +44,10 @@ public class ParteyUserTagManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
* Gets the for target.
|
||||
*
|
||||
* @param target the target
|
||||
* @return the for target
|
||||
*/
|
||||
public List<ParteyUserTag> getForTarget(long target) {
|
||||
return Lists
|
||||
@@ -54,25 +55,28 @@ public class ParteyUserTagManager {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyUserTag
|
||||
* @return
|
||||
* Save.
|
||||
*
|
||||
* @param parteyUserTag the partey user tag
|
||||
* @return the partey user tag
|
||||
*/
|
||||
public ParteyUserTag save(ParteyUserTag parteyUserTag) {
|
||||
return parteyUserTagRepository.save(parteyUserTag);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
public void delete(Long id) {
|
||||
parteyUserTagRepository.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param before
|
||||
* Delete all for target.
|
||||
*
|
||||
* @param target the target
|
||||
*/
|
||||
public void deleteAllForTarget(Long target) {
|
||||
parteyUserTagRepository
|
||||
|
||||
@@ -10,8 +10,7 @@ import com.google.common.collect.Lists;
|
||||
import de.bstly.we.partey.model.GameRoomPolicyTypes;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class Room.
|
||||
*/
|
||||
public class Room {
|
||||
|
||||
@@ -22,6 +21,8 @@ public class Room {
|
||||
private List<String> tags = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* Gets the url.
|
||||
*
|
||||
* @return the url
|
||||
*/
|
||||
public String getUrl() {
|
||||
@@ -29,55 +30,71 @@ public class Room {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param url the url to set
|
||||
* Sets the url.
|
||||
*
|
||||
* @param url the new url
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the mapId
|
||||
* Gets the map id.
|
||||
*
|
||||
* @return the map id
|
||||
*/
|
||||
public String getMapId() {
|
||||
return mapId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mapId the mapId to set
|
||||
* Sets the map id.
|
||||
*
|
||||
* @param mapId the new map id
|
||||
*/
|
||||
public void setMapId(String mapId) {
|
||||
this.mapId = mapId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the mapUrl
|
||||
* Gets the map url.
|
||||
*
|
||||
* @return the map url
|
||||
*/
|
||||
public String getMapUrl() {
|
||||
return mapUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mapUrl the mapUrl to set
|
||||
* Sets the map url.
|
||||
*
|
||||
* @param mapUrl the new map url
|
||||
*/
|
||||
public void setMapUrl(String mapUrl) {
|
||||
this.mapUrl = mapUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the policyType
|
||||
* Gets the policy type.
|
||||
*
|
||||
* @return the policy type
|
||||
*/
|
||||
public GameRoomPolicyTypes getPolicyType() {
|
||||
return policyType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param policyType the policyType to set
|
||||
* Sets the policy type.
|
||||
*
|
||||
* @param policyType the new policy type
|
||||
*/
|
||||
public void setPolicyType(GameRoomPolicyTypes policyType) {
|
||||
this.policyType = policyType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the tags.
|
||||
*
|
||||
* @return the tags
|
||||
*/
|
||||
public List<String> getTags() {
|
||||
@@ -85,7 +102,9 @@ public class Room {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tags the tags to set
|
||||
* Sets the tags.
|
||||
*
|
||||
* @param tags the new tags
|
||||
*/
|
||||
public void setTags(List<String> tags) {
|
||||
this.tags = tags;
|
||||
|
||||
@@ -25,9 +25,7 @@ import de.bstly.we.partey.model.GameRoomPolicyTypes;
|
||||
import de.bstly.we.partey.model.ParteyMap;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class MapManagementController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/maps")
|
||||
@@ -37,12 +35,13 @@ public class MapManagementController extends BaseController {
|
||||
private ParteyMapManager parteyMapManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pageParameter
|
||||
* @param sizeParameter
|
||||
* @param sortParameter
|
||||
* @param descParameter
|
||||
* @return
|
||||
* Gets the partey maps.
|
||||
*
|
||||
* @param pageParameter the page parameter
|
||||
* @param sizeParameter the size parameter
|
||||
* @param sortParameter the sort parameter
|
||||
* @param descParameter the desc parameter
|
||||
* @return the partey maps
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping
|
||||
@@ -59,9 +58,10 @@ public class MapManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyMap
|
||||
* @return
|
||||
* Creates the or update partey map.
|
||||
*
|
||||
* @param parteyMap the partey map
|
||||
* @return the partey map
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@PostMapping
|
||||
@@ -78,8 +78,9 @@ public class MapManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete partey map.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
|
||||
+18
-16
@@ -23,9 +23,7 @@ import de.bstly.we.partey.businesslogic.ParteyUserReportManager;
|
||||
import de.bstly.we.partey.model.ParteyUserReport;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class UserReportManagementController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/reports")
|
||||
@@ -35,12 +33,13 @@ public class UserReportManagementController extends BaseController {
|
||||
private ParteyUserReportManager parteyUserReportManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pageParameter
|
||||
* @param sizeParameter
|
||||
* @param sortParameter
|
||||
* @param descParameter
|
||||
* @return
|
||||
* Gets the partey user reports.
|
||||
*
|
||||
* @param pageParameter the page parameter
|
||||
* @param sizeParameter the size parameter
|
||||
* @param sortParameter the sort parameter
|
||||
* @param descParameter the desc parameter
|
||||
* @return the partey user reports
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping
|
||||
@@ -58,9 +57,10 @@ public class UserReportManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyUserReport
|
||||
* @return
|
||||
* Creates the or update partey user report.
|
||||
*
|
||||
* @param parteyUserReport the partey user report
|
||||
* @return the partey user report
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@PostMapping
|
||||
@@ -70,8 +70,9 @@ public class UserReportManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete partey user report.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
@@ -80,8 +81,9 @@ public class UserReportManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param beforeParameter
|
||||
* Delete all partey user report.
|
||||
*
|
||||
* @param beforeParameter the before parameter
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping()
|
||||
|
||||
+15
-14
@@ -22,9 +22,7 @@ import de.bstly.we.partey.businesslogic.ParteyUserReportModeratorManager;
|
||||
import de.bstly.we.partey.model.ParteyUserReportModerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class UserReportModeratorManagementController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/reports/moderators")
|
||||
@@ -34,12 +32,13 @@ public class UserReportModeratorManagementController extends BaseController {
|
||||
private ParteyUserReportModeratorManager parteyUserReportModeratorManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pageParameter
|
||||
* @param sizeParameter
|
||||
* @param sortParameter
|
||||
* @param descParameter
|
||||
* @return
|
||||
* Gets the partey user report moderators.
|
||||
*
|
||||
* @param pageParameter the page parameter
|
||||
* @param sizeParameter the size parameter
|
||||
* @param sortParameter the sort parameter
|
||||
* @param descParameter the desc parameter
|
||||
* @return the partey user report moderators
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping
|
||||
@@ -58,9 +57,10 @@ public class UserReportModeratorManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyUserReport
|
||||
* @return
|
||||
* Creates the or update partey user report moderator.
|
||||
*
|
||||
* @param parteyUserReportModerator the partey user report moderator
|
||||
* @return the partey user report moderator
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@PostMapping
|
||||
@@ -70,8 +70,9 @@ public class UserReportModeratorManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete partey user report moderator.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
|
||||
@@ -16,9 +16,7 @@ import de.bstly.we.partey.businesslogic.ParteyUserTagManager;
|
||||
import de.bstly.we.partey.model.ParteyUserTag;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class UserTagController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/tags")
|
||||
@@ -28,9 +26,9 @@ public class UserTagController extends BaseController {
|
||||
private ParteyUserTagManager parteyUserTagManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
* Gets the partey user tags for target.
|
||||
*
|
||||
* @return the partey user tags for target
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping
|
||||
|
||||
+19
-17
@@ -27,9 +27,7 @@ import de.bstly.we.partey.businesslogic.ParteyUserTagManager;
|
||||
import de.bstly.we.partey.model.ParteyUserTag;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class UserTagManagementController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/tags/manage")
|
||||
@@ -41,12 +39,13 @@ public class UserTagManagementController extends BaseController {
|
||||
private UserManager userManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pageParameter
|
||||
* @param sizeParameter
|
||||
* @param sortParameter
|
||||
* @param descParameter
|
||||
* @return
|
||||
* Gets the partey user tags.
|
||||
*
|
||||
* @param pageParameter the page parameter
|
||||
* @param sizeParameter the size parameter
|
||||
* @param sortParameter the sort parameter
|
||||
* @param descParameter the desc parameter
|
||||
* @return the partey user tags
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping
|
||||
@@ -63,9 +62,10 @@ public class UserTagManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
* Gets the partey user tags for target.
|
||||
*
|
||||
* @param username the username
|
||||
* @return the partey user tags for target
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping("{username}")
|
||||
@@ -81,9 +81,10 @@ public class UserTagManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parteyUserReport
|
||||
* @return
|
||||
* Creates the or update partey user tag.
|
||||
*
|
||||
* @param parteyUserTag the partey user tag
|
||||
* @return the partey user tag
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@PostMapping
|
||||
@@ -92,8 +93,9 @@ public class UserTagManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete partey user tag.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
|
||||
@@ -6,9 +6,7 @@ package de.bstly.we.partey.model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Enum GameRoomPolicyTypes.
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.NUMBER)
|
||||
public enum GameRoomPolicyTypes {
|
||||
|
||||
@@ -19,8 +19,7 @@ import org.hibernate.annotations.LazyCollectionOption;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyMap.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "partey_maps")
|
||||
@@ -36,6 +35,8 @@ public class ParteyMap {
|
||||
private List<String> tags = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
@@ -43,27 +44,35 @@ public class ParteyMap {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the policyType
|
||||
* Gets the policy type.
|
||||
*
|
||||
* @return the policy type
|
||||
*/
|
||||
public GameRoomPolicyTypes getPolicyType() {
|
||||
return policyType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param policyType the policyType to set
|
||||
* Sets the policy type.
|
||||
*
|
||||
* @param policyType the new policy type
|
||||
*/
|
||||
public void setPolicyType(GameRoomPolicyTypes policyType) {
|
||||
this.policyType = policyType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the tags.
|
||||
*
|
||||
* @return the tags
|
||||
*/
|
||||
public List<String> getTags() {
|
||||
@@ -71,7 +80,9 @@ public class ParteyMap {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tags the tags to set
|
||||
* Sets the tags.
|
||||
*
|
||||
* @param tags the new tags
|
||||
*/
|
||||
public void setTags(List<String> tags) {
|
||||
this.tags = tags;
|
||||
|
||||
@@ -13,8 +13,7 @@ import javax.persistence.Id;
|
||||
import javax.persistence.Lob;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyUserReport.
|
||||
*/
|
||||
@Entity
|
||||
public class ParteyUserReport {
|
||||
@@ -31,6 +30,8 @@ public class ParteyUserReport {
|
||||
private Instant created;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public Long getId() {
|
||||
@@ -38,13 +39,17 @@ public class ParteyUserReport {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the reporter.
|
||||
*
|
||||
* @return the reporter
|
||||
*/
|
||||
public Long getReporter() {
|
||||
@@ -52,13 +57,17 @@ public class ParteyUserReport {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reporter the reporter to set
|
||||
* Sets the reporter.
|
||||
*
|
||||
* @param reporter the new reporter
|
||||
*/
|
||||
public void setReporter(Long reporter) {
|
||||
this.reporter = reporter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user.
|
||||
*
|
||||
* @return the user
|
||||
*/
|
||||
public Long getUser() {
|
||||
@@ -66,13 +75,17 @@ public class ParteyUserReport {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param user the user to set
|
||||
* Sets the user.
|
||||
*
|
||||
* @param user the new user
|
||||
*/
|
||||
public void setUser(Long user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the comment.
|
||||
*
|
||||
* @return the comment
|
||||
*/
|
||||
public String getComment() {
|
||||
@@ -80,13 +93,17 @@ public class ParteyUserReport {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param comment the comment to set
|
||||
* Sets the comment.
|
||||
*
|
||||
* @param comment the new comment
|
||||
*/
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the world.
|
||||
*
|
||||
* @return the world
|
||||
*/
|
||||
public String getWorld() {
|
||||
@@ -94,13 +111,17 @@ public class ParteyUserReport {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param world the world to set
|
||||
* Sets the world.
|
||||
*
|
||||
* @param world the new world
|
||||
*/
|
||||
public void setWorld(String world) {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the created.
|
||||
*
|
||||
* @return the created
|
||||
*/
|
||||
public Instant getCreated() {
|
||||
@@ -108,7 +129,9 @@ public class ParteyUserReport {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param created the created to set
|
||||
* Sets the created.
|
||||
*
|
||||
* @param created the new created
|
||||
*/
|
||||
public void setCreated(Instant created) {
|
||||
this.created = created;
|
||||
|
||||
@@ -10,8 +10,7 @@ import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyUserReportModerator.
|
||||
*/
|
||||
@Entity
|
||||
public class ParteyUserReportModerator {
|
||||
@@ -25,6 +24,8 @@ public class ParteyUserReportModerator {
|
||||
private boolean disabled;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public Long getId() {
|
||||
@@ -32,13 +33,17 @@ public class ParteyUserReportModerator {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the email.
|
||||
*
|
||||
* @return the email
|
||||
*/
|
||||
public String getEmail() {
|
||||
@@ -46,21 +51,27 @@ public class ParteyUserReportModerator {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param email the email to set
|
||||
* Sets the email.
|
||||
*
|
||||
* @param email the new email
|
||||
*/
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the disabled
|
||||
* Checks if is disabled.
|
||||
*
|
||||
* @return true, if is disabled
|
||||
*/
|
||||
public boolean isDisabled() {
|
||||
return disabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param disabled the disabled to set
|
||||
* Sets the disabled.
|
||||
*
|
||||
* @param disabled the new disabled
|
||||
*/
|
||||
public void setDisabled(boolean disabled) {
|
||||
this.disabled = disabled;
|
||||
|
||||
@@ -10,8 +10,7 @@ import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class ParteyUserTag.
|
||||
*/
|
||||
@Entity
|
||||
public class ParteyUserTag {
|
||||
@@ -24,6 +23,8 @@ public class ParteyUserTag {
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public Long getId() {
|
||||
@@ -31,13 +32,17 @@ public class ParteyUserTag {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the target.
|
||||
*
|
||||
* @return the target
|
||||
*/
|
||||
public Long getTarget() {
|
||||
@@ -45,13 +50,17 @@ public class ParteyUserTag {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param target the target to set
|
||||
* Sets the target.
|
||||
*
|
||||
* @param target the new target
|
||||
*/
|
||||
public void setTarget(Long target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the tag.
|
||||
*
|
||||
* @return the tag
|
||||
*/
|
||||
public String getTag() {
|
||||
@@ -59,7 +68,9 @@ public class ParteyUserTag {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tag the tag to set
|
||||
* Sets the tag.
|
||||
*
|
||||
* @param tag the new tag
|
||||
*/
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
|
||||
@@ -10,9 +10,7 @@ import org.springframework.stereotype.Repository;
|
||||
import de.bstly.we.partey.model.ParteyMap;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Interface ParteyMapRepository.
|
||||
*/
|
||||
@Repository
|
||||
public interface ParteyMapRepository
|
||||
|
||||
+1
-3
@@ -10,9 +10,7 @@ import org.springframework.stereotype.Repository;
|
||||
import de.bstly.we.partey.model.ParteyUserReportModerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Interface ParteyUserReportModeratorRepository.
|
||||
*/
|
||||
@Repository
|
||||
public interface ParteyUserReportModeratorRepository
|
||||
|
||||
@@ -10,9 +10,7 @@ import org.springframework.stereotype.Repository;
|
||||
import de.bstly.we.partey.model.ParteyUserReport;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Interface ParteyUserReportRepository.
|
||||
*/
|
||||
@Repository
|
||||
public interface ParteyUserReportRepository
|
||||
|
||||
@@ -10,9 +10,7 @@ import org.springframework.stereotype.Repository;
|
||||
import de.bstly.we.partey.model.ParteyUserTag;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Interface ParteyUserTagRepository.
|
||||
*/
|
||||
@Repository
|
||||
public interface ParteyUserTagRepository
|
||||
|
||||
+37
-28
@@ -27,8 +27,7 @@ import de.bstly.we.partey.timeslot.model.TimeslotType;
|
||||
import de.bstly.we.partey.timeslot.repository.TimeslotRepository;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class TimeslotManager.
|
||||
*/
|
||||
@Component
|
||||
public class TimeslotManager implements UserDataProvider {
|
||||
@@ -43,35 +42,39 @@ public class TimeslotManager implements UserDataProvider {
|
||||
private QTimeslot qTimeslot = QTimeslot.timeslot;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* Gets the.
|
||||
*
|
||||
* @param id the id
|
||||
* @return the timeslot
|
||||
*/
|
||||
public Timeslot get(Long id) {
|
||||
return timeslotRepository.findById(id).orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param owner
|
||||
* @return
|
||||
* Gets the all by owner.
|
||||
*
|
||||
* @param owner the owner
|
||||
* @return the all by owner
|
||||
*/
|
||||
public List<Timeslot> getAllByOwner(Long owner) {
|
||||
return Lists.newArrayList(timeslotRepository.findAll(qTimeslot.owner.eq(owner)));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param owner
|
||||
* @param after
|
||||
* @param type
|
||||
* @param visibility
|
||||
* @param search
|
||||
* @param page
|
||||
* @param size
|
||||
* @param sortBy
|
||||
* @param descending
|
||||
* @return
|
||||
* Gets the.
|
||||
*
|
||||
* @param owner the owner
|
||||
* @param invertOwner the invert owner
|
||||
* @param after the after
|
||||
* @param type the type
|
||||
* @param visibility the visibility
|
||||
* @param search the search
|
||||
* @param page the page
|
||||
* @param size the size
|
||||
* @param sortBy the sort by
|
||||
* @param descending the descending
|
||||
* @return the page
|
||||
*/
|
||||
public Page<Timeslot> get(Long owner, boolean invertOwner, Instant after, TimeslotType type,
|
||||
Visibility visibility, String search, int page, int size, String sortBy,
|
||||
@@ -115,9 +118,10 @@ public class TimeslotManager implements UserDataProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param owner
|
||||
* @return
|
||||
* Quota.
|
||||
*
|
||||
* @param owner the owner
|
||||
* @return the long
|
||||
*/
|
||||
public long quota(Long owner) {
|
||||
return timeslotRepository.count(qTimeslot.owner.eq(owner).and(
|
||||
@@ -125,9 +129,10 @@ public class TimeslotManager implements UserDataProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param timeslot
|
||||
* @return
|
||||
* Save.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @return the timeslot
|
||||
*/
|
||||
public Timeslot save(Timeslot timeslot) {
|
||||
Assert.isTrue(timeslot.getStarts().isBefore(timeslot.getEnds()),
|
||||
@@ -136,13 +141,15 @@ public class TimeslotManager implements UserDataProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
public void delete(Long id) {
|
||||
timeslotRepository.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @see de.bstly.we.businesslogic.UserDataProvider#getId()
|
||||
*/
|
||||
@@ -151,6 +158,7 @@ public class TimeslotManager implements UserDataProvider {
|
||||
return "partey-timeslots";
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @see de.bstly.we.businesslogic.UserDataProvider#getUserData(java.lang.Long)
|
||||
*/
|
||||
@@ -163,6 +171,7 @@ public class TimeslotManager implements UserDataProvider {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @see de.bstly.we.businesslogic.UserDataProvider#purgeUserData(java.lang.Long)
|
||||
*/
|
||||
@@ -174,7 +183,7 @@ public class TimeslotManager implements UserDataProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Clear ended timeslots.
|
||||
*/
|
||||
@Scheduled(cron = "0 */5 * * * *")
|
||||
protected void clearEndedTimeslots() {
|
||||
|
||||
+27
-24
@@ -37,8 +37,7 @@ import de.bstly.we.partey.timeslot.model.Timeslot;
|
||||
import de.bstly.we.partey.timeslot.model.TimeslotType;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class TimeslotController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/timeslots")
|
||||
@@ -56,17 +55,18 @@ public class TimeslotController extends BaseController {
|
||||
private UserManager userManager;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pageParameter
|
||||
* @param sizeParameter
|
||||
* @param sortParameter
|
||||
* @param descParameter
|
||||
* @param ownerParameter
|
||||
* @param afterParameter
|
||||
* @param typeParameter
|
||||
* @param visibilityParameter
|
||||
* @param searchParameter
|
||||
* @return
|
||||
* Gets the timeslots.
|
||||
*
|
||||
* @param pageParameter the page parameter
|
||||
* @param sizeParameter the size parameter
|
||||
* @param sortParameter the sort parameter
|
||||
* @param descParameter the desc parameter
|
||||
* @param ownerParameter the owner parameter
|
||||
* @param afterParameter the after parameter
|
||||
* @param typeParameter the type parameter
|
||||
* @param visibilityParameter the visibility parameter
|
||||
* @param searchParameter the search parameter
|
||||
* @return the timeslots
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping
|
||||
@@ -122,9 +122,9 @@ public class TimeslotController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param timeslot
|
||||
* @return
|
||||
* Quota.
|
||||
*
|
||||
* @return the long
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@GetMapping("/quota")
|
||||
@@ -135,9 +135,10 @@ public class TimeslotController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param timeslot
|
||||
* @return
|
||||
* Creates the timeslot.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @return the timeslot
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@PostMapping
|
||||
@@ -169,9 +170,10 @@ public class TimeslotController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param timeslot
|
||||
* @return
|
||||
* Update timeslot.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @return the timeslot
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@PatchMapping
|
||||
@@ -216,8 +218,9 @@ public class TimeslotController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete timeslot.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
@PreAuthorize("isAuthenticated()")
|
||||
@DeleteMapping("{id}")
|
||||
|
||||
+21
-17
@@ -30,8 +30,7 @@ import de.bstly.we.partey.timeslot.model.Timeslot;
|
||||
import de.bstly.we.partey.timeslot.model.TimeslotType;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class TimeslotManagementController.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/partey/timeslots/manage")
|
||||
@@ -43,16 +42,19 @@ public class TimeslotManagementController extends BaseController {
|
||||
private TimeslotValidator timeslotValidator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pageParameter
|
||||
* @param sizeParameter
|
||||
* @param sortParameter
|
||||
* @param descParameter
|
||||
* @param afterParameter
|
||||
* @param typeParameter
|
||||
* @param visibilityParameter
|
||||
* @param searchParameter
|
||||
* @return
|
||||
* Gets the timeslots.
|
||||
*
|
||||
* @param pageParameter the page parameter
|
||||
* @param sizeParameter the size parameter
|
||||
* @param sortParameter the sort parameter
|
||||
* @param descParameter the desc parameter
|
||||
* @param ownerParameter the owner parameter
|
||||
* @param invertOwnerParameter the invert owner parameter
|
||||
* @param afterParameter the after parameter
|
||||
* @param typeParameter the type parameter
|
||||
* @param visibilityParameter the visibility parameter
|
||||
* @param searchParameter the search parameter
|
||||
* @return the timeslots
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@GetMapping
|
||||
@@ -79,9 +81,10 @@ public class TimeslotManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param timeslot
|
||||
* @return
|
||||
* Creates the or update timeslot.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @return the timeslot
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@PostMapping
|
||||
@@ -100,8 +103,9 @@ public class TimeslotManagementController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
* Delete timeslot.
|
||||
*
|
||||
* @param id the id
|
||||
*/
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@DeleteMapping("{id}")
|
||||
|
||||
+20
-14
@@ -21,8 +21,7 @@ import de.bstly.we.partey.timeslot.model.Timeslot;
|
||||
import de.bstly.we.partey.timeslot.repository.TimeslotRepository;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class TimeslotValidator.
|
||||
*/
|
||||
@Component
|
||||
public class TimeslotValidator implements Validator {
|
||||
@@ -35,6 +34,7 @@ public class TimeslotValidator implements Validator {
|
||||
private SystemPropertyManager systemPropertyManager;
|
||||
private QTimeslot qTimeslot = QTimeslot.timeslot;
|
||||
|
||||
|
||||
/*
|
||||
* @see org.springframework.validation.Validator#supports(java.lang.Class)
|
||||
*/
|
||||
@@ -43,9 +43,9 @@ public class TimeslotValidator implements Validator {
|
||||
return clazz.isAssignableFrom(Timeslot.class);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @see org.springframework.validation.Validator#validate(java.lang.Object,
|
||||
* org.springframework.validation.Errors)
|
||||
* @see org.springframework.validation.Validator#validate(java.lang.Object, org.springframework.validation.Errors)
|
||||
*/
|
||||
@Override
|
||||
public void validate(Object target, Errors errors) {
|
||||
@@ -56,8 +56,10 @@ public class TimeslotValidator implements Validator {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param timeslot
|
||||
* @param errors
|
||||
* Validate time.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @param errors the errors
|
||||
*/
|
||||
public void validateTime(Timeslot timeslot, Errors errors) {
|
||||
if (timeslot.getStarts() == null) {
|
||||
@@ -113,8 +115,10 @@ public class TimeslotValidator implements Validator {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param timeslot
|
||||
* @param errors
|
||||
* Validate type.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @param errors the errors
|
||||
*/
|
||||
public void validateType(Timeslot timeslot, Errors errors) {
|
||||
if (timeslot.getId() != null && timeslotRepository.existsById(timeslot.getId())) {
|
||||
@@ -134,9 +138,10 @@ public class TimeslotValidator implements Validator {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param timeslot
|
||||
* @param errors
|
||||
* Validate type audio.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @param errors the errors
|
||||
*/
|
||||
public void validateTypeAudio(Timeslot timeslot, Errors errors) {
|
||||
timeslot.setStream(null);
|
||||
@@ -151,9 +156,10 @@ public class TimeslotValidator implements Validator {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param timeslot
|
||||
* @param errors
|
||||
* Validate type video.
|
||||
*
|
||||
* @param timeslot the timeslot
|
||||
* @param errors the errors
|
||||
*/
|
||||
public void validateTypeVideo(Timeslot timeslot, Errors errors) {
|
||||
timeslot.setSecret(null);
|
||||
|
||||
@@ -20,8 +20,7 @@ import de.bstly.we.model.UserData;
|
||||
import de.bstly.we.model.Visibility;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Class Timeslot.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "timeslots")
|
||||
@@ -57,6 +56,8 @@ public class Timeslot implements UserData {
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* Gets the id.
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public Long getId() {
|
||||
@@ -64,13 +65,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
* Sets the id.
|
||||
*
|
||||
* @param id the new id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the owner.
|
||||
*
|
||||
* @return the owner
|
||||
*/
|
||||
public Long getOwner() {
|
||||
@@ -78,13 +83,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param owner the owner to set
|
||||
* Sets the owner.
|
||||
*
|
||||
* @param owner the new owner
|
||||
*/
|
||||
public void setOwner(Long owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the type.
|
||||
*
|
||||
* @return the type
|
||||
*/
|
||||
public TimeslotType getType() {
|
||||
@@ -92,13 +101,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type the type to set
|
||||
* Sets the type.
|
||||
*
|
||||
* @param type the new type
|
||||
*/
|
||||
public void setType(TimeslotType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the starts.
|
||||
*
|
||||
* @return the starts
|
||||
*/
|
||||
public Instant getStarts() {
|
||||
@@ -106,13 +119,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param starts the starts to set
|
||||
* Sets the starts.
|
||||
*
|
||||
* @param starts the new starts
|
||||
*/
|
||||
public void setStarts(Instant starts) {
|
||||
this.starts = starts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ends.
|
||||
*
|
||||
* @return the ends
|
||||
*/
|
||||
public Instant getEnds() {
|
||||
@@ -120,13 +137,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ends the ends to set
|
||||
* Sets the ends.
|
||||
*
|
||||
* @param ends the new ends
|
||||
*/
|
||||
public void setEnds(Instant ends) {
|
||||
this.ends = ends;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the visibility.
|
||||
*
|
||||
* @return the visibility
|
||||
*/
|
||||
public Visibility getVisibility() {
|
||||
@@ -134,13 +155,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param visibility the visibility to set
|
||||
* Sets the visibility.
|
||||
*
|
||||
* @param visibility the new visibility
|
||||
*/
|
||||
public void setVisibility(Visibility visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the title.
|
||||
*
|
||||
* @return the title
|
||||
*/
|
||||
public String getTitle() {
|
||||
@@ -148,13 +173,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param title the title to set
|
||||
* Sets the title.
|
||||
*
|
||||
* @param title the new title
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the description.
|
||||
*
|
||||
* @return the description
|
||||
*/
|
||||
public String getDescription() {
|
||||
@@ -162,13 +191,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param description the description to set
|
||||
* Sets the description.
|
||||
*
|
||||
* @param description the new description
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the stream.
|
||||
*
|
||||
* @return the stream
|
||||
*/
|
||||
public String getStream() {
|
||||
@@ -176,13 +209,17 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stream the stream to set
|
||||
* Sets the stream.
|
||||
*
|
||||
* @param stream the new stream
|
||||
*/
|
||||
public void setStream(String stream) {
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the secret.
|
||||
*
|
||||
* @return the secret
|
||||
*/
|
||||
public String getSecret() {
|
||||
@@ -190,27 +227,35 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param secret the secret to set
|
||||
* Sets the secret.
|
||||
*
|
||||
* @param secret the new secret
|
||||
*/
|
||||
public void setSecret(String secret) {
|
||||
this.secret = secret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the clearAfter
|
||||
* Checks if is clear after.
|
||||
*
|
||||
* @return true, if is clear after
|
||||
*/
|
||||
public boolean isClearAfter() {
|
||||
return clearAfter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param clearAfter the clearAfter to set
|
||||
* Sets the clear after.
|
||||
*
|
||||
* @param clearAfter the new clear after
|
||||
*/
|
||||
public void setClearAfter(boolean clearAfter) {
|
||||
this.clearAfter = clearAfter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the username.
|
||||
*
|
||||
* @return the username
|
||||
*/
|
||||
public String getUsername() {
|
||||
@@ -218,7 +263,9 @@ public class Timeslot implements UserData {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param username the username to set
|
||||
* Sets the username.
|
||||
*
|
||||
* @param username the new username
|
||||
*/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
package de.bstly.we.partey.timeslot.model;
|
||||
|
||||
/**
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Enum TimeslotType.
|
||||
*/
|
||||
public enum TimeslotType {
|
||||
VIDEO, AUDIO
|
||||
|
||||
@@ -10,9 +10,7 @@ import org.springframework.stereotype.Repository;
|
||||
import de.bstly.we.partey.timeslot.model.Timeslot;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author _bastler@bstly.de
|
||||
*
|
||||
* The Interface TimeslotRepository.
|
||||
*/
|
||||
@Repository
|
||||
public interface TimeslotRepository
|
||||
|
||||
Reference in New Issue
Block a user