-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#164 페북 로그인 사용자의 경우 페북에 바로 댓글 달 수 있도록 한다.
서버측과 간단한 클라이언트 측 작업 완료함.
- Loading branch information
Showing
12 changed files
with
196 additions
and
135 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package net.slipp.domain.qna; | ||
|
||
import java.io.Serializable; | ||
|
||
public class TemporaryAnswer implements Serializable { | ||
private static final long serialVersionUID = -4198138126883127272L; | ||
|
||
public static final String TEMPORARY_ANSWER_KEY = "temporaryAnswer"; | ||
public static final TemporaryAnswer EMPTY_ANSWER = new EmptyTemporaryAnswer(); | ||
|
||
private Long questionId; | ||
private String temporaryAnswer; | ||
|
||
public TemporaryAnswer() { | ||
} | ||
|
||
public TemporaryAnswer(Long questionId, String temporaryAnswer) { | ||
this.questionId = questionId; | ||
this.temporaryAnswer = temporaryAnswer; | ||
} | ||
|
||
public Long getQuestionId() { | ||
return questionId; | ||
} | ||
|
||
public String getTemporaryAnswer() { | ||
return temporaryAnswer; | ||
} | ||
|
||
public Answer createAnswer() { | ||
return new Answer(this.temporaryAnswer); | ||
} | ||
|
||
public String generateUrl() { | ||
return String.format("/questions/%d", this.questionId); | ||
} | ||
|
||
static class EmptyTemporaryAnswer extends TemporaryAnswer { | ||
private static final long serialVersionUID = 1380330064986704887L; | ||
|
||
public Answer createAnswer() { | ||
return new Answer(); | ||
} | ||
|
||
public String generateUrl() { | ||
return "/"; | ||
} | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "TemporaryAnswer [questionId=" + questionId + ", temporaryAnswer=" + temporaryAnswer + "]"; | ||
} | ||
} |
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
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
Oops, something went wrong.