Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
d74ef999
Commit
d74ef999
authored
8 years ago
by
Tom Käsler
Browse files
Options
Downloads
Patches
Plain Diff
refac publicpoolsettings
parent
b5f8f8bf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java
+26
-20
26 additions, 20 deletions
...e/thm/arsnova/entities/transport/ImportExportSession.java
src/main/java/de/thm/arsnova/services/SessionService.java
+1
-1
1 addition, 1 deletion
src/main/java/de/thm/arsnova/services/SessionService.java
with
27 additions
and
21 deletions
src/main/java/de/thm/arsnova/entities/transport/ImportExportSession.java
+
26
−
20
View file @
d74ef999
...
@@ -129,27 +129,22 @@ public class ImportExportSession {
...
@@ -129,27 +129,22 @@ public class ImportExportSession {
final
Session
s
=
new
Session
();
final
Session
s
=
new
Session
();
// import fields
// import fields
s
.
setActive
(
session
.
isActive
());
s
.
setActive
(
session
.
isActive
());
s
.
setName
(
session
.
getName
());
// overwrite name and shortname
s
.
setShortName
(
session
.
getShortName
());
s
.
setName
(
session
.
getPublicPool
().
getName
());
s
.
setShortName
(
session
.
getPublicPool
().
getShortName
());
// mark as public pool session
s
.
setSessionType
(
session
.
getSessionType
());
s
.
setFeatures
(
session
.
getSessionFeature
());
s
.
setFeatures
(
session
.
getSessionFeature
());
// public pool
// set pool fields (which are also used as a session info)
if
(
session
.
getPublicPool
()
!=
null
)
{
s
.
setPpAuthorMail
(
session
.
getPublicPool
().
getPpAuthorMail
());
// overwrite name and shortname
s
.
setPpAuthorName
(
session
.
getPublicPool
().
getPpAuthorName
());
s
.
setName
(
session
.
getPublicPool
().
getName
());
s
.
setPpDescription
(
session
.
getPublicPool
().
getPpDescription
());
s
.
setShortName
(
session
.
getPublicPool
().
getShortName
());
s
.
setPpFaculty
(
session
.
getPublicPool
().
getPpFaculty
());
// set pool fields
s
.
setPpLevel
(
session
.
getPublicPool
().
getPpLevel
());
s
.
setPpAuthorMail
(
session
.
getPublicPool
().
getPpAuthorMail
());
s
.
setPpLicense
(
session
.
getPublicPool
().
getPpLicense
());
s
.
setPpAuthorName
(
session
.
getPublicPool
().
getPpAuthorName
());
s
.
setPpLogo
(
session
.
getPublicPool
().
getPpLogo
());
s
.
setPpDescription
(
session
.
getPublicPool
().
getPpDescription
());
s
.
setPpSubject
(
session
.
getPublicPool
().
getPpSubject
());
s
.
setPpFaculty
(
session
.
getPublicPool
().
getPpFaculty
());
s
.
setPpUniversity
(
session
.
getPublicPool
().
getPpUniversity
());
s
.
setPpLevel
(
session
.
getPublicPool
().
getPpLevel
());
s
.
setPpLicense
(
session
.
getPublicPool
().
getPpLicense
());
s
.
setPpLogo
(
session
.
getPublicPool
().
getPpLogo
());
s
.
setPpSubject
(
session
.
getPublicPool
().
getPpSubject
());
s
.
setPpUniversity
(
session
.
getPublicPool
().
getPpUniversity
());
// mark as public pool session
s
.
setSessionType
(
"public_pool"
);
}
// other fields
// other fields
s
.
setType
(
"session"
);
s
.
setType
(
"session"
);
s
.
setCreator
(
user
.
getUsername
());
s
.
setCreator
(
user
.
getUsername
());
...
@@ -232,6 +227,8 @@ public class ImportExportSession {
...
@@ -232,6 +227,8 @@ public class ImportExportSession {
private
String
shortName
;
private
String
shortName
;
private
String
sessionType
;
private
boolean
active
;
private
boolean
active
;
private
PublicPool
publicPool
;
private
PublicPool
publicPool
;
...
@@ -247,6 +244,15 @@ public class ImportExportSession {
...
@@ -247,6 +244,15 @@ public class ImportExportSession {
this
.
name
=
name
;
this
.
name
=
name
;
}
}
@ApiModelProperty
(
required
=
false
,
value
=
"used to identify public pool sessions"
)
public
String
getSessionType
()
{
return
sessionType
;
}
public
void
setSessionType
(
String
sessionType
)
{
this
.
sessionType
=
sessionType
;
}
@ApiModelProperty
(
required
=
true
,
value
=
"used to display short name"
)
@ApiModelProperty
(
required
=
true
,
value
=
"used to display short name"
)
public
String
getShortName
()
{
public
String
getShortName
()
{
return
shortName
;
return
shortName
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/thm/arsnova/services/SessionService.java
+
1
−
1
View file @
d74ef999
...
@@ -414,7 +414,7 @@ public class SessionService implements ISessionService, ApplicationEventPublishe
...
@@ -414,7 +414,7 @@ public class SessionService implements ISessionService, ApplicationEventPublishe
@PreAuthorize
(
"isAuthenticated() and hasPermission(#sessionkey, 'session', 'owner')"
)
@PreAuthorize
(
"isAuthenticated() and hasPermission(#sessionkey, 'session', 'owner')"
)
public
SessionInfo
copySessionToPublicPool
(
String
sessionkey
,
de
.
thm
.
arsnova
.
entities
.
transport
.
ImportExportSession
.
PublicPool
pp
)
{
public
SessionInfo
copySessionToPublicPool
(
String
sessionkey
,
de
.
thm
.
arsnova
.
entities
.
transport
.
ImportExportSession
.
PublicPool
pp
)
{
ImportExportSession
temp
=
databaseDao
.
exportSession
(
sessionkey
,
false
,
false
);
ImportExportSession
temp
=
databaseDao
.
exportSession
(
sessionkey
,
false
,
false
);
temp
.
getSession
().
set
P
ublic
P
ool
(
pp
);
temp
.
getSession
().
set
SessionType
(
"p
ublic
_p
ool
"
);
final
User
user
=
userService
.
getCurrentUser
();
final
User
user
=
userService
.
getCurrentUser
();
return
databaseDao
.
importSession
(
user
,
temp
);
return
databaseDao
.
importSession
(
user
,
temp
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment