@Component public class CopyManagerImpl extends java.lang.Object implements CopyManager
| Constructor and Description |
|---|
CopyManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
createAssistmentOwnership(int astId,
int contentCreatorId)
Add a row in assistment ownership for the ownership of astId by contentCreatorId
|
int |
createProblemSectionByAstId(int sequenceId,
int astId)
Add a row in section for the lowest level section, which is problem section
as well as the assistments_to_sequence_association table
|
int |
createSectionByChildSections(int sequenceId,
java.util.List<java.lang.Integer> childSectionIdList,
java.lang.String type,
java.lang.String parameters)
Add a row in section for the parent section of a list of child sections.
|
int |
createSectionByChildSections(int sequenceId,
java.util.List<java.lang.Integer> childSectionIdList,
java.lang.String type,
java.lang.String parameters,
java.lang.String sectionName)
Add a row in section for the parent section of a list of child sections.
|
int |
createSequenceInfo(int oldSequenceId,
int newSequenceId)
Add a row in sequence info for the newly created sequence
|
int |
createSequenceOwnership(int contentCreatorId,
int sequenceId)
Add a row in sequence ownership for the ownership of sequenceId by contentCreatorId
|
int |
createTutorStrategy(int problemId,
java.lang.String type)
Add a row in tutor strategy for the newly created tutor strategy
|
int |
createUserGeneratedHint(int newProblemId,
int newSequenceId,
int contentCreatorId,
java.lang.String hint,
boolean hasAnswer,
boolean isGeneric)
Add a row in user generated hint after the customization for future learning and tracking...
|
int |
createVideoHint(int tutor_strategy_id,
java.lang.String videoHint)
Add a row in hint for a video hint
|
java.util.List<java.lang.Integer> |
deepCopyAnswers(java.util.List<AnswerRow> answerList,
int newProblemId)
Copy all the existing answers for the new problem and insert them into database
|
int |
deepCopyAssistment(Assistment ast)
Copy the chosen assistment for the assistment with video hint
|
int |
deepCopyAssistmentInfo(AssistmentInfo astInfo,
int toAstId)
Copy the existing assistment info for the new assistment and insert a row into database
|
java.util.List<java.lang.Integer> |
deepCopyHintsWithVideoHint(java.util.List<HintRow> hintList,
int newStrategyId,
java.lang.String videoHintStr)
Copy all the existing hints for the new tutor strategy and insert them into database
The videoHintStr is the video hint embed code for mobile server.
|
int |
deepCopyProblem(ProblemRow problem,
int newAstId,
int scaffoldId)
Copy the existing problem for the new assistment and insert a row into database
|
int |
deepCopyScaffold(Scaffold scaffold,
int newStrategyId)
Copy the existing scaffold for new tutor strategy and insert a row into database
|
int |
deepCopySequence(Sequence sequence)
Copy the existing sequence.
|
int |
deepCopySequence(Sequence sequence,
java.lang.String parameters)
Copy the existing sequence with customized parameter
|
int |
deepCopySequence(Sequence sequence,
java.lang.String sequenceName,
java.lang.String sequenceDescription,
java.lang.String parameters)
Copy the existing sequence with customized parameter
|
int |
deepCopyTutorStrategy(TutorStrategy tutorStrategy,
int newProblemId)
Copy the existing tutor strategy for new problem and insert a row into database
|
public int deepCopyAssistment(Assistment ast)
CopyManagerdeepCopyAssistment in interface CopyManagerast - the original assistmentpublic int deepCopyProblem(ProblemRow problem, int newAstId, int scaffoldId)
CopyManagerdeepCopyProblem in interface CopyManagerproblem - the existing problemnewAstId - the id of the new assistmentscaffoldId - the scaffold if of the new problem. If there is no scaffold, pass in 0 as scaffoldId herepublic int createAssistmentOwnership(int astId,
int contentCreatorId)
CopyManagercreateAssistmentOwnership in interface CopyManagerastId - the assistment idcontentCreatorId - the content creator id of a userpublic int deepCopyAssistmentInfo(AssistmentInfo astInfo, int toAstId)
CopyManagerdeepCopyAssistmentInfo in interface CopyManagerastInfo - the existing assistment infotoAstId - the id of the new assistmentpublic java.util.List<java.lang.Integer> deepCopyAnswers(java.util.List<AnswerRow> answerList, int newProblemId)
CopyManagerdeepCopyAnswers in interface CopyManageranswerList - the existing answer listnewProblemId - the id of the new problempublic java.util.List<java.lang.Integer> deepCopyHintsWithVideoHint(java.util.List<HintRow> hintList, int newStrategyId, java.lang.String videoHintStr)
CopyManagerdeepCopyHintsWithVideoHint in interface CopyManagerhintList - the existing hint listnewStrategyId - the id of the new tutor strategyvideoHintStr - the string form hintpublic int deepCopyScaffold(Scaffold scaffold, int newStrategyId)
CopyManagerdeepCopyScaffold in interface CopyManagerscaffold - the existing scaffoldnewStrategyId - the id of the new tutor strategypublic int createTutorStrategy(int problemId,
java.lang.String type)
CopyManagercreateTutorStrategy in interface CopyManagerproblemId - the problem that needs tutor strategytype - the content type of the tutor strategy. Can be either Hint or Scaffoldpublic int createVideoHint(int tutor_strategy_id,
java.lang.String videoHint)
CopyManagercreateVideoHint in interface CopyManagertutor_strategy_id - the tutor strategy id of that the hint comes fromvideoHint - the string form embeded video codepublic int deepCopyTutorStrategy(TutorStrategy tutorStrategy, int newProblemId)
CopyManagerdeepCopyTutorStrategy in interface CopyManagertutorStrategy - the existing tutor strategynewProblemId - the id of the new problempublic int createSequenceInfo(int oldSequenceId,
int newSequenceId)
CopyManagercreateSequenceInfo in interface CopyManageroldSequenceId - the id of the original sequencenewSequenceId - the id of the new sequencepublic int deepCopySequence(Sequence sequence)
CopyManagerdeepCopySequence in interface CopyManagersequence - the original sequencepublic int deepCopySequence(Sequence sequence, java.lang.String parameters)
CopyManagerdeepCopySequence in interface CopyManagersequence - the original sequencepublic int deepCopySequence(Sequence sequence, java.lang.String sequenceName, java.lang.String sequenceDescription, java.lang.String parameters)
CopyManagerdeepCopySequence in interface CopyManagersequence - the original sequencesequenceName - the name of the new sequencesequenceDescription - the description of the new sequencepublic int createSequenceOwnership(int contentCreatorId,
int sequenceId)
CopyManagercreateSequenceOwnership in interface CopyManagercontentCreatorId - the owner id of the sequencesequenceId - the new sequence id that is seeking its owner :)public int createProblemSectionByAstId(int sequenceId,
int astId)
CopyManagercreateProblemSectionByAstId in interface CopyManagersequenceId - the sequence id that problem section belongs toastId - the sequencepublic int createSectionByChildSections(int sequenceId,
java.util.List<java.lang.Integer> childSectionIdList,
java.lang.String type,
java.lang.String parameters)
CopyManagercreateSectionByChildSections in interface CopyManagersequenceId - the sequence id that the section belongs tochildSectionIdList - the list of child sectiontype - the type of the parent section (Mastery, Linear, Random ... )parameters - the parameters of the section (new line should be \n in th string)public int createSectionByChildSections(int sequenceId,
java.util.List<java.lang.Integer> childSectionIdList,
java.lang.String type,
java.lang.String parameters,
java.lang.String sectionName)
CopyManagercreateSectionByChildSections in interface CopyManagersequenceId - the sequence id that the section belongs tochildSectionIdList - the list of child sectiontype - the type of the parent section (Mastery, Linear, Random ... )parameters - the parameters of the section (new line should be \n in th string)sectionName - the name of the section to be createdpublic int createUserGeneratedHint(int newProblemId,
int newSequenceId,
int contentCreatorId,
java.lang.String hint,
boolean hasAnswer,
boolean isGeneric)
CopyManagercreateUserGeneratedHint in interface CopyManagernewProblemId - the new problem id that is chosen to be customizednewSequenceId - the if of the newly create sequencecontentCreatorId - the content creator id for tracking who customized this sequencehint - the URL of the video hinthasAnswer - answer of the question for creator: Does this hint give the final answerisGeneric - answer of the question for creator: Can we use this hint on similar questions?