Skip to content
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

UFAL/configure special steps #697

Merged
merged 6 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,12 @@
import org.dspace.content.RelationshipType;
import org.dspace.content.WorkspaceItem;
import org.dspace.content.authority.Choices;
import org.dspace.content.authority.service.ChoiceAuthorityService;
import org.dspace.content.authority.service.MetadataAuthorityService;
import org.dspace.content.service.BitstreamService;
import org.dspace.content.service.ItemService;
import org.dspace.content.service.RelationshipTypeService;
import org.dspace.core.Constants;
import org.dspace.eperson.Group;
import org.dspace.services.ConfigurationService;
import org.dspace.services.factory.DSpaceServicesFactory;
import org.dspace.util.SimpleMapConverter;
import org.hamcrest.Matchers;
import org.junit.Before;
Expand All @@ -67,12 +64,6 @@ public class LinksetRestControllerIT extends AbstractControllerIntegrationTest {
@Autowired
private ConfigurationService configurationService;

@Autowired
private MetadataAuthorityService metadataAuthorityService;

@Autowired
private ChoiceAuthorityService choiceAuthorityService;

@Autowired
private ItemService itemService;

Expand Down Expand Up @@ -735,10 +726,6 @@ public void findTypedLinkForBitstream() throws Exception {
.andExpect(jsonPath("$[?(@.href == '" + uiUrl + "/signposting/linksets/" + item.getID() + "/json" +
"' && @.rel == 'linkset' " +
"&& @.type == 'application/linkset+json')]").exists());

DSpaceServicesFactory.getInstance().getConfigurationService().reloadConfig();
metadataAuthorityService.clearCache();
choiceAuthorityService.clearCache();
}

@Test
Expand Down Expand Up @@ -780,10 +767,6 @@ public void findTypedLinkForBitstreamWithType() throws Exception {
"&& @.type == 'application/linkset+json')]").exists())
.andExpect(jsonPath("$[?(@.href == 'https://schema.org/ScholarlyArticle' " +
"&& @.rel == 'type')]").exists());

DSpaceServicesFactory.getInstance().getConfigurationService().reloadConfig();
metadataAuthorityService.clearCache();
choiceAuthorityService.clearCache();
}

@Test
Expand Down Expand Up @@ -813,10 +796,6 @@ public void findTypedLinkForRestrictedBitstream() throws Exception {

getClient().perform(get("/signposting/links/" + bitstream.getID()))
.andExpect(status().isUnauthorized());

DSpaceServicesFactory.getInstance().getConfigurationService().reloadConfig();
metadataAuthorityService.clearCache();
choiceAuthorityService.clearCache();
}

@Test
Expand Down Expand Up @@ -844,10 +823,6 @@ public void findTypedLinkForBitstreamUnderEmbargo() throws Exception {

getClient().perform(get("/signposting/links/" + bitstream.getID()))
.andExpect(status().isUnauthorized());

DSpaceServicesFactory.getInstance().getConfigurationService().reloadConfig();
metadataAuthorityService.clearCache();
choiceAuthorityService.clearCache();
}

@Test
Expand All @@ -874,10 +849,6 @@ public void findTypedLinkForBitstreamOfWorkspaceItem() throws Exception {

getClient().perform(get("/signposting/links/" + bitstream.getID()))
.andExpect(status().isUnauthorized());

DSpaceServicesFactory.getInstance().getConfigurationService().reloadConfig();
metadataAuthorityService.clearCache();
choiceAuthorityService.clearCache();
}

@Test
Expand All @@ -890,10 +861,6 @@ public void findTypedLinkForUnDiscoverableItem() throws Exception {

getClient().perform(get("/signposting/links/" + item.getID()))
.andExpect(status().isUnauthorized());

DSpaceServicesFactory.getInstance().getConfigurationService().reloadConfig();
metadataAuthorityService.clearCache();
choiceAuthorityService.clearCache();
}

@Test
Expand Down
9 changes: 9 additions & 0 deletions dspace/config/item-submission.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@
<processing-class>org.dspace.app.rest.submit.step.DescribeStep</processing-class>
<type>submission-form</type>
</step-definition>
<step-definition id="specialFields" mandatory="true">
<heading>submit.progressbar.describe.stepone</heading>
<processing-class>org.dspace.app.rest.submit.step.DescribeStep</processing-class>
<type>submission-form</type>
</step-definition>
</step-definitions>

