Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
stardat
stardat-ddieditor
Commits
65a1b889
Commit
65a1b889
authored
Nov 09, 2020
by
Alexander Mühlbauer
Browse files
Java -> Replace DDIElement.ddiStore usage (
#407
)
parent
73a45ce1
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gesis/stardat/helper/EntityRevisionResolver.java
View file @
65a1b889
...
...
@@ -25,7 +25,7 @@ public class EntityRevisionResolver
switch
(
element
.
getType
())
{
case
DDIElement
.
QUESTIONCONSTRUCT
:
QuestionConstruct
currentConstruct
=
(
QuestionConstruct
)
element
;
Page
<
RevisionInformation
>
page
=
restClient
.
getElementRevisionsOfLastDays
(
element
.
d
diStore
.
getPrimaryKey
(),
Page
<
RevisionInformation
>
page
=
restClient
.
getElementRevisionsOfLastDays
(
element
.
getD
diStore
()
.
getPrimaryKey
(),
100
,
0
,
50
);
List
<
RevisionInformation
>
revisions
=
page
.
getItems
();
QuestionConstruct
lastConstruct
=
null
;
...
...
@@ -64,7 +64,7 @@ public class EntityRevisionResolver
if
(
currentConstruct
.
getQuestionType
().
contains
(
"Grid"
)
)
{
page
=
restClient
.
getElementRevisionsOfLastDays
(
currentConstruct
.
getQuestion
().
d
diStore
.
getPrimaryKey
(),
currentConstruct
.
getQuestion
().
getD
diStore
()
.
getPrimaryKey
(),
100
,
0
,
50
);
revisions
=
page
.
getItems
();
MultipleQuestionItem
lastQuestion
=
null
;
...
...
@@ -108,7 +108,7 @@ public class EntityRevisionResolver
else
{
page
=
restClient
.
getElementRevisionsOfLastDays
(
currentConstruct
.
getQuestion
().
d
diStore
.
getPrimaryKey
(),
currentConstruct
.
getQuestion
().
getD
diStore
()
.
getPrimaryKey
(),
100
,
0
,
50
);
revisions
=
page
.
getItems
();
QuestionItem
lastQuestion
=
null
;
...
...
@@ -152,7 +152,7 @@ public class EntityRevisionResolver
if
(
currentConstruct
.
getUniverse
()
!=
null
)
{
page
=
restClient
.
getElementRevisionsOfLastDays
(
currentConstruct
.
getUniverse
().
d
diStore
.
getPrimaryKey
(),
currentConstruct
.
getUniverse
().
getD
diStore
()
.
getPrimaryKey
(),
100
,
0
,
50
);
revisions
=
page
.
getItems
();
Universe
lastUniverse
=
null
;
...
...
src/main/java/org/gesis/stardat/service/CachingSerializationDDIFlatDBClient.java
View file @
65a1b889
...
...
@@ -219,7 +219,7 @@ public class CachingSerializationDDIFlatDBClient
{
DDIStore
ddiStore
=
getRestClient
().
saveElement
(
ddiElement
.
getDdiStore
(),
userName
,
comment
);
ddiElement
.
d
diStore
=
ddiStore
;
ddiElement
.
setD
diStore
(
ddiStore
)
;
return
ddiElement
;
}
...
...
src/main/java/org/gesis/stardat/service/ElementManager.java
View file @
65a1b889
...
...
@@ -54,7 +54,7 @@ public class ElementManager
public
DDIElement
saveElement
(
DDIElement
ddiElement
,
String
userName
,
String
comment
)
{
ddiElement
.
save
();
DDIStore
ddiStore
=
getDdiRestClient
().
saveElement
(
ddiElement
.
d
diStore
,
userName
,
comment
);
DDIStore
ddiStore
=
getDdiRestClient
().
saveElement
(
ddiElement
.
getD
diStore
()
,
userName
,
comment
);
ddiElement
.
load
(
ddiStore
);
return
ddiElement
;
}
...
...
src/main/java/org/gesis/stardat/service/EntityCreationService.java
View file @
65a1b889
This diff is collapsed.
Click to expand it.
src/main/java/org/gesis/stardat/service/StudyGroupService.java
View file @
65a1b889
...
...
@@ -43,8 +43,8 @@ public class StudyGroupService
public
void
save
(
StudyGroup
studyGroup
)
{
studyGroup
.
save
();
studyGroup
.
d
diStore
=
getRestClient
().
saveElement
(
studyGroup
.
getDdiStore
(),
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"save studygroup "
+
studyGroup
.
getLabel
()
);
studyGroup
.
setD
diStore
(
getRestClient
().
saveElement
(
studyGroup
.
getDdiStore
(),
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"save studygroup "
+
studyGroup
.
getLabel
()
)
);
}
public
List
<
StudyGroup
>
findAll
(
String
keyword
)
...
...
src/main/java/org/gesis/stardat/service/VariableService.java
View file @
65a1b889
...
...
@@ -114,7 +114,7 @@ public class VariableService
+
qgr
.
getSequence
()
+
"_"
+
countVariables
++
);
var
.
setLabel
(
preText
+
qgr
.
getSequence
()
);
var
.
save
();
// restClient.saveElement( var.
d
diStore, getUser(), "creating new
// restClient.saveElement( var.
getD
diStore
()
, getUser(), "creating new
// variable"
// );
}
...
...
@@ -136,7 +136,7 @@ public class VariableService
var
.
setQuestionReference
(
qc
.
getQuestion
().
getId
()
);
var
.
setCodeListReference
(
mqi
.
getAnswerCodeListReference
()
);
var
.
save
();
// restClient.saveElement( var.
d
diStore, getUser(), "creating new
// restClient.saveElement( var.
getD
diStore
()
, getUser(), "creating new
// variable"
// );
}
...
...
@@ -157,7 +157,7 @@ public class VariableService
"Would replace label: "
+
var
.
getLabel
()
+
" with "
+
preText
+
qgr
.
getSequence
()
);
var
.
setLabel
(
preText
+
qgr
.
getSequence
()
);
var
.
save
();
// restClient.saveElement( var.
d
diStore, getUser(), "creating new variable"
// restClient.saveElement( var.
getD
diStore
()
, getUser(), "creating new variable"
// );
}
...
...
@@ -174,7 +174,7 @@ public class VariableService
var
.
setQuestionReference
(
qi
.
getId
()
);
var
.
setCodeListReference
(
qi
.
getCodeListReference
()
);
var
.
save
();
// restClient.saveElement( var.
d
diStore, getUser(), "creating new variable"
// restClient.saveElement( var.
getD
diStore
()
, getUser(), "creating new variable"
// );
}
...
...
@@ -194,11 +194,11 @@ public class VariableService
"newStudy.label.fieldValue"
)
+
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()
)
);
studyUnit
.
save
();
studyUnit
.
d
diStore
=
restClient
.
saveElement
(
studyUnit
.
d
diStore
,
getUser
(),
"GIT comment"
);
studyUnit
.
setD
diStore
(
restClient
.
saveElement
(
studyUnit
.
getD
diStore
()
,
getUser
(),
"GIT comment"
)
);
Document
document
=
new
Document
();
document
.
setIdentifier
(
studyUnit
.
getId
()
);
document
.
setSplitConfigurationName
(
studyUnit
.
d
diStore
.
getDdiDialect
()
);
document
.
setFileName
(
studyUnit
.
getId
()
+
"_"
+
studyUnit
.
d
diStore
.
getDdiDialect
()
+
".xml"
);
document
.
setSplitConfigurationName
(
studyUnit
.
getD
diStore
()
.
getDdiDialect
()
);
document
.
setFileName
(
studyUnit
.
getId
()
+
"_"
+
studyUnit
.
getD
diStore
()
.
getDdiDialect
()
+
".xml"
);
document
.
setContent
(
null
);
restClient
.
importDocument
(
document
,
getUser
(),
"GIT comment"
);
...
...
@@ -214,7 +214,7 @@ public class VariableService
cat1
.
setText
(
"nein"
);
cs
.
addCategory
(
cat2
);
cs
.
save
();
restClient
.
saveElement
(
cs
.
d
diStore
,
getUser
(),
"GIT comment"
);
restClient
.
saveElement
(
cs
.
getD
diStore
()
,
getUser
(),
"GIT comment"
);
// Answer codes
CodeList
cl
=
new
CodeList
();
...
...
@@ -231,7 +231,7 @@ public class VariableService
code2
.
setCategoryReference
(
cat2
.
getId
()
);
cl
.
addCode
(
code2
);
cl
.
save
();
restClient
.
saveElement
(
cl
.
d
diStore
,
getUser
(),
"GIT comment"
);
restClient
.
saveElement
(
cl
.
getD
diStore
()
,
getUser
(),
"GIT comment"
);
// Variable
Variable
var
=
new
Variable
();
...
...
@@ -240,7 +240,7 @@ public class VariableService
var
.
setName
(
"V1"
);
var
.
setCodeListReference
(
cl
.
getId
()
);
var
.
save
();
restClient
.
saveElement
(
var
.
d
diStore
,
getUser
(),
"GIT comment"
);
restClient
.
saveElement
(
var
.
getD
diStore
()
,
getUser
(),
"GIT comment"
);
// all variable statistics
VariableStatistics
vs
=
new
VariableStatistics
();
...
...
@@ -266,7 +266,7 @@ public class VariableService
vs
.
addCategoryStatistic
(
css2
);
vs
.
save
();
restClient
.
saveElement
(
vs
.
d
diStore
,
getUser
(),
"GIT comment"
);
restClient
.
saveElement
(
vs
.
getD
diStore
()
,
getUser
(),
"GIT comment"
);
return
true
;
}
...
...
src/main/java/org/gesis/stardat/ui/QuestionnaireEditorView.java
View file @
65a1b889
...
...
@@ -1818,10 +1818,10 @@ public class QuestionnaireEditorView extends VerticalLayout implements View, Tra
.
map
(
ms
->
ms
.
getControlConstructReference
()
).
collect
(
Collectors
.
toList
()
)
)
);
// save and save to flatDB
masterSequence
.
save
();
masterSequence
.
d
diStore
=
getEntityService
().
saveElement
(
masterSequence
,
masterSequence
.
setD
diStore
(
getEntityService
().
saveElement
(
masterSequence
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"reorder "
+
DDIElement
.
SEQUENCE
+
" Question reorder: "
+
selectedQuestions
.
stream
()
.
map
(
q
->
q
.
getName
()
).
collect
(
Collectors
.
joining
(
", "
)
)
);
.
map
(
q
->
q
.
getName
()
).
collect
(
Collectors
.
joining
(
", "
)
)
)
);
questionGrid
.
deselectAll
();
fillTree
();
...
...
src/main/java/org/gesis/stardat/ui/forms/AnswerCategoriesForm.java
View file @
65a1b889
...
...
@@ -209,10 +209,10 @@ public class AnswerCategoriesForm extends VerticalLayout implements ReferencePro
CodeList
codeList
=
asw
.
getCurrentCodeList
();
CategoryScheme
categoryScheme
=
codeList
.
getCategoryScheme
();
categoryScheme
.
save
();
categoryScheme
.
d
diStore
=
restClient
.
saveElement
(
categoryScheme
.
d
diStore
,
getUi
().
getCurrentUserId
(),
comment
);
categoryScheme
.
setD
diStore
(
restClient
.
saveElement
(
categoryScheme
.
getD
diStore
()
,
getUi
().
getCurrentUserId
(),
comment
)
);
codeList
.
save
();
codeList
.
d
diStore
=
restClient
.
saveElement
(
codeList
.
d
diStore
,
getUi
().
getCurrentUserId
(),
comment
);
codeList
.
setD
diStore
(
restClient
.
saveElement
(
codeList
.
getD
diStore
()
,
getUi
().
getCurrentUserId
(),
comment
)
);
if
(
isNew
)
{
currentCodeLists
.
add
(
codeList
);
...
...
src/main/java/org/gesis/stardat/ui/view/component/CodeCategoryGrid.java
View file @
65a1b889
...
...
@@ -90,17 +90,17 @@ public class CodeCategoryGrid extends MGrid<QuestionCodeCategory> implements Tra
// save categoryScheme
categoryScheme
.
save
();
categoryScheme
.
d
diStore
=
questionWindow
.
getEntityService
().
saveElement
(
categoryScheme
,
categoryScheme
.
setD
diStore
(
questionWindow
.
getEntityService
().
saveElement
(
categoryScheme
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"reorder "
+
DDIElement
.
CATEGORYSCHEME
.
toString
()
+
" Code-Category reorder: "
+
draggedRow
.
getCode
().
getValue
()
+
" - "
+
draggedRow
.
getCategory
().
getText
()
);
+
draggedRow
.
getCategory
().
getText
()
)
);
// save codelist
clist
.
save
();
clist
.
d
diStore
=
questionWindow
.
getEntityService
().
saveElement
(
clist
,
clist
.
setD
diStore
(
questionWindow
.
getEntityService
().
saveElement
(
clist
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"reorder "
+
DDIElement
.
CODELIST
.
toString
()
+
" Code-Category reorder: "
+
draggedRow
.
getCode
().
getValue
()
+
" - "
+
draggedRow
.
getCategory
().
getText
()
);
+
draggedRow
.
getCategory
().
getText
()
)
);
}
@Override
...
...
src/main/java/org/gesis/stardat/ui/view/instruction/InstructionWindow.java
View file @
65a1b889
...
...
@@ -76,8 +76,8 @@ public class InstructionWindow extends BaseStoreCancelWindow
String
comment
=
"commitid:"
+
UUID
.
randomUUID
().
toString
()
+
"# "
+
"[change] "
+
commentField
.
getValue
();
instruction
.
save
();
instruction
.
d
diStore
=
this
.
entityService
.
saveElement
(
instruction
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
instruction
.
setD
diStore
(
this
.
entityService
.
saveElement
(
instruction
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
this
.
entityService
.
clearElementCacheForLists
(
instruction
.
getContainerId
(),
DDIElement
.
INTERVIEWERINSTRUCTION
);
HashMap
<
String
,
Object
>
args
=
new
HashMap
<>();
...
...
src/main/java/org/gesis/stardat/ui/view/instruction/InterviewerInstructionForm.java
View file @
65a1b889
...
...
@@ -210,9 +210,9 @@ public class InterviewerInstructionForm extends MVerticalLayout
DDIElement
.
INTERVIEWERINSTRUCTION
);
if
(
goal
.
endsWith
(
DELETE_WINDOW
)
)
{
this
.
entityService
.
deleteElement
(
instruction
.
d
diStore
.
getPrimaryKey
(),
this
.
entityService
.
deleteElement
(
instruction
.
getD
diStore
()
.
getPrimaryKey
(),
getUi
().
getCurrentUserId
(),
cw
.
getComment
(),
instruction
.
d
diStore
.
getElementId
()
);
cw
.
getComment
(),
instruction
.
getD
diStore
()
.
getElementId
()
);
updateInstructionGrid
(
this
.
instructionType
);
}
else
...
...
src/main/java/org/gesis/stardat/ui/view/question/QuestionAnswerPanel.java
View file @
65a1b889
...
...
@@ -310,10 +310,10 @@ public class QuestionAnswerPanel extends CustomComponent
String
comment
=
COMMITID
+
UUID
.
randomUUID
().
toString
()
+
"# "
+
"[changed]"
;
CategoryScheme
categoryScheme
=
codeList
.
getCategoryScheme
();
categoryScheme
.
save
();
categoryScheme
.
d
diStore
=
entityService
.
saveElement
(
categoryScheme
,
getUi
().
getCurrentUserId
(),
comment
);
categoryScheme
.
setD
diStore
(
entityService
.
saveElement
(
categoryScheme
,
getUi
().
getCurrentUserId
(),
comment
)
);
codeList
.
save
();
codeList
.
d
diStore
=
entityService
.
saveElement
(
codeList
,
getUi
().
getCurrentUserId
(),
comment
);
codeList
.
setD
diStore
(
entityService
.
saveElement
(
codeList
,
getUi
().
getCurrentUserId
(),
comment
)
);
entityService
.
clearElementCacheForLists
(
codeList
.
getContainerId
(),
DDIElement
.
CODELIST
);
if
(
isNew
)
{
...
...
src/main/java/org/gesis/stardat/ui/view/question/QuestionCodeCategoryWindow.java
View file @
65a1b889
...
...
@@ -87,17 +87,17 @@ public class QuestionCodeCategoryWindow extends BaseStoreCancelWindow
// simply save either new or edit
// save categoryScheme
categoryScheme
.
save
();
categoryScheme
.
d
diStore
=
questionWindow
.
getEntityService
().
saveElement
(
categoryScheme
,
categoryScheme
.
setD
diStore
(
questionWindow
.
getEntityService
().
saveElement
(
categoryScheme
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"save "
+
DDIElement
.
CATEGORYSCHEME
.
toString
()
+
" Code-Category: "
+
currentCode
.
getValue
()
+
" - "
+
currentCategory
.
getText
()
);
+
currentCategory
.
getText
()
)
);
// save codelist
clist
.
save
();
clist
.
d
diStore
=
questionWindow
.
getEntityService
().
saveElement
(
clist
,
clist
.
setD
diStore
(
questionWindow
.
getEntityService
().
saveElement
(
clist
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"save "
+
DDIElement
.
CODELIST
.
toString
()
+
" Code-Category: "
+
currentCode
.
getValue
()
+
" - "
+
currentCategory
.
getText
()
);
+
currentCategory
.
getText
()
)
);
questionWindow
.
updateQuestionCodeCategoryGrid
();
return
true
;
...
...
src/main/java/org/gesis/stardat/ui/view/question/QuestionTranslateWindow.java
View file @
65a1b889
...
...
@@ -404,8 +404,8 @@ public class QuestionTranslateWindow extends BaseStoreCancelWindow implements Tr
entityService
.
insertConstructReference
(
construct
.
getId
(),
construct
.
getType
(),
masterSequence
,
constructPrevSibling
!=
null
?
constructPrevSibling
.
getId
()
:
null
,
comment
);
construct
.
save
();
construct
.
d
diStore
=
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
construct
.
setD
diStore
(
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
}
...
...
@@ -443,15 +443,15 @@ public class QuestionTranslateWindow extends BaseStoreCancelWindow implements Tr
construct
.
setInterviewerInstruction
(
null
);
}
construct
.
save
();
construct
.
d
diStore
=
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
construct
.
setD
diStore
(
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
if
(
construct
.
getUniverse
()
==
null
)
{
getEntityService
().
addNewFilter
(
construct
);
}
construct
.
getUniverse
().
setDescription
(
filterInDescTextField
.
getValue
()
);
construct
.
getUniverse
().
save
();
construct
.
getUniverse
().
d
diStore
=
getEntityService
().
saveElement
(
construct
.
getUniverse
(),
getDDIEditor
().
getCurrentUserId
(),
comment
);
construct
.
getUniverse
().
setD
diStore
(
getEntityService
().
saveElement
(
construct
.
getUniverse
(),
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
}
private
void
storeMultipleQuestionItem
(
String
comment
)
...
...
@@ -470,12 +470,12 @@ public class QuestionTranslateWindow extends BaseStoreCancelWindow implements Tr
if
(
currentInterviewerRespondent
!=
null
&&
!
currentInterviewerRespondent
.
getId
().
isEmpty
()
)
item
.
setInstructionReference
(
currentInterviewerRespondent
.
getId
()
);
item
.
save
();
item
.
d
diStore
=
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
item
.
setD
diStore
(
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
// CodeList codeList = item.getItemList();
// CategoryScheme categoryScheme = codeList.getCategoryScheme();
// categoryScheme.
d
diStore
=
getEntityService().saveElement( categoryScheme,
// categoryScheme.
setD
diStore
(
getEntityService().saveElement( categoryScheme,
// getDDIEditor().getCurrentUserId(), comment );
// codeList.
d
diStore
=
getEntityService().saveElement( codeList, getDDIEditor().getCurrentUserId(),
// codeList.
setD
diStore
(
getEntityService().saveElement( codeList, getDDIEditor().getCurrentUserId(),
// comment );
item
.
setLanguage
(
SOURCE_LANG
);
}
...
...
@@ -496,7 +496,7 @@ public class QuestionTranslateWindow extends BaseStoreCancelWindow implements Tr
if
(
currentInterviewerRespondent
!=
null
&&
!
currentInterviewerRespondent
.
getId
().
isEmpty
()
)
item
.
setInstructionReference
(
currentInterviewerRespondent
.
getId
()
);
item
.
save
();
item
.
d
diStore
=
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
item
.
setD
diStore
(
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
item
.
setLanguage
(
SOURCE_LANG
);
}
...
...
src/main/java/org/gesis/stardat/ui/view/question/QuestionVariableWindow.java
View file @
65a1b889
...
...
@@ -156,8 +156,8 @@ public class QuestionVariableWindow extends BaseStoreCancelWindow
variable
.
setEmbargo
(
cvAvailablityRef
);
variable
.
save
();
variable
.
d
diStore
=
questionWindow
.
getEntityService
().
saveElement
(
variable
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"save variable "
+
variable
.
getName
()
);
variable
.
setD
diStore
(
questionWindow
.
getEntityService
().
saveElement
(
variable
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"save variable "
+
variable
.
getName
()
)
);
questionWindow
.
getEntityService
()
.
clearCacheForVariableByQuestionReference
(
questionWindow
.
getConstruct
().
getQuestionReference
()
);
questionWindow
.
updateVariableGrid
();
...
...
src/main/java/org/gesis/stardat/ui/view/question/QuestionWindow.java
View file @
65a1b889
...
...
@@ -753,19 +753,19 @@ public class QuestionWindow extends BaseStoreCancelWindow implements Translatabl
// save categoryScheme
categoryScheme
.
save
();
categoryScheme
.
d
diStore
=
getEntityService
().
saveElement
(
categoryScheme
,
categoryScheme
.
setD
diStore
(
getEntityService
().
saveElement
(
categoryScheme
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"delete "
+
DDIElement
.
CATEGORYSCHEME
+
" Code-Category: "
+
codeCategory
.
getCode
().
getValue
()
+
" - "
+
codeCategory
.
getCategory
().
getText
()
);
+
codeCategory
.
getCategory
().
getText
()
)
);
// save codelist
clist
.
save
();
clist
.
d
diStore
=
getEntityService
().
saveElement
(
clist
,
clist
.
setD
diStore
(
getEntityService
().
saveElement
(
clist
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"delete "
+
DDIElement
.
CODELIST
+
" Code-Category: "
+
codeCategory
.
getCode
().
getValue
()
+
" - "
+
codeCategory
.
getCategory
().
getText
()
);
+
codeCategory
.
getCategory
().
getText
()
)
);
updateQuestionCodeCategoryGrid
();
}
...
...
@@ -960,10 +960,10 @@ public class QuestionWindow extends BaseStoreCancelWindow implements Translatabl
break
;
}
this
.
entityService
.
deleteElement
(
instruction
.
d
diStore
.
getPrimaryKey
(),
this
.
entityService
.
deleteElement
(
instruction
.
getD
diStore
()
.
getPrimaryKey
(),
getUi
().
getCurrentUserId
(),
"Instruction deleted:"
+
selectedInstruction
.
getLabel
(),
instruction
.
d
diStore
.
getElementId
()
);
instruction
.
getD
diStore
()
.
getElementId
()
);
updateInstructionGrid
(
instructionType
);
}
}
);
...
...
@@ -1295,8 +1295,8 @@ public class QuestionWindow extends BaseStoreCancelWindow implements Translatabl
entityService
.
insertConstructReference
(
construct
.
getId
(),
construct
.
getType
(),
masterSequence
,
constructPrevSibling
!=
null
?
constructPrevSibling
.
getId
()
:
null
,
comment
);
construct
.
save
();
construct
.
d
diStore
=
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
construct
.
setD
diStore
(
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
}
...
...
@@ -1353,10 +1353,10 @@ public class QuestionWindow extends BaseStoreCancelWindow implements Translatabl
construct
.
getUniverse
().
setUniverseCode
(
filterInTextField
.
getValue
()
);
construct
.
getUniverse
().
setDescription
(
filterInDescTextField
.
getValue
()
);
construct
.
getUniverse
().
save
();
construct
.
getUniverse
().
d
diStore
=
getEntityService
().
saveElement
(
construct
.
getUniverse
(),
getDDIEditor
().
getCurrentUserId
(),
comment
);
construct
.
getUniverse
().
setD
diStore
(
getEntityService
().
saveElement
(
construct
.
getUniverse
(),
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
construct
.
save
();
construct
.
d
diStore
=
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
construct
.
setD
diStore
(
getEntityService
().
saveElement
(
construct
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
}
private
void
storeMultipleQuestionItem
(
String
comment
)
...
...
@@ -1378,12 +1378,12 @@ public class QuestionWindow extends BaseStoreCancelWindow implements Translatabl
item
.
setRuntime
(
0
);
CodeList
codeList
=
item
.
getItemList
();
CategoryScheme
categoryScheme
=
codeList
.
getCategoryScheme
();
categoryScheme
.
d
diStore
=
getEntityService
().
saveElement
(
categoryScheme
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
codeList
.
d
diStore
=
getEntityService
().
saveElement
(
codeList
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
categoryScheme
.
setD
diStore
(
getEntityService
().
saveElement
(
categoryScheme
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
codeList
.
setD
diStore
(
getEntityService
().
saveElement
(
codeList
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
item
.
save
();
item
.
d
diStore
=
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
item
.
setD
diStore
(
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
}
private
void
storeQuestionItem
(
String
comment
)
...
...
@@ -1404,7 +1404,7 @@ public class QuestionWindow extends BaseStoreCancelWindow implements Translatabl
else
item
.
setRuntime
(
0
);
item
.
save
();
item
.
d
diStore
=
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
item
.
setD
diStore
(
getEntityService
().
saveElement
(
item
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
}
@Override
...
...
src/main/java/org/gesis/stardat/ui/view/statement/StatementTranslateWindow.java
View file @
65a1b889
...
...
@@ -114,9 +114,9 @@ public class StatementTranslateWindow extends BaseStoreCancelWindow
statement
.
setDescription
(
descriptionTlField
.
getValue
()
);
statement
.
setDisplayText
(
textTlField
.
getValue
()
);
statement
.
save
();
statement
.
d
diStore
=
master
.
getEntityService
().
saveElement
(
statement
,
statement
.
setD
diStore
(
master
.
getEntityService
().
saveElement
(
statement
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
comment
)
);
master
.
getEntityService
().
clearElementCacheForLists
(
statement
.
getContainerId
(),
DDIElement
.
STATEMENT
);
statement
.
setLanguage
(
SOURCE_LANG
);
...
...
src/main/java/org/gesis/stardat/ui/view/study/StudySelectionView.java
View file @
65a1b889
...
...
@@ -688,7 +688,7 @@ public class StudySelectionView extends VerticalLayout implements View, Translat
editedInstrument
.
setLabel
(
args
.
get
(
EditStudyWindow
.
TITLE
).
toString
()
);
editedInstrument
.
save
();
entityService
.
getRestClient
().
saveElement
(
editedInstrument
.
d
diStore
,
entityService
.
getRestClient
().
saveElement
(
editedInstrument
.
getD
diStore
()
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"Update study "
+
editedInstrument
.
getLabel
()
+
" label: "
+
args
.
get
(
EditQuestionnaireWindow
.
COMMENT
)
);
...
...
@@ -740,7 +740,7 @@ public class StudySelectionView extends VerticalLayout implements View, Translat
editedStudy
.
setTitle
(
args
.
get
(
EditStudyWindow
.
TITLE
).
toString
()
);
editedStudy
.
save
();
entityService
.
getRestClient
().
saveElement
(
editedStudy
.
d
diStore
,
entityService
.
getRestClient
().
saveElement
(
editedStudy
.
getD
diStore
()
,
DDIEditorSecurityUtils
.
getLoggedUserName
(),
"Update study "
+
editedStudy
.
getUserId
()
+
" title: "
+
args
.
get
(
EditStudyWindow
.
COMMENT
)
);
...
...
src/main/java/org/gesis/stardat/ui/windows/InstructionWindowTranslate.java
View file @
65a1b889
...
...
@@ -111,8 +111,8 @@ public class InstructionWindowTranslate extends BaseStoreCancelWindow
String
comment
=
"commitid:"
+
UUID
.
randomUUID
().
toString
()
+
"# "
+
"[change] add/edit translation"
;
instruction
.
save
();
instruction
.
d
diStore
=
this
.
entityService
.
saveElement
(
instruction
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
instruction
.
setD
diStore
(
this
.
entityService
.
saveElement
(
instruction
,
getDDIEditor
().
getCurrentUserId
(),
comment
)
);
this
.
entityService
.
clearElementCacheForLists
(
instruction
.
getContainerId
(),
DDIElement
.
INTERVIEWERINSTRUCTION
);
instruction
.
setLanguage
(
SOURCE_LANG
);
...
...
src/main/java/org/gesis/stardat/ui/windows/StatementWindow.java
View file @
65a1b889
...
...
@@ -97,9 +97,9 @@ public class StatementWindow extends BaseStoreCancelWindow
statement
.
setDescription
(
descriptionField
.
getValue
()
);
statement
.
setDisplayText
(
textField
.
getValue
()
);
statement
.
save
();
statement
.
d
diStore
=
master
.
getEntityService
().
saveElement
(
statement
,
statement
.
setD
diStore
(
master
.
getEntityService
().
saveElement
(
statement
,
getDDIEditor
().
getCurrentUserId
(),
comment
);
comment
)
);
master
.
readyWith
(
GOAL
+
windowName
,
true
,
null
);
}
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment