mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 04:53:16 +00:00
[Task 72232] added javadoc
This commit is contained in:
@@ -248,6 +248,13 @@ public class Curation extends DSpaceRunnable<CurationScriptConfiguration> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method will assign the currentUser to the {@link Context} variable which is also created in this method.
|
||||||
|
* The instance of the method in this class will fetch the EPersonIdentifier from this class, this identifier
|
||||||
|
* was given to this class upon instantiation, it'll then be used to find the {@link EPerson} associated with it
|
||||||
|
* and this {@link EPerson} will be set as the currentUser of the created {@link Context}
|
||||||
|
* @throws ParseException If something went wrong with the retrieval of the EPerson Identifier
|
||||||
|
*/
|
||||||
protected void assignCurrentUserInContext() throws ParseException {
|
protected void assignCurrentUserInContext() throws ParseException {
|
||||||
UUID currentUserUuid = this.getEpersonIdentifier();
|
UUID currentUserUuid = this.getEpersonIdentifier();
|
||||||
try {
|
try {
|
||||||
|
@@ -13,8 +13,19 @@ import org.apache.commons.cli.ParseException;
|
|||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.eperson.EPerson;
|
import org.dspace.eperson.EPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the CLI version of the {@link Curation} script.
|
||||||
|
* This will only be called when the curate script is called from a commandline instance.
|
||||||
|
*/
|
||||||
public class CurationCli extends Curation {
|
public class CurationCli extends Curation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the overridden instance of the {@link Curation#assignCurrentUserInContext()} method in the parent class
|
||||||
|
* {@link Curation}.
|
||||||
|
* This is done so that the CLI version of the Script is able to retrieve its currentUser from the -e flag given
|
||||||
|
* with the parameters of the Script.
|
||||||
|
* @throws ParseException If the e flag was not given to the parameters when calling the script
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected void assignCurrentUserInContext() throws ParseException {
|
protected void assignCurrentUserInContext() throws ParseException {
|
||||||
if (this.commandLine.hasOption('e')) {
|
if (this.commandLine.hasOption('e')) {
|
||||||
|
@@ -9,6 +9,10 @@ package org.dspace.curate;
|
|||||||
|
|
||||||
import org.apache.commons.cli.Options;
|
import org.apache.commons.cli.Options;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the CLI version of the {@link CurationScriptConfiguration} class that handles the configuration for the
|
||||||
|
* {@link CurationCli} script
|
||||||
|
*/
|
||||||
public class CurationCliScriptConfiguration extends CurationScriptConfiguration<Curation> {
|
public class CurationCliScriptConfiguration extends CurationScriptConfiguration<Curation> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -45,6 +45,11 @@ public enum CurationClientOptions {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method will create all the possible Options for the {@link Curation} script.
|
||||||
|
* This will be used by {@link CurationScriptConfiguration}
|
||||||
|
* @return The options for the {@link Curation} script
|
||||||
|
*/
|
||||||
protected static Options constructOptions() {
|
protected static Options constructOptions() {
|
||||||
Options options = new Options();
|
Options options = new Options();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user