<!-- The submission-definitions map lays out the detailed definition of -->
Expand Down Expand Up @@ -323,6 +328,7 @@
<!--Step will be to Sign off on the required DSpace License agreement -->
<step id="license"/>
<step id="clarin-license"/>
<step id="specialFields"/>
</submission-process>

<!--
Expand Down Expand Up @@ -442,6 +448,7 @@
<step id="upload"/>
<step id="license"/>
<step id="clarin-license"/>
<step id="specialFields"/>
</submission-process>

<submission-process name="clariahSubmissions">
Expand All @@ -453,6 +460,7 @@
<step id="upload"/>
<step id="license"/>
<step id="clarin-license"/>
<step id="specialFields"/>
</submission-process>

<submission-process name="teachingSubmissions">
Expand All @@ -464,6 +472,7 @@
<step id="upload"/>
<step id="license"/>
<step id="clarin-license"/>
<step id="specialFields"/>
</submission-process>
</submission-definitions>

Expand Down
46 changes: 46 additions & 0 deletions dspace/config/submission-forms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2089,6 +2089,52 @@
</row>
</form>

<form name="specialFields">
<row>
<field>
<dc-schema>local</dc-schema>
<dc-element>submission</dc-element>
<dc-qualifier>note</dc-qualifier>
<repeatable>false</repeatable>
<label>Note</label>
<input-type>textarea</input-type>
<hint>Leave a note for the editors/reviewers</hint>
<required></required>
</field>
</row>

<row>
<!-- DC.Relation.Replaces -->
<field>
<dc-schema>dc</dc-schema>
<dc-element>relation</dc-element>
<dc-qualifier>replaces</dc-qualifier>
<repeatable>true</repeatable>
<label>Replaces</label>
<input-type>onebox</input-type>
<hint>URL to a related resource that is supplanted, displaced, or superseded by the described resource. If the replaced resource is in this repository start typing its name or handle and select the resource from the autocomplete popup.</hint>
<required/>
</field>
</row>

<row>
<!-- DC.Relation.IsReplacedBy -->
<field>
<dc-schema>dc</dc-schema>
<dc-element>relation</dc-element>
<dc-qualifier>isreplacedby</dc-qualifier>
<repeatable>true</repeatable>
<label>Is replaced by</label>
<input-type>onebox</input-type>
<hint>A related resource that supplants, displaces, or supersedes the described resource.</hint>
<required/>
<acl>
policy=deny,action=read,grantee-type=user,grantee-id=*
</acl>
</field>
</row>
</form>

</form-definitions>


Expand Down
46 changes: 46 additions & 0 deletions dspace/config/submission-forms_cs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,52 @@
</row>
</form>

<form name="specialFields">
<row>
<field>
<dc-schema>local</dc-schema>
<dc-element>submission</dc-element>
<dc-qualifier>note</dc-qualifier>
<repeatable>false</repeatable>
<label>Vzkaz</label>
<input-type>textarea</input-type>
<hint>Zde můžete zanechat vzkaz editorům.</hint>
<required></required>
</field>
</row>

<row>
<!-- DC.Relation.Replaces -->
<field>
<dc-schema>dc</dc-schema>
<dc-element>relation</dc-element>
<dc-qualifier>replaces</dc-qualifier>
<repeatable>true</repeatable>
<label>Replaces</label>
<input-type>onebox</input-type>
<hint>URL příbuzného záznamu, který je tímto záznamem nahrazen. Pokud je příbuzný záznam v tomto repozitáři, začněte psát jeho název, nebo handle a vyberte záznam z nabídky.</hint>
<required/>
</field>
</row>

<row>
<!-- DC.Relation.IsReplacedBy -->
<field>
<dc-schema>dc</dc-schema>
<dc-element>relation</dc-element>
<dc-qualifier>isreplacedby</dc-qualifier>
<repeatable>true</repeatable>
<label>Is replaced by</label>
<input-type>onebox</input-type>
<hint>Příbuzný záznam, který nahrazuje tento.</hint>
<required/>
<acl>
policy=deny,action=read,grantee-type=user,grantee-id=*
</acl>
</field>
</row>
</form>

</form-definitions>


Expand Down
2 changes: 1 addition & 1 deletion scripts/fast-build/config-update.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ xcopy /e /h /i /q /y %dspace_source%\dspace\config\ %dspace_application%\config\

cd %dspace_source%\scripts\fast-build\

call update-solr-configsets.bat
REM call update-solr-configsets.bat
Loading