-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Story/vspc 232 214 215 multiple languages #336
Open
pkharge
wants to merge
212
commits into
develop
Choose a base branch
from
story/VSPC-232-214-215-multiple-languages
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 210 commits
Commits
Show all changes
212 commits
Select commit
Hold shift + click to select a range
a31db86
[story VSPC-215] added entity
f723c2d
[story/VSPC-215] entity changes
fdc14e6
[story/VSPC-215] entity
95befa0
[bug/VSPC-232] worked on controller
swetalina-prusty25 478f1e4
[bug/VSPC-232] developed the backend part
swetalina-prusty25 a0b4b07
[story/VSPC-141-rebase] space title getter setter
fe5789a
[bug/VSPC-232] worked on the backend implementation
swetalina-prusty25 8de1fea
[bug/VSPC-232] Added Entity
swetalina-prusty25 b93c9d5
[bug/VSPC-232] Entity
swetalina-prusty25 c6cb4ea
[story/VSPC-215] added language object entity
2df4b0c
[bug/VSPC-232] modified About page and added object
swetalina-prusty25 108cfa0
[story/VSPC-215]
58b7ce0
[story/VSPC-215] manager and repo classes for language object
84d0bb6
[bug/VSPC-232] added labels for title and texts
swetalina-prusty25 0046c12
[story/VSPC-215] save language object
pkharge d049e12
[bug/VSPC-232] Added code or saving title and texts
swetalina-prusty25 96d9164
[story/VSPC-215] name and description being sent to backend
pkharge bcc35e9
[bug/VSPC-232]Added repo and manager class for language object
swetalina-prusty25 2eec1f4
[story/VSPC-215] exhibition language getting populated
pkharge 3ebc7e9
[bug/VSPC-232] worked on saving the title and texts
swetalina-prusty25 b18ba84
[bug/VSPC-232] Worked on UI changes
swetalina-prusty25 f7a9222
[bug/ SPC-232] worked on the UI changes
swetalina-prusty25 686a04c
[bug/VSPC-232]
swetalina-prusty25 5e76922
[bug/VSPC-232] mapping of user inputs to objects
swetalina-prusty25 32fa4b0
[bug/VSPC-232] worked on service and repo
swetalina-prusty25 b7fd0fb
[bug/VSPC-232] updated code
swetalina-prusty25 59de42f
[bug/VSPC-232] Mapped the atrributes
swetalina-prusty25 dca08a8
[bug/VSPC-232] trying to resolve error
swetalina-prusty25 5e74013
[bug/VSPC-232] Saving of data
swetalina-prusty25 ae08a87
[bug/VSPC-232] foreign key mapping
swetalina-prusty25 044391b
[bug/VSPC-232] completed the storing and saving values in db
swetalina-prusty25 88ca1a6
[bug/VSPC-232] display of values in UI
swetalina-prusty25 6f1e69a
[bug/VSPC-232]
swetalina-prusty25 6a9ce69
[bug/VSPC-232] updated manager class
swetalina-prusty25 763fb29
[bug/VSPC-232] Populated the last entry
swetalina-prusty25 68bb82d
[bug/VSPC-232]
swetalina-prusty25 3f6a676
[bug/VSPC-232] Ui Changes
swetalina-prusty25 2cdd59c
[bug/VSPC-232] Implemented the story
swetalina-prusty25 398ecaa
[bug/VSPC-232]Identation
swetalina-prusty25 e24fb74
[bug/VSPC-232]
swetalina-prusty25 0aa822a
[bug/VSPC-232]
swetalina-prusty25 a7d64ed
[bug/VSPC-232] Indentation Error Fixed
swetalina-prusty25 fe69f18
Update LanguageDescriptionObject.java
swetalina-prusty25 e2f5648
Update ExhibitionAboutPageManager.java
swetalina-prusty25 48dd5aa
Update ExhibitionAboutPage.java
swetalina-prusty25 3243f0e
Update ExhibitionAboutPageController.java
swetalina-prusty25 4027e32
Update LanguageDescriptionObject.java
swetalina-prusty25 c9d263a
Update ExhibitionAboutPageManager.java
swetalina-prusty25 d47a8fc
[story/VSPC-214] Added Entity
swetalina-prusty25 22e8dae
[story/VSPC-214] Entity
swetalina-prusty25 2a9b3ec
[story/VSPC-215] change to language object interface
pkharge 79fb348
[story/VSPC-215] edit space multiple languages
pkharge ddfade8
[story/VSPC-215]
pkharge c58ec0c
[story/VSPC-204] data getting stored
pkharge 58a92e7
[story/VSPC-215]
pkharge 4ea5d92
[story/VSPC-215] display values edit page
pkharge 81887a7
[story/VSPC-215] display default spce name and description
pkharge 1e149ee
[story/VSPC-215] added test cases. refactor
pkharge 3883252
[story/VSPC-215] test cases
pkharge 90781b6
[story/VSPC-215] code factor
pkharge 62c6c14
Merge branch 'develop' into story/VSPC-215
pkharge a743f13
[story/VSPC-215] remove unnecessary changes
pkharge 80894ed
[story/VSPC-215] refactor
pkharge 5f5c8c8
[story/VSPC-232] do not send language object list to ui
pkharge f74baa5
[bug/VSPC-232] exhibition language also getting persisted with langua…
pkharge 7f6b501
[story/VSPC-232] avoid creating new langauge description object
pkharge 5d12b24
[story/VSPC-232]
pkharge ad7de21
[bug/VSPC-232] review comments
pkharge 23badaa
[story/vspc-232] modify ui form
pkharge 84ea001
[story/VSPC-232] localized text now working both front end and backend
pkharge 73c7adb
[story/VSPC-232] test cases
pkharge 223a357
[story/VSPC-214] Modified enties and html file
swetalina-prusty25 349f3b9
[story/VSPC-232] cascade
pkharge ced5014
[bug/VSPC-232]
pkharge 2661342
[story/VSPC-214] Added code to fetch slide names
swetalina-prusty25 7ed8915
[bug/VSPC-232] exhibition language delete error
pkharge 0493d66
[story/VSPC-214] mapped names and description
swetalina-prusty25 6d4a1f8
[bug/VSPC-232] ui error displayed
pkharge b911acc
[bug/VSPC-232] test acse
pkharge 1b24b80
[story/VSPC-232] code factor
pkharge 21fd8b4
[story/VSPC-232] code factor
pkharge a00a89e
[bug/VSPC-232]
pkharge 7003be4
[story/VSPC-214] Worked on the edit slide controller
swetalina-prusty25 b276a91
[story/VSPC-215] renamed files
pkharge 8cc6d68
[bug/VSPC-232] refactor
pkharge dc11137
[story/VSPC-214] added label in edit slide page
swetalina-prusty25 7f04993
[story/SPC-214]
swetalina-prusty25 616cba3
[story/VSPC-214] updated edit
swetalina-prusty25 23a66e2
[story/VSPC-214] Default name and description
swetalina-prusty25 ff53422
[story/VSPC-214] Solved foreign key issue
swetalina-prusty25 b1a88e2
[bug/VSPC-239] tabs
pkharge 31a6229
[story/VSPC-214] Edit Slide
swetalina-prusty25 42d3854
[story/VSPC-232] tabs ui
pkharge e9b5eda
[story/VSPC-214] resolved issue
swetalina-prusty25 3ce9509
[story/VSPC-232] default lnagueg, css
pkharge 2a37eb2
[story/VSPC-214] ui changes
swetalina-prusty25 f87cdaa
[story/VSPC-232] tab info submitted propoerly, foreign key constraint…
pkharge b1c013e
[story/VSPC-214] UI changes in progress
swetalina-prusty25 697c7bd
[VSPC-232]
pkharge 90b7aa4
[VSPC-232]
pkharge 09ccb9e
[VSPC-232] code factor
pkharge 1f8fe03
Merge branch 'develop' into bug/VSPC-232
pkharge 94dac8b
[story/VSPC-214] updated manager class according to localized extform
swetalina-prusty25 d98d63d
[story/VSC-214] resolving null id issue
swetalina-prusty25 8c73cc2
[story/VSPC-214] null id
swetalina-prusty25 26c94ad
[story/VSPC-214] Add slide is working
swetalina-prusty25 8133b39
[story/VSPC-214] edit slide
swetalina-prusty25 629b175
[story/VSPC-214]add slide new ui
swetalina-prusty25 840062d
[story/VSPC-232] review comments refactor
pkharge 8d456e5
[story/VSPC-214] edit slide
swetalina-prusty25 4c9d662
[story/VSPC-232] review comments
pkharge edba91c
[story/VSPC-214]UI changes
swetalina-prusty25 b7450f9
[story/VSPC-214] edit page
swetalina-prusty25 8d5fa88
[story/VSPC-232] review comments
pkharge 59ebe31
[story/VSPC-214]bootstrap code for tab
swetalina-prusty25 3496b11
[story/VSPC-214] Test cases
swetalina-prusty25 33ee44e
[story/VSPC-214] tabs for edit slide and test cases
swetalina-prusty25 7f960df
[story/VSPC-214] Test Cases and updated the manager class
swetalina-prusty25 4fb30fd
[story/VSPC-214] Implemented the story
swetalina-prusty25 422b41e
[story/VSPC-214]
swetalina-prusty25 1c0f38a
[story/VSPC-214] removed unwanted files
swetalina-prusty25 0147eb1
[story/VSPC-214]Code Factor
swetalina-prusty25 69201f0
[story/VSPC-214]code factor
swetalina-prusty25 d63c7c6
[story/VSPC-232] added factory to create about page form
pkharge 6827d8f
[story/VSPC-232] db query to delete localized text
pkharge bef77f3
[story/VSPC-232] extended vspace element
pkharge 669d67a
[story/VSPC-232] modified localizedText entity
pkharge c86680b
[story/VSPC-232] exhibition language can now be deleted
pkharge 7754697
[story/VSPC-232] code factor
pkharge d3f3be2
[story/VSPC-232] merge conflicts
pkharge 17eaead
[story/VSPC-232] default about page form
pkharge e77e28a
[story/VSPC-232] default localized text
pkharge 39c2eb1
[story/VSPC-215]Updation accrd to LocalizedText
swetalina-prusty25 2dc23e5
[story/VSPC-215]update addspace text and desc
swetalina-prusty25 a9656a3
[story/VSPC-215]
swetalina-prusty25 642e821
[story/VSPC-215] Add space html
swetalina-prusty25 8bc73a1
[story/VSPC-215] error resolved
swetalina-prusty25 d7b71e6
[story/VSPC-215] edit space
swetalina-prusty25 4e22c5f
[story/VSPC-215] Test cases
swetalina-prusty25 708177a
[story/VSPC-215] Updated spaceFactory
swetalina-prusty25 028e7e0
[story/VSPC-215]Review comment
swetalina-prusty25 eac59d1
[story/VSPC-215] Fixed null id
swetalina-prusty25 deac6e4
[story/VSPC-215] Create Space
swetalina-prusty25 efd93b0
[story/VSPC-215]
swetalina-prusty25 9a2c3f6
[story/VSPC-215]ExhibitionLanguageDeletionException
swetalina-prusty25 c9eaef3
[story/VSPC-215] space factory test cases
swetalina-prusty25 fd4fa4a
[story/VSPC-215] UI Changes
swetalina-prusty25 364327c
[story/VSPC-215] Code Optimization
swetalina-prusty25 c2f55bd
Merge branch 'develop' into story/VSPC-215
swetalina-prusty25 f729a1b
[story/VSPC-215] code factor
swetalina-prusty25 4987325
[story/VSPC-215]
swetalina-prusty25 4809a7d
[story/VSPC-215]
swetalina-prusty25 bb9e455
[story/VSPC-214] Updated entity classes
swetalina-prusty25 d336c52
[story/VSPC-214] slide factory methods
swetalina-prusty25 c5078bb
[story/VSPC-214] Updated manager class methods
swetalina-prusty25 f9ccec2
[story/VSPC-214] Updated manager class
swetalina-prusty25 1017c9a
[story/VSPC-214] edit slide updation
swetalina-prusty25 a0e2c24
[story/VSPC-214] JPA system error resolved
swetalina-prusty25 ba71de4
[story/VSPC-214] LocalizedText Deletion exception
swetalina-prusty25 c1cf369
[story/VSPC-214] Exhibition Language Deletion Exception
swetalina-prusty25 4c3fd42
[story/VSPC-214] slide factory test cases
swetalina-prusty25 0f64127
[story/VSPC-214] test cases
swetalina-prusty25 f006498
Merge branch 'develop' into story/VSPC-214
swetalina-prusty25 b168dab
[story/VSPC-214] code factor
swetalina-prusty25 9efd323
Merge branch 'Bug/VSPC-232' into story/VSPC-232-214-215-multiple-lang…
pkharge ae42bc2
[VSPC-232-215-214-multiple-languages] trying to remove exhibition abo…
pkharge 669b72b
[VSPC-232-214-215-multiple-languages] removed target from localized text
pkharge f4cc724
[VSPC-232-214-215-multiple-languages] merged VSPC-214
pkharge 0cf01e5
[VSPC-232-214-215-multiple-languages] remove target slide from locali…
pkharge 18f0e5d
[VSPC-232-214-215-multiple-languages] merged VSPC-215
pkharge a8e823a
[VSPC-232-214-215] addressed review comment for 215
pkharge 6a770a0
[VSPC-232-214-215] localized text will not get saved if empty
pkharge b8c5df0
[VSPC-232-215-214] pomxml revert
pkharge f0803d5
[VSPC-232-214-215] refactor
pkharge 18e2414
[VSPC-232-214-215-multiple-languages] Addressed review comments: remo…
ShivaniYerram b3a430f
[VSPC-232-214-215-multiple-languages] Addressed review comments: sepa…
ShivaniYerram f29c13a
[VSPC-232-214-215-multiple-languages] Addressed review comments.
ShivaniYerram c9d5f1c
[VSPC-232-214-215-multiple-languages] Addressed review comments.
ShivaniYerram 5b46307
[VSPC-232-214-215-multiple-languages] Title for exhibition languages …
ShivaniYerram 09ed763
[VSPC-232-214-215-multiple-languages] Added Space title and descripti…
ShivaniYerram dba44a4
[VSPC-232-214-215-multiple-languages] Code clean up.
ShivaniYerram 58d8950
[VSPC-232-214-215-multiple-languages] Addressed review comments.
ShivaniYerram 4cc9fff
[VSPC-232-214-215-multiple-languages] Addressed review comments on re…
ShivaniYerram 106c3c6
[VSPC-232-214-215-multiple-languages] Addressed review comments.
ShivaniYerram 741aacb
Merge branch 'develop' into story/VSPC-232-214-215-multiple-languages
pooja-thalur 0f66026
[VSPC-215] addressed pr comments
pooja-thalur c963e2d
[VSPC-215]fixed errors
pooja-thalur ef448b5
[VSPC-215] fixed issue with displaying space title and description
pooja-thalur 5635b31
[VSPC-215] addressed pr comments
pooja-thalur 1844a0c
[VSPC-215-214-232] addressed pr comments
pooja-thalur 013c9ec
[VSPC-215-214-232] fixed testcases
pooja-thalur 1e82e97
[VSPC-232-214-215] fixed testcases
pooja-thalur 19d4e20
Merge branch 'develop' into story/VSPC-232-214-215-multiple-languages
pooja-thalur 758a693
[VSPC-232-214-215] fixed testcase issues
pooja-thalur 9e70fec
[VSPC-232-214-215] fixed issue while editing slides
pooja-thalur a16432c
[VSPC-232-214-215] review comments
pooja-thalur e192a25
[VSPC-232-214-215] removed extra spaces
pooja-thalur 3a4e6cb
[VSPC-232-214-215] removed console and some test file changes
pooja-thalur 0897fcc
[VSPC-215] fixing testcase
pooja-thalur 52ec760
[VSPC-215] fixing test cases
pooja-thalur 5e5718c
[VSPC-232-214-215] addressed pr comment
pooja-thalur 0b63e95
[VSPC-232-214-215] addressed pr comments
pooja-thalur b1d986f
Merge branch 'develop' into story/VSPC-232-214-215-multiple-languages
pooja-thalur 06385d3
[VSPC-232-214-215] fixed issues in getting about text, slide and spac…
pooja-thalur 4ba9447
[VSPC-232-214-215] fixing unit tests
pooja-thalur 1040bb1
[VSPC-232-214-215] fixed testcases
pooja-thalur 5eaaffa
[VSPC-232-214-215] fixed the ui issues
pooja-thalur ed741e0
Merge branch 'develop' into story/VSPC-232-214-215-multiple-languages
pooja-thalur 7c397be
[VSPC-232-214-215] codefactor issue
pooja-thalur 962296b
[VSPC-232-214-215] codefactor issue
pooja-thalur eeaa3a9
Merge branch 'develop' into story/vspc-190
pooja-thalur 3367194
[VSPC-232-214-215] fixed issues after merging
pooja-thalur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
22 changes: 22 additions & 0 deletions
22
vspace/src/main/java/edu/asu/diging/vspace/core/data/ExhibitionLanguageRepository.java
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,22 @@ | ||
package edu.asu.diging.vspace.core.data; | ||
|
||
import org.javers.spring.annotation.JaversSpringDataAuditable; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import edu.asu.diging.vspace.core.model.IExhibition; | ||
import edu.asu.diging.vspace.core.model.IExhibitionLanguage; | ||
import edu.asu.diging.vspace.core.model.impl.ExhibitionLanguage; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface ExhibitionLanguageRepository extends PagingAndSortingRepository<ExhibitionLanguage, String>{ | ||
|
||
ExhibitionLanguage findByLabel(String label); | ||
|
||
@Query("SELECT l FROM ExhibitionLanguage l WHERE l.exhibition = ?1 AND l.isDefault = true") | ||
IExhibitionLanguage findByExhibitionAndIsDefault(IExhibition exhibition); | ||
|
||
} | ||
|
18 changes: 18 additions & 0 deletions
18
vspace/src/main/java/edu/asu/diging/vspace/core/data/LocalizedTextRepository.java
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,18 @@ | ||
package edu.asu.diging.vspace.core.data; | ||
|
||
import java.util.List; | ||
|
||
import org.javers.spring.annotation.JaversSpringDataAuditable; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
import edu.asu.diging.vspace.core.model.IExhibitionLanguage; | ||
import edu.asu.diging.vspace.core.model.impl.LocalizedText; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface LocalizedTextRepository extends PagingAndSortingRepository<LocalizedText, String>{ | ||
|
||
List<LocalizedText> findByExhibitionLanguage(IExhibitionLanguage language); | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
...c/main/java/edu/asu/diging/vspace/core/exception/ExhibitionLanguageDeletionException.java
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,32 @@ | ||
package edu.asu.diging.vspace.core.exception; | ||
|
||
public class ExhibitionLanguageDeletionException extends Exception { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 1L; | ||
|
||
public ExhibitionLanguageDeletionException() { | ||
super(); | ||
} | ||
|
||
public ExhibitionLanguageDeletionException(String message, Throwable cause, boolean enableSuppression, | ||
boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
} | ||
|
||
public ExhibitionLanguageDeletionException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public ExhibitionLanguageDeletionException(String message) { | ||
super(message); | ||
} | ||
|
||
public ExhibitionLanguageDeletionException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
} | ||
|
13 changes: 13 additions & 0 deletions
13
vspace/src/main/java/edu/asu/diging/vspace/core/factory/IAboutPageFormFactory.java
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,13 @@ | ||
package edu.asu.diging.vspace.core.factory; | ||
|
||
import edu.asu.diging.vspace.core.model.impl.ExhibitionAboutPage; | ||
import edu.asu.diging.vspace.web.staff.forms.AboutPageForm; | ||
|
||
public interface IAboutPageFormFactory { | ||
|
||
/** | ||
* Creates About Page form object | ||
*/ | ||
AboutPageForm createAboutPageForm(ExhibitionAboutPage exhibitionAboutPage); | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
vspace/src/main/java/edu/asu/diging/vspace/core/factory/IExhibitionAboutPageFactory.java
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,15 @@ | ||
package edu.asu.diging.vspace.core.factory; | ||
|
||
import java.util.List; | ||
|
||
import edu.asu.diging.vspace.core.model.ILocalizedText; | ||
import edu.asu.diging.vspace.core.model.impl.ExhibitionAboutPage; | ||
|
||
public interface IExhibitionAboutPageFactory { | ||
|
||
/** | ||
* Creates Exhibition About Page | ||
*/ | ||
ExhibitionAboutPage createExhibitionAboutPage(String title, String aboutPageText, List<ILocalizedText> localizedTitles, List<ILocalizedText> localizedDescriptions); | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
vspace/src/main/java/edu/asu/diging/vspace/core/factory/ILocalizedTextFactory.java
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,12 @@ | ||
package edu.asu.diging.vspace.core.factory; | ||
|
||
import java.util.List; | ||
|
||
import edu.asu.diging.vspace.core.model.ILocalizedText; | ||
import edu.asu.diging.vspace.web.staff.forms.LocalizedTextForm; | ||
|
||
public interface ILocalizedTextFactory { | ||
|
||
ILocalizedText createLocalizedText(Object entity, LocalizedTextForm localizedTextFormData, List<ILocalizedText> detailList); | ||
|
||
} |
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 |
---|---|---|
|
@@ -29,4 +29,4 @@ public interface ISlideFactory { | |
*/ | ||
ISlide createSlide(IModule module, SlideForm form, SlideType type); | ||
|
||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
vspace/src/main/java/edu/asu/diging/vspace/core/factory/ISlideFormFactory.java
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,11 @@ | ||
package edu.asu.diging.vspace.core.factory; | ||
|
||
import edu.asu.diging.vspace.core.model.IExhibition; | ||
import edu.asu.diging.vspace.core.model.ISlide; | ||
import edu.asu.diging.vspace.web.staff.forms.SlideForm; | ||
|
||
public interface ISlideFormFactory { | ||
|
||
SlideForm createNewSlideForm(ISlide slide, IExhibition startExhibition); | ||
|
||
} |
2 changes: 2 additions & 0 deletions
2
vspace/src/main/java/edu/asu/diging/vspace/core/factory/ISpaceFactory.java
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
11 changes: 11 additions & 0 deletions
11
vspace/src/main/java/edu/asu/diging/vspace/core/factory/ISpaceFormFactory.java
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,11 @@ | ||
package edu.asu.diging.vspace.core.factory; | ||
|
||
import edu.asu.diging.vspace.core.model.IExhibition; | ||
import edu.asu.diging.vspace.core.model.ISpace; | ||
import edu.asu.diging.vspace.web.staff.forms.SpaceForm; | ||
|
||
public interface ISpaceFormFactory { | ||
|
||
SpaceForm createNewSpaceForm(ISpace space, IExhibition startExhibtion); | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
vspace/src/main/java/edu/asu/diging/vspace/core/factory/impl/ExhibitionAboutPageFactory.java
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,27 @@ | ||
package edu.asu.diging.vspace.core.factory.impl; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import edu.asu.diging.vspace.core.factory.IExhibitionAboutPageFactory; | ||
import edu.asu.diging.vspace.core.model.ILocalizedText; | ||
import edu.asu.diging.vspace.core.model.impl.ExhibitionAboutPage; | ||
|
||
@Component | ||
public class ExhibitionAboutPageFactory implements IExhibitionAboutPageFactory{ | ||
|
||
@Override | ||
public ExhibitionAboutPage createExhibitionAboutPage(String title, String aboutPageText, | ||
List<ILocalizedText> localizedTitles, List<ILocalizedText> localizedDescriptions) { | ||
|
||
ExhibitionAboutPage exhibitionAboutPage = new ExhibitionAboutPage(); | ||
exhibitionAboutPage.setTitle(title); | ||
exhibitionAboutPage.setAboutPageText(aboutPageText); | ||
exhibitionAboutPage.setExhibitionTitles(localizedTitles); | ||
exhibitionAboutPage.setExhibitionTextDescriptions(localizedDescriptions); | ||
|
||
return exhibitionAboutPage; | ||
} | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
vspace/src/main/java/edu/asu/diging/vspace/core/factory/impl/LocalizedTextFactory.java
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 edu.asu.diging.vspace.core.factory.impl; | ||
|
||
import java.util.List; | ||
|
||
import javax.transaction.Transactional; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
import org.thymeleaf.util.StringUtils; | ||
|
||
import edu.asu.diging.vspace.core.data.ExhibitionLanguageRepository; | ||
import edu.asu.diging.vspace.core.data.LocalizedTextRepository; | ||
import edu.asu.diging.vspace.core.factory.ILocalizedTextFactory; | ||
import edu.asu.diging.vspace.core.model.ILocalizedText; | ||
import edu.asu.diging.vspace.core.model.impl.ExhibitionLanguage; | ||
import edu.asu.diging.vspace.core.model.impl.LocalizedText; | ||
import edu.asu.diging.vspace.web.staff.forms.LocalizedTextForm; | ||
|
||
@Service | ||
@Transactional | ||
public class LocalizedTextFactory implements ILocalizedTextFactory { | ||
|
||
@Autowired | ||
private LocalizedTextRepository localizedTextRepo; | ||
|
||
@Autowired | ||
private ExhibitionLanguageRepository exhibitionLanguageRepository; | ||
|
||
/** | ||
* Adds localized text (names or descriptions) to the specified list. | ||
* | ||
* @param entity The entity (slide or space) to which the details will be added. | ||
* @param localizedTextFormData The localized text form containing the details to be added. | ||
* @param detailList The list in the entity where the details will be added (e.g., slideNames, spaceNames). | ||
*/ | ||
@Override | ||
public LocalizedText createLocalizedText(Object entity, LocalizedTextForm localizedTextFormData, List<ILocalizedText> detailList) { | ||
if (StringUtils.isEmpty(localizedTextFormData.getText())) { | ||
return null; | ||
} | ||
LocalizedText localizedText = localizedTextRepo.findById(localizedTextFormData.getLocalizedTextId()).orElse(null); | ||
if (localizedText != null) { | ||
localizedText.setText(localizedTextFormData.getText()); | ||
} else { | ||
ExhibitionLanguage exhibitionLanguage = exhibitionLanguageRepository.findById(localizedTextFormData.getExhibitionLanguageId()).orElse(null); | ||
if (exhibitionLanguage != null) { | ||
localizedText = new LocalizedText(exhibitionLanguage, localizedTextFormData.getText()); | ||
} | ||
detailList.add(localizedText); | ||
} | ||
|
||
return localizedText; | ||
} | ||
} |
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
7 changes: 5 additions & 2 deletions
7
vspace/src/main/java/edu/asu/diging/vspace/core/model/IExhibitionLanguage.java
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package edu.asu.diging.vspace.core.model; | ||
|
||
|
||
public interface IExhibitionLanguage extends IVSpaceElement { | ||
|
||
String getCode(); | ||
|
||
String getLabel(); | ||
|
||
void setLabel(String label); | ||
|
||
boolean isDefault(); | ||
|
||
void setDefault(boolean isDefault); | ||
void setDefault(boolean isDefault); | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
vspace/src/main/java/edu/asu/diging/vspace/core/model/ILocalizedText.java
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,16 @@ | ||
package edu.asu.diging.vspace.core.model; | ||
|
||
import edu.asu.diging.vspace.core.model.impl.ExhibitionLanguage; | ||
|
||
public interface ILocalizedText { | ||
String getId(); | ||
|
||
String getText(); | ||
|
||
void setText(String text); | ||
|
||
ExhibitionLanguage getExhibitionLanguage(); | ||
|
||
void setExhibitionLanguage( ExhibitionLanguage exhibitionLanguage); | ||
|
||
} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made this change to resolve codefactor issue