mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 10:04:21 +00:00
fix typos and some whitespace
* fixes typos almost exclusively in comments and strings * fixes whitespace where combination of tabs and spaces may break indentation * doesn't touch typos in config property names to prevent breakage
This commit is contained in:
@@ -388,7 +388,7 @@ public class ItemExport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discover the different schemas in use and output a seperate metadata XML
|
* Discover the different schemas in use and output a separate metadata XML
|
||||||
* file for each schema.
|
* file for each schema.
|
||||||
*
|
*
|
||||||
* @param c
|
* @param c
|
||||||
@@ -914,7 +914,7 @@ public class ItemExport
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// nothing to do just ignore this type of DSPaceObject
|
// nothing to do just ignore this type of DSpaceObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -746,7 +746,7 @@ public class ItemImport
|
|||||||
+ File.separatorChar);
|
+ File.separatorChar);
|
||||||
|
|
||||||
// and the bitstreams from the contents file
|
// and the bitstreams from the contents file
|
||||||
// process contents file, add bistreams and bundles, return any
|
// process contents file, add bitstreams and bundles, return any
|
||||||
// non-standard permissions
|
// non-standard permissions
|
||||||
List<String> options = processContentsFile(c, myitem, path
|
List<String> options = processContentsFile(c, myitem, path
|
||||||
+ File.separatorChar + itemname, "contents");
|
+ File.separatorChar + itemname, "contents");
|
||||||
|
@@ -604,7 +604,7 @@ public class GoogleMetadata
|
|||||||
for (DCValue v : allMD)
|
for (DCValue v : allMD)
|
||||||
{
|
{
|
||||||
|
|
||||||
// De-dup multiple occurances of field names in item
|
// De-dup multiple occurrences of field names in item
|
||||||
if (!expandedDC.contains(buildFieldName(v)))
|
if (!expandedDC.contains(buildFieldName(v)))
|
||||||
{
|
{
|
||||||
expandedDC.add(buildFieldName(v));
|
expandedDC.add(buildFieldName(v));
|
||||||
@@ -1156,7 +1156,7 @@ public class GoogleMetadata
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Otherwise, add it as the first occurance of this field
|
// Otherwise, add it as the first occurrence of this field
|
||||||
ArrayList<String> newField = new ArrayList<String>();
|
ArrayList<String> newField = new ArrayList<String>();
|
||||||
newField.add(parsedPair[1].trim());
|
newField.add(parsedPair[1].trim());
|
||||||
mdPairs.put(parsedPair[0].trim(), newField);
|
mdPairs.put(parsedPair[0].trim(), newField);
|
||||||
|
@@ -517,7 +517,7 @@ public class SyndicationFeed
|
|||||||
*
|
*
|
||||||
* If the dspaceobject is null then a local url to the repository is generated.
|
* If the dspaceobject is null then a local url to the repository is generated.
|
||||||
*
|
*
|
||||||
* @param dso The object to refrence, null if to the repository.
|
* @param dso The object to reference, null if to the repository.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String baseURL = null; // cache the result for null
|
private String baseURL = null; // cache the result for null
|
||||||
|
@@ -91,7 +91,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
* is a unique identifier from the IdP that identifies a particular user. The
|
* is a unique identifier from the IdP that identifies a particular user. The
|
||||||
* NetID can be of almost any form such as a unique integer, string, or with
|
* NetID can be of almost any form such as a unique integer, string, or with
|
||||||
* Shibboleth 2.0 you can use "targeted ids". You will need to coordinate with
|
* Shibboleth 2.0 you can use "targeted ids". You will need to coordinate with
|
||||||
* your shibboleth federation or identity provider. There are three ways to
|
* your Shibboleth federation or identity provider. There are three ways to
|
||||||
* supply identity information to DSpace:
|
* supply identity information to DSpace:
|
||||||
*
|
*
|
||||||
* 1) NetID from Shibboleth Header (best)
|
* 1) NetID from Shibboleth Header (best)
|
||||||
@@ -117,14 +117,14 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
*
|
*
|
||||||
* If you are currently using Email based authentication (either 1 or 2) and
|
* If you are currently using Email based authentication (either 1 or 2) and
|
||||||
* want to upgrade to NetID based authentication then there is an easy path.
|
* want to upgrade to NetID based authentication then there is an easy path.
|
||||||
* Simply enable shibboleth to pass the NetID attribute and set the netid-header
|
* Simply enable Shibboleth to pass the NetID attribute and set the netid-header
|
||||||
* below to the correct value. When a user attempts to log in to DSpace first
|
* below to the correct value. When a user attempts to log in to DSpace first
|
||||||
* DSpace will look for an EPerson with the passed NetID, however when this
|
* DSpace will look for an EPerson with the passed NetID, however when this
|
||||||
* fails DSpace will fall back to email based authentication. Then DSpace will
|
* fails DSpace will fall back to email based authentication. Then DSpace will
|
||||||
* update the user's EPerson account record to set their netted so all future
|
* update the user's EPerson account record to set their netid so all future
|
||||||
* authentications for this user will be based upon netted. One thing to note
|
* authentications for this user will be based upon netid. One thing to note
|
||||||
* is that DSpace will prevent an account from switching NetIDs. If an account
|
* is that DSpace will prevent an account from switching NetIDs. If an account
|
||||||
* all ready has a NetID set and then they try and authenticate with a
|
* already has a NetID set and then they try and authenticate with a
|
||||||
* different NetID the authentication will fail.
|
* different NetID the authentication will fail.
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context
|
||||||
@@ -159,17 +159,17 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
public int authenticate(Context context, String username, String password,
|
public int authenticate(Context context, String username, String password,
|
||||||
String realm, HttpServletRequest request) throws SQLException {
|
String realm, HttpServletRequest request) throws SQLException {
|
||||||
|
|
||||||
// Check if sword compatability is allowed, and if so see if we can
|
// Check if sword compatibility is allowed, and if so see if we can
|
||||||
// authenticate based upon a username and password. This is really helpfull
|
// authenticate based upon a username and password. This is really helpful
|
||||||
// if your repo uses shibboleth but you want some accounts to be able use
|
// if your repo uses Shibboleth but you want some accounts to be able use
|
||||||
// sword. This allows this compatability without installing the password-based
|
// sword. This allows this compatibility without installing the password-based
|
||||||
// authentication method which has side effects such as allowing users to login
|
// authentication method which has side effects such as allowing users to login
|
||||||
// with a username and password from the webui.
|
// with a username and password from the webui.
|
||||||
boolean swordCompatability = ConfigurationManager.getBooleanProperty("authentication-shibboleth","sword.compatability", true);
|
boolean swordCompatibility = ConfigurationManager.getBooleanProperty("authentication-shibboleth","sword.compatibility", true);
|
||||||
if ( swordCompatability &&
|
if ( swordCompatibility &&
|
||||||
username != null && username.length() > 0 &&
|
username != null && username.length() > 0 &&
|
||||||
password != null && password.length() > 0 ) {
|
password != null && password.length() > 0 ) {
|
||||||
return swordCompatability(context, username, password, request);
|
return swordCompatibility(context, username, password, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request == null) {
|
if (request == null) {
|
||||||
@@ -185,7 +185,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Starting Shibboleth Authentication");
|
log.debug("Starting Shibboleth Authentication");
|
||||||
|
|
||||||
String message = "Recieved the following headers:\n";
|
String message = "Received the following headers:\n";
|
||||||
Enumeration<String> headerNames = request.getHeaderNames();
|
Enumeration<String> headerNames = request.getHeaderNames();
|
||||||
while (headerNames.hasMoreElements()) {
|
while (headerNames.hasMoreElements()) {
|
||||||
String headerName = headerNames.nextElement();
|
String headerName = headerNames.nextElement();
|
||||||
@@ -247,7 +247,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
* the pre-defined DSpace group, so if the user loses their affiliation then the
|
* the pre-defined DSpace group, so if the user loses their affiliation then the
|
||||||
* next time they login they will no longer be in the group.
|
* next time they login they will no longer be in the group.
|
||||||
*
|
*
|
||||||
* Depending upon the shibboleth attributed use in the role-header it may be
|
* Depending upon the shibboleth attributed use in the role-header, it may be
|
||||||
* scoped. Scoped is shibboleth terminology for identifying where an attribute
|
* scoped. Scoped is shibboleth terminology for identifying where an attribute
|
||||||
* originated from. For example a students affiliation may be encoded as
|
* originated from. For example a students affiliation may be encoded as
|
||||||
* "student@tamu.edu". The part after the @ sign is the scope, and the preceding
|
* "student@tamu.edu". The part after the @ sign is the scope, and the preceding
|
||||||
@@ -275,14 +275,14 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
public int[] getSpecialGroups(Context context, HttpServletRequest request)
|
public int[] getSpecialGroups(Context context, HttpServletRequest request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
// User has not successfully authenticated via shibboleth.
|
// User has not successfuly authenticated via shibboleth.
|
||||||
if ( request == null ||
|
if ( request == null ||
|
||||||
context.getCurrentUser() == null ||
|
context.getCurrentUser() == null ||
|
||||||
request.getSession().getAttribute("shib.authenticated") == null ) {
|
request.getSession().getAttribute("shib.authenticated") == null ) {
|
||||||
return new int[0];
|
return new int[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have all ready calculated the special groups then return them.
|
// If we have already calculated the special groups then return them.
|
||||||
if (request.getSession().getAttribute("shib.specialgroup") != null)
|
if (request.getSession().getAttribute("shib.specialgroup") != null)
|
||||||
{
|
{
|
||||||
log.debug("Returning cached special groups.");
|
log.debug("Returning cached special groups.");
|
||||||
@@ -310,11 +310,11 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
log.debug("Found Shibboleth role header: '"+roleHeader+"' = '"+affiliations+"'");
|
log.debug("Found Shibboleth role header: '"+roleHeader+"' = '"+affiliations+"'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop through each affilition
|
// Loop through each affiliation
|
||||||
Set<Integer> groups = new HashSet<Integer>();
|
Set<Integer> groups = new HashSet<Integer>();
|
||||||
if (affiliations != null) {
|
if (affiliations != null) {
|
||||||
for ( String affiliation : affiliations) {
|
for ( String affiliation : affiliations) {
|
||||||
// If we ignore the affilation's scope then strip the scope if it exists.
|
// If we ignore the affiliation's scope then strip the scope if it exists.
|
||||||
if (ignoreScope) {
|
if (ignoreScope) {
|
||||||
int index = affiliation.indexOf('@');
|
int index = affiliation.indexOf('@');
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
@@ -355,8 +355,8 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
log.error("Exception thrown while trying to lookup affiliation role for group name: '"+names[i].trim()+"'",sqle);
|
log.error("Exception thrown while trying to lookup affiliation role for group name: '"+names[i].trim()+"'",sqle);
|
||||||
}
|
}
|
||||||
} // for each groupNames
|
} // for each groupNames
|
||||||
} // foreach affilations
|
} // foreach affiliations
|
||||||
} // if affilaitons
|
} // if affiliations
|
||||||
|
|
||||||
|
|
||||||
log.info("Added current EPerson to special groups: "+groups);
|
log.info("Added current EPerson to special groups: "+groups);
|
||||||
@@ -538,8 +538,8 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Identify an existing EPerson based upon the shibboleth attributes provided on
|
* Identify an existing EPerson based upon the shibboleth attributes provided on
|
||||||
* the request object. There are three case underwhich this can occure each in
|
* the request object. There are three cases where this can occurr, each as
|
||||||
* a fall back position to the previous method.
|
* a fallback for the previous method.
|
||||||
*
|
*
|
||||||
* 1) NetID from Shibboleth Header (best)
|
* 1) NetID from Shibboleth Header (best)
|
||||||
* The NetID-based method is superior because users may change their email
|
* The NetID-based method is superior because users may change their email
|
||||||
@@ -548,7 +548,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
*
|
*
|
||||||
* 2) Email address from Shibboleth Header (okay)
|
* 2) Email address from Shibboleth Header (okay)
|
||||||
* In the case where a NetID header is not available or not found DSpace
|
* In the case where a NetID header is not available or not found DSpace
|
||||||
* will fall back to identifying a user based-upon their email address.
|
* will fall back to identifying a user based upon their email address.
|
||||||
*
|
*
|
||||||
* 3) Tomcat's Remote User (worst)
|
* 3) Tomcat's Remote User (worst)
|
||||||
* In the event that neither Shibboleth headers are found then as a last
|
* In the event that neither Shibboleth headers are found then as a last
|
||||||
@@ -650,7 +650,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
*
|
*
|
||||||
* In order to create a new eperson object there is a minimal set of metadata
|
* In order to create a new eperson object there is a minimal set of metadata
|
||||||
* required: Email, First Name, and Last Name. If we don't have access to these
|
* required: Email, First Name, and Last Name. If we don't have access to these
|
||||||
* three peices of information then we will be unable to create a new eperson
|
* three pieces of information then we will be unable to create a new eperson
|
||||||
* object, such as the case when Tomcat's Remote User field is used to identify
|
* object, such as the case when Tomcat's Remote User field is used to identify
|
||||||
* a particular user.
|
* a particular user.
|
||||||
*
|
*
|
||||||
@@ -688,7 +688,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
return null; // TODO should this throw an exception?
|
return null; // TODO should this throw an exception?
|
||||||
}
|
}
|
||||||
|
|
||||||
// Truncate values parameters that are too big.
|
// Truncate values of parameters that are too big.
|
||||||
if (fname.length() > NAME_MAX_SIZE) {
|
if (fname.length() > NAME_MAX_SIZE) {
|
||||||
log.warn("Truncating eperson's first name because it is longer than "+NAME_MAX_SIZE+": '"+fname+"'");
|
log.warn("Truncating eperson's first name because it is longer than "+NAME_MAX_SIZE+": '"+fname+"'");
|
||||||
fname = fname.substring(0,NAME_MAX_SIZE);
|
fname = fname.substring(0,NAME_MAX_SIZE);
|
||||||
@@ -736,9 +736,9 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* After sucessfully authenticate a user this method will update the users attributes. The
|
* After we sucessfully authenticated a user, this method will update the users attributes. The
|
||||||
* user's email, name, or other attribute may have been changed since the last time they
|
* user's email, name, or other attribute may have been changed since the last time they
|
||||||
* logged into DSpace. This method will update the database with their most recient information.
|
* logged into DSpace. This method will update the database with their most recent information.
|
||||||
*
|
*
|
||||||
* This method handles the basic DSpace metadata (email, first name, last name) along with
|
* This method handles the basic DSpace metadata (email, first name, last name) along with
|
||||||
* additional metadata set using the setMetadata() methods on the eperson object. The
|
* additional metadata set using the setMetadata() methods on the eperson object. The
|
||||||
@@ -761,7 +761,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
String fname = findSingleHeader(request,fnameHeader);
|
String fname = findSingleHeader(request,fnameHeader);
|
||||||
String lname = findSingleHeader(request,lnameHeader);
|
String lname = findSingleHeader(request,lnameHeader);
|
||||||
|
|
||||||
// Truncate values parameters that are too big.
|
// Truncate values of parameters that are too big.
|
||||||
if (fname.length() > NAME_MAX_SIZE) {
|
if (fname.length() > NAME_MAX_SIZE) {
|
||||||
log.warn("Truncating eperson's first name because it is longer than "+NAME_MAX_SIZE+": '"+fname+"'");
|
log.warn("Truncating eperson's first name because it is longer than "+NAME_MAX_SIZE+": '"+fname+"'");
|
||||||
fname = fname.substring(0,NAME_MAX_SIZE);
|
fname = fname.substring(0,NAME_MAX_SIZE);
|
||||||
@@ -776,7 +776,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
// 1) Update the minimum metadata
|
// 1) Update the minimum metadata
|
||||||
if (netid != null && eperson.getNetid() == null)
|
if (netid != null && eperson.getNetid() == null)
|
||||||
// Only update the netid if none has been previously set. This can occur when a repo switches
|
// Only update the netid if none has been previously set. This can occur when a repo switches
|
||||||
// to netid based authentication. The current users do not have netids and fall back to email based
|
// to netid based authentication. The current users do not have netids and fall back to email-based
|
||||||
// identification but once they login we update their record and lock the account to a particular netid.
|
// identification but once they login we update their record and lock the account to a particular netid.
|
||||||
eperson.setNetid(netid);
|
eperson.setNetid(netid);
|
||||||
if (email != null)
|
if (email != null)
|
||||||
@@ -822,12 +822,12 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide password-based authentication to enable sword compatability.
|
* Provide password-based authentication to enable sword compatibility.
|
||||||
*
|
*
|
||||||
* Sword compatability will allow this authentication method to work when using
|
* Sword compatibility will allow this authentication method to work when using
|
||||||
* sword. Sort relies on username and password based authentication and is
|
* sword. Sword relies on username and password based authentication and is
|
||||||
* entirely incapable of supporting shibboleth. This option allows you to
|
* entirely incapable of supporting shibboleth. This option allows you to
|
||||||
* authenticate username and passwords for sword sessions with out adding
|
* authenticate username and passwords for sword sessions without adding
|
||||||
* another authentication method onto the stack. You will need to ensure that
|
* another authentication method onto the stack. You will need to ensure that
|
||||||
* a user has a password. One way to do that is to create the user via the
|
* a user has a password. One way to do that is to create the user via the
|
||||||
* create-administrator command line command and then edit their permissions.
|
* create-administrator command line command and then edit their permissions.
|
||||||
@@ -838,11 +838,11 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
* @param request The HTTP Request
|
* @param request The HTTP Request
|
||||||
* @return A valid DSpace Authentication Method status code.
|
* @return A valid DSpace Authentication Method status code.
|
||||||
*/
|
*/
|
||||||
protected int swordCompatability(Context context, String username, String password, HttpServletRequest request) throws SQLException {
|
protected int swordCompatibility(Context context, String username, String password, HttpServletRequest request) throws SQLException {
|
||||||
|
|
||||||
EPerson eperson = null;
|
EPerson eperson = null;
|
||||||
|
|
||||||
log.debug("Shibboleth Sword compatability activated.");
|
log.debug("Shibboleth Sword compatibility activated.");
|
||||||
try {
|
try {
|
||||||
eperson = EPerson.findByEmail(context, username.toLowerCase());
|
eperson = EPerson.findByEmail(context, username.toLowerCase());
|
||||||
} catch (AuthorizeException ae) {
|
} catch (AuthorizeException ae) {
|
||||||
@@ -867,7 +867,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
// Password matched
|
// Password matched
|
||||||
AuthenticationManager.initEPerson(context, request, eperson);
|
AuthenticationManager.initEPerson(context, request, eperson);
|
||||||
context.setCurrentUser(eperson);
|
context.setCurrentUser(eperson);
|
||||||
log.info(eperson.getEmail()+" has been authenticated via shibboleth using password-based sword compatability mode.");
|
log.info(eperson.getEmail()+" has been authenticated via shibboleth using password-based sword compatibility mode.");
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
// Passsword failure
|
// Passsword failure
|
||||||
@@ -884,7 +884,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
*
|
*
|
||||||
* During initalization the mapping of additional eperson metadata will be loaded from the DSpace.cfg
|
* During initalization the mapping of additional eperson metadata will be loaded from the DSpace.cfg
|
||||||
* and cached. While loading the metadata mapping this method will check the EPerson object to see
|
* and cached. While loading the metadata mapping this method will check the EPerson object to see
|
||||||
* if it suports the metadata field. If the field is not supported and autocreate is turned on then
|
* if it supports the metadata field. If the field is not supported and autocreate is turned on then
|
||||||
* the field will be automatically created.
|
* the field will be automatically created.
|
||||||
*
|
*
|
||||||
* It is safe to call this methods multiple times.
|
* It is safe to call this methods multiple times.
|
||||||
@@ -936,7 +936,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
log.debug("Loading additional eperson metadata mapping for: '"+header+"' = '"+name+"'");
|
log.debug("Loading additional eperson metadata mapping for: '"+header+"' = '"+name+"'");
|
||||||
map.put(header, name);
|
map.put(header, name);
|
||||||
} else {
|
} else {
|
||||||
// The field dosn't exist, and we can't use it.
|
// The field doesn't exist, and we can't use it.
|
||||||
log.error("Skipping the additional eperson metadata mapping for: '"+header+"' = '"+name+"' because the field is not supported by the current configuration.");
|
log.error("Skipping the additional eperson metadata mapping for: '"+header+"' = '"+name+"' because the field is not supported by the current configuration.");
|
||||||
}
|
}
|
||||||
} // foreach metadataStringList
|
} // foreach metadataStringList
|
||||||
@@ -947,9 +947,9 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the EPerson table deffinition to see if the metadata field name is supported. It
|
* Check the EPerson table definition to see if the metadata field name is supported. It
|
||||||
* checks for three things 1) that the field exists and 2) that the field is of the correct
|
* checks for three things 1) that the field exists and 2) that the field is of the correct
|
||||||
* type, varchar, and 3) that the field's size is suffcient.
|
* type, varchar, and 3) that the field's size is sufficient.
|
||||||
*
|
*
|
||||||
* If either of these checks fail then false is returned.
|
* If either of these checks fail then false is returned.
|
||||||
*
|
*
|
||||||
@@ -1019,7 +1019,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
* metadata field. All additional fields are created with type varchar( METADATA_MAX_SIZE )
|
* metadata field. All additional fields are created with type varchar( METADATA_MAX_SIZE )
|
||||||
*
|
*
|
||||||
* @param metadataName The name of the new metadata field.
|
* @param metadataName The name of the new metadata field.
|
||||||
* @return True if successfull, otherwise false.
|
* @return True if successful, otherwise false.
|
||||||
*/
|
*/
|
||||||
private static synchronized boolean autoCreateEpersonMetadataField(String metadataName) throws SQLException {
|
private static synchronized boolean autoCreateEpersonMetadataField(String metadataName) throws SQLException {
|
||||||
|
|
||||||
@@ -1064,7 +1064,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
* The header name uses a bit of fuzzy logic, so it will first try case
|
* The header name uses a bit of fuzzy logic, so it will first try case
|
||||||
* sensitive, then it will try lowercase, and finally it will try uppercase.
|
* sensitive, then it will try lowercase, and finally it will try uppercase.
|
||||||
*
|
*
|
||||||
* This method will not interpret the header value in anyway.
|
* This method will not interpret the header value in any way.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @param request The HTTP request to look for headers values on.
|
* @param request The HTTP request to look for headers values on.
|
||||||
@@ -1103,8 +1103,8 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
|
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
// If there are multiple values encodded in the shibboleth attribute
|
// If there are multiple values encoded in the shibboleth attribute
|
||||||
// they are seperated by a semicolon, and any semicolons in the
|
// they are separated by a semicolon, and any semicolons in the
|
||||||
// attribute are escaped with a backslash. For this case we are just
|
// attribute are escaped with a backslash. For this case we are just
|
||||||
// looking for the first attribute so we scan the value until we find
|
// looking for the first attribute so we scan the value until we find
|
||||||
// the first unescaped semicolon and chop off everything else.
|
// the first unescaped semicolon and chop off everything else.
|
||||||
@@ -1127,7 +1127,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
/**
|
/**
|
||||||
* Find a particular Shibboleth header value and return the all values.
|
* Find a particular Shibboleth header value and return the all values.
|
||||||
* The header name uses a bit of fuzzy logic, so it will first try case
|
* The header name uses a bit of fuzzy logic, so it will first try case
|
||||||
* sensitive, then it will try lowercase, and finaly it will try uppercase.
|
* sensitive, then it will try lowercase, and finally it will try uppercase.
|
||||||
*
|
*
|
||||||
* Shibboleth attributes may contain multiple values separated by a
|
* Shibboleth attributes may contain multiple values separated by a
|
||||||
* semicolon and semicolons are escaped with a backslash. This method will
|
* semicolon and semicolons are escaped with a backslash. This method will
|
||||||
@@ -1145,7 +1145,7 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
if (values == null)
|
if (values == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// Shibboleth attributes are seperated by semicolons (and semicolons are
|
// Shibboleth attributes are separated by semicolons (and semicolons are
|
||||||
// escaped with a backslash). So here we will scan through the string and
|
// escaped with a backslash). So here we will scan through the string and
|
||||||
// split on any unescaped semicolons.
|
// split on any unescaped semicolons.
|
||||||
List<String> valueList = new ArrayList<String>();
|
List<String> valueList = new ArrayList<String>();
|
||||||
@@ -1186,32 +1186,3 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -592,7 +592,7 @@ public final class BrowseIndex
|
|||||||
/**
|
/**
|
||||||
* Is the browse index of display type single?
|
* Is the browse index of display type single?
|
||||||
*
|
*
|
||||||
* @return true if singe, false if not
|
* @return true if single, false if not
|
||||||
*/
|
*/
|
||||||
public boolean isMetadataIndex()
|
public boolean isMetadataIndex()
|
||||||
{
|
{
|
||||||
|
@@ -430,11 +430,11 @@ public final class BitstreamInfoDAO extends DAOSupport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the oldest bistream that in the set of bitstreams that are less
|
* Returns the oldest bitstream that in the set of bitstreams that are less
|
||||||
* than the specified date. If no bitstreams are found -1 is returned.
|
* than the specified date. If no bitstreams are found -1 is returned.
|
||||||
*
|
*
|
||||||
* @param lessThanDate
|
* @param lessThanDate
|
||||||
* @return id of olded bitstream or -1 if not bistreams are found
|
* @return id of olded bitstream or -1 if not bitstreams are found
|
||||||
*/
|
*/
|
||||||
public int getOldestBitstream(Timestamp lessThanDate)
|
public int getOldestBitstream(Timestamp lessThanDate)
|
||||||
{
|
{
|
||||||
|
@@ -128,7 +128,7 @@ public class InstallItem
|
|||||||
// are not set then set them to today.
|
// are not set then set them to today.
|
||||||
DCDate now = DCDate.getCurrent();
|
DCDate now = DCDate.getCurrent();
|
||||||
|
|
||||||
// If the item dosn't have a date.accessioned create one.
|
// If the item doesn't have a date.accessioned create one.
|
||||||
DCValue[] dateAccessioned = item.getDC("date", "accessioned", Item.ANY);
|
DCValue[] dateAccessioned = item.getDC("date", "accessioned", Item.ANY);
|
||||||
if (dateAccessioned.length == 0)
|
if (dateAccessioned.length == 0)
|
||||||
{
|
{
|
||||||
@@ -156,7 +156,7 @@ public class InstallItem
|
|||||||
String handleref = HandleManager.getCanonicalForm(handle);
|
String handleref = HandleManager.getCanonicalForm(handle);
|
||||||
|
|
||||||
// Add handle as identifier.uri DC value.
|
// Add handle as identifier.uri DC value.
|
||||||
// First check that identifier dosn't already exist.
|
// First check that identifier doesn't already exist.
|
||||||
boolean identifierExists = false;
|
boolean identifierExists = false;
|
||||||
DCValue[] identifiers = item.getDC("identifier", "uri", Item.ANY);
|
DCValue[] identifiers = item.getDC("identifier", "uri", Item.ANY);
|
||||||
for (DCValue identifier : identifiers)
|
for (DCValue identifier : identifiers)
|
||||||
|
@@ -18,7 +18,7 @@ package org.dspace.content.authority;
|
|||||||
public interface ChoiceAuthority
|
public interface ChoiceAuthority
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get all values from the authority that match the profferred value.
|
* Get all values from the authority that match the preferred value.
|
||||||
* Note that the offering was entered by the user and may contain
|
* Note that the offering was entered by the user and may contain
|
||||||
* mixed/incorrect case, whitespace, etc so the plugin should be careful
|
* mixed/incorrect case, whitespace, etc so the plugin should be careful
|
||||||
* to clean up user data before making comparisons.
|
* to clean up user data before making comparisons.
|
||||||
|
@@ -260,7 +260,7 @@ public class XSLTDisseminationCrosswalk
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return true if this crosswalk prefers the list form over an singe
|
* return true if this crosswalk prefers the list form over an single
|
||||||
* element, otherwise false.
|
* element, otherwise false.
|
||||||
*
|
*
|
||||||
* @see DisseminationCrosswalk
|
* @see DisseminationCrosswalk
|
||||||
|
@@ -1537,7 +1537,7 @@ public abstract class AbstractMETSDisseminator
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //no Handle assigned, so persistent(-ish) URI for bitstream is
|
{ //no Handle assigned, so persistent(-ish) URI for bitstream is
|
||||||
// Format: {site-base-url}/retrieve/{bistream-internal-id}
|
// Format: {site-base-url}/retrieve/{bitstream-internal-id}
|
||||||
return ConfigurationManager
|
return ConfigurationManager
|
||||||
.getProperty("dspace.url")
|
.getProperty("dspace.url")
|
||||||
+ "/retrieve/"
|
+ "/retrieve/"
|
||||||
|
@@ -776,7 +776,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester
|
|||||||
// retrieve bundle name from manifest
|
// retrieve bundle name from manifest
|
||||||
String bundleName = METSManifest.getBundleName(mfile);
|
String bundleName = METSManifest.getBundleName(mfile);
|
||||||
|
|
||||||
// Find or create the bundle where bitstrem should be attached
|
// Find or create the bundle where bitstream should be attached
|
||||||
Bundle bundle;
|
Bundle bundle;
|
||||||
Bundle bns[] = item.getBundles(bundleName);
|
Bundle bns[] = item.getBundles(bundleName);
|
||||||
if (bns != null && bns.length > 0)
|
if (bns != null && bns.length > 0)
|
||||||
|
@@ -422,7 +422,7 @@ public class METSManifest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// translate bundle name from METS to DSpace; METS may be "CONTENT"
|
// translate bundle name from METS to DSpace; METS may be "CONTENT"
|
||||||
// or "ORIGINAL" for the DSPace "ORIGINAL", rest are left alone.
|
// or "ORIGINAL" for the DSpace "ORIGINAL", rest are left alone.
|
||||||
private static String normalizeBundleName(String in)
|
private static String normalizeBundleName(String in)
|
||||||
{
|
{
|
||||||
if (in.equals("CONTENT"))
|
if (in.equals("CONTENT"))
|
||||||
|
@@ -248,11 +248,11 @@ public class PDFPackager
|
|||||||
PackageUtils.createFile(pkgFile);
|
PackageUtils.createFile(pkgFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
//open up output stream to copy bistream to file
|
//open up output stream to copy bitstream to file
|
||||||
FileOutputStream out = null;
|
FileOutputStream out = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//open up output stream to copy bistream to file
|
//open up output stream to copy bitstream to file
|
||||||
out = new FileOutputStream(pkgFile);
|
out = new FileOutputStream(pkgFile);
|
||||||
Utils.copy(pkgBs.retrieve(), out);
|
Utils.copy(pkgBs.retrieve(), out);
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
* 'invocation mode' - optionally set by the caller on the curation object.
|
* 'invocation mode' - optionally set by the caller on the curation object.
|
||||||
* Thus, it effectively means that if a task is iterating over a collection,
|
* Thus, it effectively means that if a task is iterating over a collection,
|
||||||
* the first error, or failure will halt the process.
|
* the first error, or failure will halt the process.
|
||||||
* This insures that the status code and result of the failure are preserved.
|
* This ensures that the status code and result of the failure are preserved.
|
||||||
*
|
*
|
||||||
* @author richardrodgers
|
* @author richardrodgers
|
||||||
*/
|
*/
|
||||||
|
@@ -98,7 +98,7 @@ public class HandleManager
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Let the admin define a new prefix, if not then we'll use the
|
// Let the admin define a new prefix, if not then we'll use the
|
||||||
// CNRI default. This allows the admin to use "hdl:" if they want too or
|
// CNRI default. This allows the admin to use "hdl:" if they want to or
|
||||||
// use a locally branded prefix handle.myuni.edu.
|
// use a locally branded prefix handle.myuni.edu.
|
||||||
String handlePrefix = ConfigurationManager.getProperty("handle.canonical.prefix");
|
String handlePrefix = ConfigurationManager.getProperty("handle.canonical.prefix");
|
||||||
if (handlePrefix == null || handlePrefix.length() == 0)
|
if (handlePrefix == null || handlePrefix.length() == 0)
|
||||||
|
@@ -116,11 +116,11 @@ mail.admin = dspace-help@myu.edu
|
|||||||
# Recipient for new user registration emails
|
# Recipient for new user registration emails
|
||||||
# registration.notify = email-address-here
|
# registration.notify = email-address-here
|
||||||
|
|
||||||
# Set the default mail character set. This may be over ridden by providing a line
|
# Set the default mail character set. This may be overridden by providing a line
|
||||||
# inside the email template "charset: <encoding>", otherwise this default is used.
|
# inside the email template "charset: <encoding>", otherwise this default is used.
|
||||||
#mail.charset = UTF8
|
#mail.charset = UTF8
|
||||||
|
|
||||||
# A comma separated list of hostnames that are allowed to refer browsers to email forms.
|
# A comma-separated list of hostnames that are allowed to refer browsers to email forms.
|
||||||
# Default behaviour is to accept referrals only from dspace.hostname
|
# Default behaviour is to accept referrals only from dspace.hostname
|
||||||
#mail.allowed.referrers = localhost
|
#mail.allowed.referrers = localhost
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ assetstore.dir = ${dspace.dir}/assetstore
|
|||||||
# - a set of SRB account parameters (host, port, zone, domain, username,
|
# - a set of SRB account parameters (host, port, zone, domain, username,
|
||||||
# password, home directory, and resource)
|
# password, home directory, and resource)
|
||||||
#
|
#
|
||||||
# Should the be any conflict, like '2' refering to a local directory and
|
# Should there be any conflict, like '2' refering to a local directory and
|
||||||
# to a set of SRB parameters, the program will select the local directory.
|
# to a set of SRB parameters, the program will select the local directory.
|
||||||
#
|
#
|
||||||
# If SRB is chosen from the first install of DSpace, it is suggested that
|
# If SRB is chosen from the first install of DSpace, it is suggested that
|
||||||
@@ -506,7 +506,7 @@ plugin.named.org.dspace.content.packager.PackageIngester = \
|
|||||||
event.dispatcher.default.class = org.dspace.event.BasicDispatcher
|
event.dispatcher.default.class = org.dspace.event.BasicDispatcher
|
||||||
event.dispatcher.default.consumers = search, browse, eperson, harvester
|
event.dispatcher.default.consumers = search, browse, eperson, harvester
|
||||||
|
|
||||||
# The noindex dispatcher will not create search or browse indexs (usefull for batch item imports)
|
# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
|
||||||
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
|
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
|
||||||
event.dispatcher.noindex.consumers = eperson
|
event.dispatcher.noindex.consumers = eperson
|
||||||
|
|
||||||
@@ -575,7 +575,7 @@ org.dspace.app.itemexport.life.span.hours = 48
|
|||||||
org.dspace.app.itemexport.max.size = 200
|
org.dspace.app.itemexport.max.size = 200
|
||||||
|
|
||||||
|
|
||||||
# For backwards compatability, the subscription emails by default include any modified items
|
# For backwards compatibility, the subscription emails by default include any modified items
|
||||||
# uncomment the following entry for only new items to be emailed
|
# uncomment the following entry for only new items to be emailed
|
||||||
# eperson.subscription.onlynew = true
|
# eperson.subscription.onlynew = true
|
||||||
|
|
||||||
@@ -780,7 +780,7 @@ webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date
|
|||||||
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
|
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
|
||||||
|
|
||||||
# By default, the display of metadata in the browse indexes is case sensitive
|
# By default, the display of metadata in the browse indexes is case sensitive
|
||||||
# So, you will get seperate entries for the terms
|
# So, you will get separate entries for the terms
|
||||||
#
|
#
|
||||||
# Olive oil
|
# Olive oil
|
||||||
# olive oil
|
# olive oil
|
||||||
@@ -820,7 +820,7 @@ webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
|
|||||||
|
|
||||||
# Set the options for how the indexes are sorted
|
# Set the options for how the indexes are sorted
|
||||||
#
|
#
|
||||||
# All sort normalisations are carried out by the OrderFormatDelegate.
|
# All sorts of normalisations are carried out by the OrderFormatDelegate.
|
||||||
# The plugin manager can be used to specify your own delegates for each datatype.
|
# The plugin manager can be used to specify your own delegates for each datatype.
|
||||||
#
|
#
|
||||||
# The default datatypes (and delegates) are:
|
# The default datatypes (and delegates) are:
|
||||||
@@ -1283,7 +1283,7 @@ plugin.single.org.dspace.app.webui.util.StyleSelection = \
|
|||||||
default.locale = en
|
default.locale = en
|
||||||
|
|
||||||
# All the Locales, that are supported by this instance of DSpace
|
# All the Locales, that are supported by this instance of DSpace
|
||||||
# A comma seperated list of Locales. All types of Locales country, country_language, country_language_variant
|
# A comma-separated list of Locales. All types of Locales country, country_language, country_language_variant
|
||||||
# Note that the appropriate file are present, especially that all the Messages_x.properties are there
|
# Note that the appropriate file are present, especially that all the Messages_x.properties are there
|
||||||
# may be used, e. g: webui.supported.locales = en, de
|
# may be used, e. g: webui.supported.locales = en, de
|
||||||
|
|
||||||
@@ -1345,7 +1345,7 @@ webui.suggest.enable = false
|
|||||||
|
|
||||||
# A list of supported locales for Manakin. Manakin will look at a user's browser
|
# A list of supported locales for Manakin. Manakin will look at a user's browser
|
||||||
# configuration for the first language that appears in this list to make available
|
# configuration for the first language that appears in this list to make available
|
||||||
# to in the interface. This parameter is a comma seperated list of Locales. All
|
# to in the interface. This parameter is a comma-separated list of Locales. All
|
||||||
# types of Locales country, country_language, country_language_variant
|
# types of Locales country, country_language, country_language_variant
|
||||||
# Note that that if the approprate files are not present (i.e. Messages_XX_XX.xml)
|
# Note that that if the approprate files are not present (i.e. Messages_XX_XX.xml)
|
||||||
# then Manakin will fall back through to a more general language.
|
# then Manakin will fall back through to a more general language.
|
||||||
@@ -1357,7 +1357,7 @@ webui.suggest.enable = false
|
|||||||
#xmlui.force.ssl = true
|
#xmlui.force.ssl = true
|
||||||
|
|
||||||
# Determine if new users should be allowed to register or edit their own metadata.
|
# Determine if new users should be allowed to register or edit their own metadata.
|
||||||
# These parameters are usefull in congunction with shibboleth where you want to
|
# These parameters are useful in conjunction with shibboleth where you want to
|
||||||
# disallow registration and disable the user's ability to edit their metadata
|
# disallow registration and disable the user's ability to edit their metadata
|
||||||
# because both come from Shibboleth.
|
# because both come from Shibboleth.
|
||||||
#xmlui.user.registration=true
|
#xmlui.user.registration=true
|
||||||
@@ -1365,7 +1365,7 @@ webui.suggest.enable = false
|
|||||||
|
|
||||||
|
|
||||||
# Determine if super administrators (those whom are in the Administrators group)
|
# Determine if super administrators (those whom are in the Administrators group)
|
||||||
# can login as another user from the "edit eperson" page. This is usefull for
|
# can login as another user from the "edit eperson" page. This is useful for
|
||||||
# debugging problems in a running dspace instance, especially in the workflow
|
# debugging problems in a running dspace instance, especially in the workflow
|
||||||
# process. The default value is false, i.e. no one may assume the login of another user.
|
# process. The default value is false, i.e. no one may assume the login of another user.
|
||||||
#xmlui.user.assumelogin = true
|
#xmlui.user.assumelogin = true
|
||||||
@@ -1429,7 +1429,7 @@ webui.suggest.enable = false
|
|||||||
# The default value is 250.
|
# The default value is 250.
|
||||||
#xmlui.controlpanel.activity.max = 250
|
#xmlui.controlpanel.activity.max = 250
|
||||||
|
|
||||||
# Determine where the control panel's activity viwer recieves an events IP address
|
# Determine where the control panel's activity viwer receives an event's IP address
|
||||||
# from. If your DSpace is in a load balanced enviornment or otherwise behind a
|
# from. If your DSpace is in a load balanced enviornment or otherwise behind a
|
||||||
# context-switch then you will need to set the paramater to the HTTP parameter that
|
# context-switch then you will need to set the paramater to the HTTP parameter that
|
||||||
# records the original IP address.
|
# records the original IP address.
|
||||||
@@ -1566,7 +1566,7 @@ sword.slug.field = dc.identifier.slug
|
|||||||
sword.accept-packaging.METSDSpaceSIP.identifier = http://purl.org/net/sword-types/METSDSpaceSIP
|
sword.accept-packaging.METSDSpaceSIP.identifier = http://purl.org/net/sword-types/METSDSpaceSIP
|
||||||
sword.accept-packaging.METSDSpaceSIP.q = 1.0
|
sword.accept-packaging.METSDSpaceSIP.q = 1.0
|
||||||
|
|
||||||
# A comma separated list of MIME types that SWORD will accept
|
# A comma-separated list of MIME types that SWORD will accept
|
||||||
sword.accepts = application/zip
|
sword.accepts = application/zip
|
||||||
|
|
||||||
# Collection Specific settings: these will be used on the collections
|
# Collection Specific settings: these will be used on the collections
|
||||||
|
@@ -119,11 +119,11 @@ mail.admin = dspace-help@myu.edu
|
|||||||
# Recipient for new user registration emails
|
# Recipient for new user registration emails
|
||||||
# registration.notify = email-address-here
|
# registration.notify = email-address-here
|
||||||
|
|
||||||
# Set the default mail character set. This may be over ridden by providing a line
|
# Set the default mail character set. This may be overridden by providing a line
|
||||||
# inside the email template "charset: <encoding>", otherwise this default is used.
|
# inside the email template "charset: <encoding>", otherwise this default is used.
|
||||||
#mail.charset = UTF8
|
#mail.charset = UTF8
|
||||||
|
|
||||||
# A comma separated list of hostnames that are allowed to refer browsers to email forms.
|
# A comma-separated list of hostnames that are allowed to refer browsers to email forms.
|
||||||
# Default behaviour is to accept referrals only from dspace.hostname
|
# Default behaviour is to accept referrals only from dspace.hostname
|
||||||
#mail.allowed.referrers = localhost
|
#mail.allowed.referrers = localhost
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ assetstore.dir = ${dspace.dir}/assetstore
|
|||||||
# - a set of SRB account parameters (host, port, zone, domain, username,
|
# - a set of SRB account parameters (host, port, zone, domain, username,
|
||||||
# password, home directory, and resource)
|
# password, home directory, and resource)
|
||||||
#
|
#
|
||||||
# Should the be any conflict, like '2' refering to a local directory and
|
# Should there be any conflict, like '2' refering to a local directory and
|
||||||
# to a set of SRB parameters, the program will select the local directory.
|
# to a set of SRB parameters, the program will select the local directory.
|
||||||
#
|
#
|
||||||
# If SRB is chosen from the first install of DSpace, it is suggested that
|
# If SRB is chosen from the first install of DSpace, it is suggested that
|
||||||
@@ -510,7 +510,7 @@ plugin.named.org.dspace.content.packager.PackageIngester = \
|
|||||||
event.dispatcher.default.class = org.dspace.event.BasicDispatcher
|
event.dispatcher.default.class = org.dspace.event.BasicDispatcher
|
||||||
event.dispatcher.default.consumers = search, browse, eperson, harvester
|
event.dispatcher.default.consumers = search, browse, eperson, harvester
|
||||||
|
|
||||||
# The noindex dispatcher will not create search or browse indexs (usefull for batch item imports)
|
# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
|
||||||
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
|
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
|
||||||
event.dispatcher.noindex.consumers = eperson
|
event.dispatcher.noindex.consumers = eperson
|
||||||
|
|
||||||
@@ -579,7 +579,7 @@ org.dspace.app.itemexport.life.span.hours = 48
|
|||||||
org.dspace.app.itemexport.max.size = 200
|
org.dspace.app.itemexport.max.size = 200
|
||||||
|
|
||||||
|
|
||||||
# For backwards compatability, the subscription emails by default include any modified items
|
# For backwards compatibility, the subscription emails by default include any modified items
|
||||||
# uncomment the following entry for only new items to be emailed
|
# uncomment the following entry for only new items to be emailed
|
||||||
# eperson.subscription.onlynew = true
|
# eperson.subscription.onlynew = true
|
||||||
|
|
||||||
@@ -800,7 +800,7 @@ webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date
|
|||||||
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
|
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
|
||||||
|
|
||||||
# By default, the display of metadata in the browse indexes is case sensitive
|
# By default, the display of metadata in the browse indexes is case sensitive
|
||||||
# So, you will get seperate entries for the terms
|
# So, you will get separate entries for the terms
|
||||||
#
|
#
|
||||||
# Olive oil
|
# Olive oil
|
||||||
# olive oil
|
# olive oil
|
||||||
@@ -840,7 +840,7 @@ webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date
|
|||||||
|
|
||||||
# Set the options for how the indexes are sorted
|
# Set the options for how the indexes are sorted
|
||||||
#
|
#
|
||||||
# All sort normalisations are carried out by the OrderFormatDelegate.
|
# All sorts of normalisations are carried out by the OrderFormatDelegate.
|
||||||
# The plugin manager can be used to specify your own delegates for each datatype.
|
# The plugin manager can be used to specify your own delegates for each datatype.
|
||||||
#
|
#
|
||||||
# The default datatypes (and delegates) are:
|
# The default datatypes (and delegates) are:
|
||||||
@@ -1301,7 +1301,7 @@ plugin.single.org.dspace.app.webui.util.StyleSelection = \
|
|||||||
default.locale = en
|
default.locale = en
|
||||||
|
|
||||||
# All the Locales, that are supported by this instance of DSpace
|
# All the Locales, that are supported by this instance of DSpace
|
||||||
# A comma seperated list of Locales. All types of Locales country, country_language, country_language_variant
|
# A comma-separated list of Locales. All types of Locales country, country_language, country_language_variant
|
||||||
# Note that the appropriate file are present, especially that all the Messages_x.properties are there
|
# Note that the appropriate file are present, especially that all the Messages_x.properties are there
|
||||||
# may be used, e. g: webui.supported.locales = en, de
|
# may be used, e. g: webui.supported.locales = en, de
|
||||||
|
|
||||||
@@ -1363,7 +1363,7 @@ webui.suggest.enable = false
|
|||||||
|
|
||||||
# A list of supported locales for Manakin. Manakin will look at a user's browser
|
# A list of supported locales for Manakin. Manakin will look at a user's browser
|
||||||
# configuration for the first language that appears in this list to make available
|
# configuration for the first language that appears in this list to make available
|
||||||
# to in the interface. This parameter is a comma seperated list of Locales. All
|
# to in the interface. This parameter is a comma-separated list of Locales. All
|
||||||
# types of Locales country, country_language, country_language_variant
|
# types of Locales country, country_language, country_language_variant
|
||||||
# Note that that if the approprate files are not present (i.e. Messages_XX_XX.xml)
|
# Note that that if the approprate files are not present (i.e. Messages_XX_XX.xml)
|
||||||
# then Manakin will fall back through to a more general language.
|
# then Manakin will fall back through to a more general language.
|
||||||
@@ -1375,7 +1375,7 @@ webui.suggest.enable = false
|
|||||||
#xmlui.force.ssl = true
|
#xmlui.force.ssl = true
|
||||||
|
|
||||||
# Determine if new users should be allowed to register or edit their own metadata.
|
# Determine if new users should be allowed to register or edit their own metadata.
|
||||||
# These parameters are usefull in congunction with shibboleth where you want to
|
# These parameters are useful in conjunction with shibboleth where you want to
|
||||||
# disallow registration and disable the user's ability to edit their metadata
|
# disallow registration and disable the user's ability to edit their metadata
|
||||||
# because both come from Shibboleth.
|
# because both come from Shibboleth.
|
||||||
#xmlui.user.registration=true
|
#xmlui.user.registration=true
|
||||||
@@ -1383,7 +1383,7 @@ webui.suggest.enable = false
|
|||||||
|
|
||||||
|
|
||||||
# Determine if super administrators (those whom are in the Administrators group)
|
# Determine if super administrators (those whom are in the Administrators group)
|
||||||
# can login as another user from the "edit eperson" page. This is usefull for
|
# can login as another user from the "edit eperson" page. This is useful for
|
||||||
# debugging problems in a running dspace instance, especially in the workflow
|
# debugging problems in a running dspace instance, especially in the workflow
|
||||||
# process. The default value is false, i.e. no one may assume the login of another user.
|
# process. The default value is false, i.e. no one may assume the login of another user.
|
||||||
#xmlui.user.assumelogin = true
|
#xmlui.user.assumelogin = true
|
||||||
@@ -1447,7 +1447,7 @@ webui.suggest.enable = false
|
|||||||
# The default value is 250.
|
# The default value is 250.
|
||||||
#xmlui.controlpanel.activity.max = 250
|
#xmlui.controlpanel.activity.max = 250
|
||||||
|
|
||||||
# Determine where the control panel's activity viwer recieves an events IP address
|
# Determine where the control panel's activity viwer receives an event's IP address
|
||||||
# from. If your DSpace is in a load balanced enviornment or otherwise behind a
|
# from. If your DSpace is in a load balanced enviornment or otherwise behind a
|
||||||
# context-switch then you will need to set the paramater to the HTTP parameter that
|
# context-switch then you will need to set the paramater to the HTTP parameter that
|
||||||
# records the original IP address.
|
# records the original IP address.
|
||||||
@@ -1584,7 +1584,7 @@ sword.slug.field = dc.identifier.slug
|
|||||||
sword.accept-packaging.METSDSpaceSIP.identifier = http://purl.org/net/sword-types/METSDSpaceSIP
|
sword.accept-packaging.METSDSpaceSIP.identifier = http://purl.org/net/sword-types/METSDSpaceSIP
|
||||||
sword.accept-packaging.METSDSpaceSIP.q = 1.0
|
sword.accept-packaging.METSDSpaceSIP.q = 1.0
|
||||||
|
|
||||||
# A comma separated list of MIME types that SWORD will accept
|
# A comma-separated list of MIME types that SWORD will accept
|
||||||
sword.accepts = application/zip
|
sword.accepts = application/zip
|
||||||
|
|
||||||
# Collection Specific settings: these will be used on the collections
|
# Collection Specific settings: these will be used on the collections
|
||||||
|
@@ -5,8 +5,8 @@
|
|||||||
<input-forms>
|
<input-forms>
|
||||||
|
|
||||||
<!-- The form-map maps collection handles to forms. DSpace does not -->
|
<!-- The form-map maps collection handles to forms. DSpace does not -->
|
||||||
<!-- require that a collection's name be unique, even within a community .-->
|
<!-- require a collection name to be unique, not even within a community. -->
|
||||||
<!-- DSpace does however insure that each collection's handle is unique. -->
|
<!-- DSpace does however ensure that each collection's handle is unique. -->
|
||||||
<!-- Form-map provides the means to associate a unique collection name -->
|
<!-- Form-map provides the means to associate a unique collection name -->
|
||||||
<!-- with a form. The form-map also provides the special handle "default" -->
|
<!-- with a form. The form-map also provides the special handle "default" -->
|
||||||
<!-- (which is never a collection), here mapped to "traditional". Any -->
|
<!-- (which is never a collection), here mapped to "traditional". Any -->
|
||||||
@@ -19,17 +19,17 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- The form-definitions map lays out the detailed definition of all the -->
|
<!-- The form-definitions map lays out the detailed definition of all the -->
|
||||||
<!-- submission forms.Each separate form set has a unique name as an -->
|
<!-- submission forms. Each separate form set has a unique name as an -->
|
||||||
<!-- attribute. This name matches one of the names in the form-map. One -->
|
<!-- attribute. This name matches one of the names in the form-map. One -->
|
||||||
<!-- named form set has the name "traditional"; as this name suggests, -->
|
<!-- named form set has the name "traditional"; as this name suggests, -->
|
||||||
<!-- it is the old style and is also the default, which gets used when -->
|
<!-- it is the old style and is also the default, which gets used when -->
|
||||||
<!-- the specified collection has no correspondingly named form set. -->
|
<!-- the specified collection has no correspondingly-named form set. -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Each form set contains an ordered set of pages; each page defines -->
|
<!-- Each form set contains an ordered set of pages; each page defines -->
|
||||||
<!-- one submission metadata entry screen. Each page has an ordered list -->
|
<!-- one submission metadata entry screen. Each page has an ordered list -->
|
||||||
<!-- of field definitions, Each field definition corresponds to one -->
|
<!-- of field definitions, Each field definition corresponds to one -->
|
||||||
<!-- metatdata entry (a so-called row), which has a DC element name, a -->
|
<!-- metatdata entry (a so-called row), which has a DC element name, a -->
|
||||||
<!-- displayed label, a text string prompt which is called a hint , and -->
|
<!-- displayed label, a text string prompt which is called a hint, and -->
|
||||||
<!-- an input-type. Each field also may hold optional elements: DC -->
|
<!-- an input-type. Each field also may hold optional elements: DC -->
|
||||||
<!-- qualifier name, a repeatable flag, and a text string whose presence -->
|
<!-- qualifier name, a repeatable flag, and a text string whose presence -->
|
||||||
<!-- serves as a 'this field is required' flag. -->
|
<!-- serves as a 'this field is required' flag. -->
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<form name="traditional">
|
<form name="traditional">
|
||||||
<page number="1">
|
<page number="1">
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>contributor</dc-element>
|
<dc-element>contributor</dc-element>
|
||||||
<dc-qualifier>author</dc-qualifier>
|
<dc-qualifier>author</dc-qualifier>
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>title</dc-element>
|
<dc-element>title</dc-element>
|
||||||
<dc-qualifier></dc-qualifier>
|
<dc-qualifier></dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>title</dc-element>
|
<dc-element>title</dc-element>
|
||||||
<dc-qualifier>alternative</dc-qualifier>
|
<dc-qualifier>alternative</dc-qualifier>
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>date</dc-element>
|
<dc-element>date</dc-element>
|
||||||
<dc-qualifier>issued</dc-qualifier>
|
<dc-qualifier>issued</dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>publisher</dc-element>
|
<dc-element>publisher</dc-element>
|
||||||
<dc-qualifier></dc-qualifier>
|
<dc-qualifier></dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>identifier</dc-element>
|
<dc-element>identifier</dc-element>
|
||||||
<dc-qualifier>citation</dc-qualifier>
|
<dc-qualifier>citation</dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>relation</dc-element>
|
<dc-element>relation</dc-element>
|
||||||
<dc-qualifier>ispartofseries</dc-qualifier>
|
<dc-qualifier>ispartofseries</dc-qualifier>
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>identifier</dc-element>
|
<dc-element>identifier</dc-element>
|
||||||
<dc-qualifier></dc-qualifier>
|
<dc-qualifier></dc-qualifier>
|
||||||
<!-- An input-type of qualdrop_value MUST be marked as repeatable -->
|
<!-- An input-type of qualdrop_value MUST be marked as repeatable -->
|
||||||
@@ -131,18 +131,18 @@ it, please enter the types and the actual numbers or codes below.</hint>
|
|||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>type</dc-element>
|
<dc-element>type</dc-element>
|
||||||
<dc-qualifier></dc-qualifier>
|
<dc-qualifier></dc-qualifier>
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
<label>Type</label>
|
<label>Type</label>
|
||||||
<input-type value-pairs-name="common_types">dropdown</input-type>
|
<input-type value-pairs-name="common_types">dropdown</input-type>
|
||||||
<hint> Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key.</hint>
|
<hint>Select the type(s) of content of the item. To select more than one value in the list, you may have to hold down the "CTRL" or "Shift" key.</hint>
|
||||||
<required></required>
|
<required></required>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>language</dc-element>
|
<dc-element>language</dc-element>
|
||||||
<dc-qualifier>iso</dc-qualifier>
|
<dc-qualifier>iso</dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
@@ -155,48 +155,48 @@ it, please enter the types and the actual numbers or codes below.</hint>
|
|||||||
|
|
||||||
<page number="2">
|
<page number="2">
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>subject</dc-element>
|
<dc-element>subject</dc-element>
|
||||||
<dc-qualifier></dc-qualifier>
|
<dc-qualifier></dc-qualifier>
|
||||||
<!-- An input-type of twobox MUST be marked as repeatable -->
|
<!-- An input-type of twobox MUST be marked as repeatable -->
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
<label>Subject Keywords</label>
|
<label>Subject Keywords</label>
|
||||||
<input-type>twobox</input-type>
|
<input-type>twobox</input-type>
|
||||||
<hint> Enter appropriate subject keywords or phrases below. </hint>
|
<hint>Enter appropriate subject keywords or phrases below. </hint>
|
||||||
<required></required>
|
<required></required>
|
||||||
<vocabulary>srsc</vocabulary>
|
<vocabulary>srsc</vocabulary>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>description</dc-element>
|
<dc-element>description</dc-element>
|
||||||
<dc-qualifier>abstract</dc-qualifier>
|
<dc-qualifier>abstract</dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<label>Abstract</label>
|
<label>Abstract</label>
|
||||||
<input-type>textarea</input-type>
|
<input-type>textarea</input-type>
|
||||||
<hint> Enter the abstract of the item below. </hint>
|
<hint>Enter the abstract of the item below. </hint>
|
||||||
<required></required>
|
<required></required>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>description</dc-element>
|
<dc-element>description</dc-element>
|
||||||
<dc-qualifier>sponsorship</dc-qualifier>
|
<dc-qualifier>sponsorship</dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<label>Sponsors</label>
|
<label>Sponsors</label>
|
||||||
<input-type>textarea</input-type>
|
<input-type>textarea</input-type>
|
||||||
<hint> Enter the names of any sponsors and/or funding codes in the box below. </hint>
|
<hint>Enter the names of any sponsors and/or funding codes in the box below. </hint>
|
||||||
<required></required>
|
<required></required>
|
||||||
</field>
|
</field>
|
||||||
|
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>description</dc-element>
|
<dc-element>description</dc-element>
|
||||||
<dc-qualifier></dc-qualifier>
|
<dc-qualifier></dc-qualifier>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<label>Description</label>
|
<label>Description</label>
|
||||||
<input-type>textarea</input-type>
|
<input-type>textarea</input-type>
|
||||||
<hint> Enter any other description or comments in this box. </hint>
|
<hint>Enter any other description or comments in this box. </hint>
|
||||||
<required></required>
|
<required></required>
|
||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
@@ -205,12 +205,12 @@ it, please enter the types and the actual numbers or codes below.</hint>
|
|||||||
<form name="one">
|
<form name="one">
|
||||||
<page number="1">
|
<page number="1">
|
||||||
<field>
|
<field>
|
||||||
<dc-schema>dc</dc-schema>
|
<dc-schema>dc</dc-schema>
|
||||||
<dc-element>contributor</dc-element>
|
<dc-element>contributor</dc-element>
|
||||||
<dc-qualifier>author</dc-qualifier>
|
<dc-qualifier>author</dc-qualifier>
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
<label>One: Authors</label>
|
<label>One: Authors</label>
|
||||||
<input-type>name</input-type>
|
<input-type>name</input-type>
|
||||||
<hint>Enter the names of the authors of this item below.</hint>
|
<hint>Enter the names of the authors of this item below.</hint>
|
||||||
<required></required>
|
<required></required>
|
||||||
</field>
|
</field>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<!-- The process-map maps collection handles to a particular Item -->
|
<!-- The process-map maps collection handles to a particular Item -->
|
||||||
<!-- Submission Process. This requires that a collection's name be -->
|
<!-- Submission Process. This requires that a collection's name be -->
|
||||||
<!-- unique, even within a community. DSpace does however insure that each-->
|
<!-- unique, even within a community. DSpace does however ensure that each-->
|
||||||
<!-- collection's handle is unique. Process-map provides the means to -->
|
<!-- collection's handle is unique. Process-map provides the means to -->
|
||||||
<!-- associate a unique collection name with an Item Submission process. -->
|
<!-- associate a unique collection name with an Item Submission process. -->
|
||||||
<!-- The process-map also provides the special handle "default" (which is -->
|
<!-- The process-map also provides the special handle "default" (which is -->
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Each submit-process contains an ordered set of steps; each step -->
|
<!-- Each submit-process contains an ordered set of steps; each step -->
|
||||||
<!-- defines one "step" occurring during the process of submitting an -->
|
<!-- defines one "step" occurring during the process of submitting an -->
|
||||||
<!-- item. A step can either be reference by 'id' (in which case it must -->
|
<!-- item. A step can either be referenced by 'id' (in which case it must-->
|
||||||
<!-- be defined in <step-definitions> above), or defined completely here. -->
|
<!-- be defined in <step-definitions> above), or defined completely here. -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- If the step is not referred to by 'id', then the <step> REQUIRES the -->
|
<!-- If the step is not referred to by 'id', then the <step> REQUIRES the -->
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#### Shibboleth Authentication Configuration Settings ####
|
#### Shibboleth Authentication Configuration Settings ####
|
||||||
# Check https://mams.melcoe.mq.edu.au/zope/mams/pubs/Installation/dspace15/view
|
# Check https://mams.melcoe.mq.edu.au/zope/mams/pubs/Installation/dspace15/view
|
||||||
# for installation detail.
|
# for installation details.
|
||||||
#
|
#
|
||||||
# DSpace requires email as user's credential. There are 2 ways of providing
|
# DSpace requires email as user's credential. There are 2 ways of providing
|
||||||
# email to DSpace:
|
# email to DSpace:
|
||||||
@@ -36,7 +36,7 @@ autoregister = true
|
|||||||
# ignore-scope is defaulted to 'false'.
|
# ignore-scope is defaulted to 'false'.
|
||||||
# The value is specified in AAP.xml (Shib 1.3.x) or
|
# The value is specified in AAP.xml (Shib 1.3.x) or
|
||||||
# attribute-filter.xml (Shib 2.x). The value is CASE-Sensitive.
|
# attribute-filter.xml (Shib 2.x). The value is CASE-Sensitive.
|
||||||
# The values provided in this header are separated by semi-colon or comma.
|
# The values provided in this header are separated by semicolon or comma.
|
||||||
# If your sp only provides scoped role header, you need to set
|
# If your sp only provides scoped role header, you need to set
|
||||||
# role-header.ignore-Scope as true.
|
# role-header.ignore-Scope as true.
|
||||||
# for example if you only get Shib-EP-ScopedAffiliation instead of Shib-EP-ScopedAffiliation,
|
# for example if you only get Shib-EP-ScopedAffiliation instead of Shib-EP-ScopedAffiliation,
|
||||||
@@ -48,9 +48,9 @@ autoregister = true
|
|||||||
role-header.ignore-scope = false
|
role-header.ignore-scope = false
|
||||||
|
|
||||||
# when user is fully authN on IdP but would not like to release
|
# when user is fully authN on IdP but would not like to release
|
||||||
# his/her roles to DSpace (for privacy reason?), what should be
|
# his/her roles to DSpace (for privacy reasons?), what should be
|
||||||
# the default roles be given to such users?
|
# the default roles be given to such users?
|
||||||
# The values are separated by semi-colon or comma
|
# The values are separated by semicolon or comma
|
||||||
# default-roles = Staff, Walk-ins
|
# default-roles = Staff, Walk-ins
|
||||||
|
|
||||||
# The following mappings specify role mapping between IdP and Dspace.
|
# The following mappings specify role mapping between IdP and Dspace.
|
||||||
@@ -68,4 +68,4 @@ role-header.ignore-scope = false
|
|||||||
# Given sufficient demand, future release could support regex for the mapping
|
# Given sufficient demand, future release could support regex for the mapping
|
||||||
# special characters need to be escaped by \
|
# special characters need to be escaped by \
|
||||||
role.Senior\ Researcher = Researcher, Staff
|
role.Senior\ Researcher = Researcher, Staff
|
||||||
role.Librarian = Administrator
|
role.Librarian = Administrator
|
||||||
|
@@ -234,7 +234,7 @@
|
|||||||
<!-- The PatternReplaceFilter gives you the flexibility to use
|
<!-- The PatternReplaceFilter gives you the flexibility to use
|
||||||
Java Regular expression to replace any sequence of characters
|
Java Regular expression to replace any sequence of characters
|
||||||
matching a pattern with an arbitrary replacement string,
|
matching a pattern with an arbitrary replacement string,
|
||||||
which may include back refrences to portions of the orriginal
|
which may include back references to portions of the original
|
||||||
string matched by the pattern.
|
string matched by the pattern.
|
||||||
|
|
||||||
See the Java Regular Expression documentation for more
|
See the Java Regular Expression documentation for more
|
||||||
|
@@ -73,7 +73,7 @@ public class SolrServiceImpl implements SearchService, IndexingService {
|
|||||||
private CommonsHttpSolrServer solr = null;
|
private CommonsHttpSolrServer solr = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Non-Static Singelton instance of Configuration Service
|
* Non-Static Singleton instance of Configuration Service
|
||||||
*/
|
*/
|
||||||
// private ConfigurationService configurationService;
|
// private ConfigurationService configurationService;
|
||||||
|
|
||||||
|
@@ -617,7 +617,7 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer implement
|
|||||||
* Determine if the scope of the search should fixed or is changeable by the
|
* Determine if the scope of the search should fixed or is changeable by the
|
||||||
* user.
|
* user.
|
||||||
* <p/>
|
* <p/>
|
||||||
* The search scope when preformed by url, i.e. they are at the url handle/xxxx/xx/search
|
* The search scope when performed by url, i.e. they are at the url handle/xxxx/xx/search
|
||||||
* then it is fixed. However at the global level the search is variable.
|
* then it is fixed. However at the global level the search is variable.
|
||||||
*
|
*
|
||||||
* @return true if the scope is variable, false otherwise.
|
* @return true if the scope is variable, false otherwise.
|
||||||
|
@@ -126,7 +126,7 @@ public class BrowseFacet extends AbstractDSpaceTransformer implements CacheableP
|
|||||||
validity.add(dso);
|
validity.add(dso);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add reciently submitted items, serialize solr query contents.
|
// add recently submitted items, serialize solr query contents.
|
||||||
DiscoverResult response = getQueryResponse(dso);
|
DiscoverResult response = getQueryResponse(dso);
|
||||||
|
|
||||||
validity.add("numFound:" + response.getDspaceObjects().size());
|
validity.add("numFound:" + response.getDspaceObjects().size());
|
||||||
|
@@ -149,7 +149,7 @@ public class CommunitySearch extends AbstractDSpaceTransformer implements Cachea
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a single community (and refrence any sub communites or
|
* Display a single community (and reference any subcommunites or
|
||||||
* collections)
|
* collections)
|
||||||
*/
|
*/
|
||||||
public void addBody(Body body) throws SAXException, WingException,
|
public void addBody(Body body) throws SAXException, WingException,
|
||||||
@@ -222,4 +222,4 @@ public class CommunitySearch extends AbstractDSpaceTransformer implements Cachea
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -130,7 +130,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insure that the context path is added to the page meta.
|
* Ensure that the context path is added to the page meta.
|
||||||
*/
|
*/
|
||||||
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
||||||
WingException, UIException, SQLException, IOException,
|
WingException, UIException, SQLException, IOException,
|
||||||
|
@@ -132,7 +132,7 @@ public class SearchFacetFilter extends AbstractDSpaceTransformer implements Cach
|
|||||||
validity.add(dso);
|
validity.add(dso);
|
||||||
}
|
}
|
||||||
|
|
||||||
// add reciently submitted items, serialize solr query contents.
|
// add recently submitted items, serialize solr query contents.
|
||||||
DiscoverResult response = getQueryResponse(dso);
|
DiscoverResult response = getQueryResponse(dso);
|
||||||
|
|
||||||
validity.add("numFound:" + response.getDspaceObjects().size());
|
validity.add("numFound:" + response.getDspaceObjects().size());
|
||||||
|
@@ -34,7 +34,7 @@ import org.dspace.utils.DSpace;
|
|||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Preform a simple search of the repository. The user provides a simple one
|
* Perform a simple search of the repository. The user provides a simple one
|
||||||
* field query (the url parameter is named query) and the results are processed.
|
* field query (the url parameter is named query) and the results are processed.
|
||||||
*
|
*
|
||||||
* @author Kevin Van de Velde (kevin at atmire dot com)
|
* @author Kevin Van de Velde (kevin at atmire dot com)
|
||||||
|
@@ -33,7 +33,7 @@ public class SiteRecentSubmissions extends AbstractRecentSubmissionTransformer {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a single community (and refrence any sub communites or
|
* Display a single community (and reference any subcommunites or
|
||||||
* collections)
|
* collections)
|
||||||
*/
|
*/
|
||||||
public void addBody(Body body) throws SAXException, WingException,
|
public void addBody(Body body) throws SAXException, WingException,
|
||||||
@@ -66,4 +66,4 @@ public class SiteRecentSubmissions extends AbstractRecentSubmissionTransformer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -199,7 +199,7 @@ $.Autocompleter = function(input, options) {
|
|||||||
if ( options.multiple ) {
|
if ( options.multiple ) {
|
||||||
var words = trimWords($input.val());
|
var words = trimWords($input.val());
|
||||||
if ( words.length > 1 ) {
|
if ( words.length > 1 ) {
|
||||||
var seperator = options.multipleSeparator.length;
|
var separator = options.multipleSeparator.length;
|
||||||
var cursorAt = $(input).selection().start;
|
var cursorAt = $(input).selection().start;
|
||||||
var wordAt, progress = 0;
|
var wordAt, progress = 0;
|
||||||
$.each(words, function(i, word) {
|
$.each(words, function(i, word) {
|
||||||
@@ -208,11 +208,11 @@ $.Autocompleter = function(input, options) {
|
|||||||
wordAt = i;
|
wordAt = i;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
progress += seperator;
|
progress += separator;
|
||||||
});
|
});
|
||||||
words[wordAt] = v;
|
words[wordAt] = v;
|
||||||
// TODO this should set the cursor to the right position, but it gets overriden somewhere
|
// TODO this should set the cursor to the right position, but it gets overriden somewhere
|
||||||
//$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
|
//$.Autocompleter.Selection(input, progress + separator, progress + separator);
|
||||||
v = words.join( options.multipleSeparator );
|
v = words.join( options.multipleSeparator );
|
||||||
}
|
}
|
||||||
v += options.multipleSeparator;
|
v += options.multipleSeparator;
|
||||||
@@ -333,7 +333,7 @@ $.Autocompleter = function(input, options) {
|
|||||||
if (!options.matchCase)
|
if (!options.matchCase)
|
||||||
term = term.toLowerCase();
|
term = term.toLowerCase();
|
||||||
var data = cache.load(term);
|
var data = cache.load(term);
|
||||||
// recieve the cached data
|
// receive the cached data
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
success(term, data);
|
success(term, data);
|
||||||
// if an AJAX url has been supplied, try loading the data now
|
// if an AJAX url has been supplied, try loading the data now
|
||||||
|
@@ -177,7 +177,7 @@ public class HandleServlet extends DSpaceServlet
|
|||||||
if (modSince != -1 && item.getLastModified().getTime() < modSince)
|
if (modSince != -1 && item.getLastModified().getTime() < modSince)
|
||||||
{
|
{
|
||||||
// Item has not been modified since requested date,
|
// Item has not been modified since requested date,
|
||||||
// hence bitstream has not; return 304
|
// hence bitstream has not been, either; return 304
|
||||||
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
|
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -380,7 +380,7 @@ public class HandleServlet extends DSpaceServlet
|
|||||||
boolean suggestEnable = false;
|
boolean suggestEnable = false;
|
||||||
if (!ConfigurationManager.getBooleanProperty("webui.suggest.enable"))
|
if (!ConfigurationManager.getBooleanProperty("webui.suggest.enable"))
|
||||||
{
|
{
|
||||||
// do nothing, the suggestLink is allready set to false
|
// do nothing, the suggestLink is already set to false
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -422,7 +422,7 @@
|
|||||||
|
|
||||||
<p>Use this tool to set and clear policies for items or bitstreams across a whole collection. Be careful about using the <strong>Clear Policies</strong> button.</p>
|
<p>Use this tool to set and clear policies for items or bitstreams across a whole collection. Be careful about using the <strong>Clear Policies</strong> button.</p>
|
||||||
|
|
||||||
<p>Select the collection from the top list and the group you want to give or remove permission for from the bottom list. Then select the type of object (item or bistream) that you want to edit permissions for. Then select the action from the drop-down.</p>
|
<p>Select the collection from the top list and the group you want to give or remove permission for from the bottom list. Then select the type of object (item or bitstream) that you want to edit permissions for. Then select the action from the drop-down.</p>
|
||||||
|
|
||||||
<p>For example, say you wanted to give everyone in a group 'privileged_users' <strong>Read</strong> access to all of the bitstreams in a restricted collection. You'd select 'privileged users' from the top list, 'bitstream' from the 'content type' drop-down, 'privileged_users' from the 'group' list, 'Read' from the 'action' drop-down, and click 'Add policy'.</p>
|
<p>For example, say you wanted to give everyone in a group 'privileged_users' <strong>Read</strong> access to all of the bitstreams in a restricted collection. You'd select 'privileged users' from the top list, 'bitstream' from the 'content type' drop-down, 'privileged_users' from the 'group' list, 'Read' from the 'action' drop-down, and click 'Add policy'.</p>
|
||||||
|
|
||||||
@@ -440,7 +440,7 @@
|
|||||||
<h3><a name="editlicense"></a>Edit Default License</h3>
|
<h3><a name="editlicense"></a>Edit Default License</h3>
|
||||||
<p>You can use this tool to edit the default license of DSpace</p>
|
<p>You can use this tool to edit the default license of DSpace</p>
|
||||||
<p>The default license is used when no collection specific license is defined.</p>
|
<p>The default license is used when no collection specific license is defined.</p>
|
||||||
<p>Note that changing the default license has no effect on allready published items.</p>
|
<p>Note that changing the default license has no effect on already published items.</p>
|
||||||
<p>Some substitution variables are available to make possible configure a contextual submission license:</p>
|
<p>Some substitution variables are available to make possible configure a contextual submission license:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>%1$s</strong> will be translated in the "submitter first name"</li>
|
<li><strong>%1$s</strong> will be translated in the "submitter first name"</li>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* http://www.dspace.org/license/
|
* http://www.dspace.org/license/
|
||||||
*/
|
*/
|
||||||
/* Print style sheet for DSpace */
|
/* Print stylesheet for DSpace */
|
||||||
body, a {
|
body, a {
|
||||||
color: black;
|
color: black;
|
||||||
background: white;
|
background: white;
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
margin-bottom:5px;
|
margin-bottom:5px;
|
||||||
font-family:verdana;
|
font-family:verdana;
|
||||||
color:#333;
|
color:#333;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main {
|
#main {
|
||||||
border-left:1px solid #D0D0D0;
|
border-left:1px solid #D0D0D0;
|
||||||
@@ -22,11 +22,11 @@
|
|||||||
background:#fff;
|
background:#fff;
|
||||||
margin-left:50px;
|
margin-left:50px;
|
||||||
margin-right:50px;
|
margin-right:50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Looks like you have to specify the width of #menu
|
/* Looks like you have to specify the width of #menu
|
||||||
or IE5 Mac stretches it all the way across the div, and
|
or IE5 Mac stretches it all the way across the div, and
|
||||||
Opera streches it half way. */
|
Opera streches it halfway. */
|
||||||
|
|
||||||
#main #menu {
|
#main #menu {
|
||||||
border-left:1px dotted #ccc;
|
border-left:1px dotted #ccc;
|
||||||
@@ -35,17 +35,17 @@ Opera streches it half way. */
|
|||||||
width:230px;
|
width:230px;
|
||||||
background:white;
|
background:white;
|
||||||
margin:0px 0px 10px 10px;
|
margin:0px 0px 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td, h3, p,h1,pre {
|
td, h3, p,h1,pre {
|
||||||
margin:0px 20px 20px 20px;
|
margin:0px 20px 20px 20px;
|
||||||
font-size:11px;
|
font-size:11px;
|
||||||
line-height:140%;
|
line-height:140%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-top:30px;
|
padding-top:30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
@@ -60,5 +60,5 @@ Opera streches it half way. */
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dent {
|
.dent {
|
||||||
margin-left:64px;
|
margin-left:64px;
|
||||||
}
|
}
|
||||||
|
@@ -911,7 +911,7 @@
|
|||||||
throws java.io.IOException
|
throws java.io.IOException
|
||||||
{
|
{
|
||||||
DCValue[] unfiltered = item.getMetadata(schema, element, Item.ANY, Item.ANY);
|
DCValue[] unfiltered = item.getMetadata(schema, element, Item.ANY, Item.ANY);
|
||||||
// filter out both unqualified and qualified values occuring elsewhere in inputs
|
// filter out both unqualified and qualified values occurring elsewhere in inputs
|
||||||
List<DCValue> filtered = new ArrayList<DCValue>();
|
List<DCValue> filtered = new ArrayList<DCValue>();
|
||||||
for (int i = 0; i < unfiltered.length; i++)
|
for (int i = 0; i < unfiltered.length; i++)
|
||||||
{
|
{
|
||||||
|
@@ -126,7 +126,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// do nothing the date is allready set to "without date"
|
// do nothing the date is already set to "without date"
|
||||||
}
|
}
|
||||||
String contributor = LocaleSupport.getLocalizedMessage(pageContext, "jsp.general.without-contributor");
|
String contributor = LocaleSupport.getLocalizedMessage(pageContext, "jsp.general.without-contributor");
|
||||||
DCValue[] contributors = item.getMetadata("dc", "contributor", Item.ANY, Item.ANY);
|
DCValue[] contributors = item.getMetadata("dc", "contributor", Item.ANY, Item.ANY);
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// do nothing the contributor is allready set to anonymous
|
// do nothing the contributor is already set to anonymous
|
||||||
}
|
}
|
||||||
String title = LocaleSupport.getLocalizedMessage(pageContext, "jsp.general.untitled");
|
String title = LocaleSupport.getLocalizedMessage(pageContext, "jsp.general.untitled");
|
||||||
DCValue[] titles = item.getMetadata("dc", "title", null, Item.ANY);
|
DCValue[] titles = item.getMetadata("dc", "title", null, Item.ANY);
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// do nothing the title is allready set to untitled
|
// do nothing the title is already set to untitled
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,8 +32,8 @@ public class DatasetDSpaceObjectGenerator extends DatasetGenerator {
|
|||||||
dsoRepresentations.add(representation);
|
dsoRepresentations.add(representation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addDsoChild(int type, int max, boolean seperate, int nameLength){
|
public void addDsoChild(int type, int max, boolean separate, int nameLength){
|
||||||
DSORepresentation rep = new DSORepresentation(type, max, seperate);
|
DSORepresentation rep = new DSORepresentation(type, max, separate);
|
||||||
rep.setNameLength(nameLength);
|
rep.setNameLength(nameLength);
|
||||||
dsoRepresentations.add(rep);
|
dsoRepresentations.add(rep);
|
||||||
}
|
}
|
||||||
|
@@ -81,8 +81,8 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
public Dataset createDataset(Context context) throws SQLException,
|
public Dataset createDataset(Context context) throws SQLException,
|
||||||
SolrServerException, ParseException
|
SolrServerException, ParseException
|
||||||
{
|
{
|
||||||
//Check if we already have one.
|
// Check if we already have one.
|
||||||
//If we do then give it back.
|
// If we do then give it back.
|
||||||
if(getDataset() != null)
|
if(getDataset() != null)
|
||||||
{
|
{
|
||||||
return getDataset();
|
return getDataset();
|
||||||
@@ -97,8 +97,8 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
processAxis(dataSet, datasetQueries);
|
processAxis(dataSet, datasetQueries);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Now lets determine our values.
|
// Now lets determine our values.
|
||||||
//First check if we have a date facet & if so find it.
|
// First check if we have a date facet & if so find it.
|
||||||
DatasetTimeGenerator dateFacet = null;
|
DatasetTimeGenerator dateFacet = null;
|
||||||
if (getDatasetGenerators().get(0) instanceof DatasetTimeGenerator
|
if (getDatasetGenerators().get(0) instanceof DatasetTimeGenerator
|
||||||
|| (1 < getDatasetGenerators().size() && getDatasetGenerators()
|
|| (1 < getDatasetGenerators().size() && getDatasetGenerators()
|
||||||
@@ -118,7 +118,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
// 2. DETERMINE VALUES //
|
// 2. DETERMINE VALUES //
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
boolean showTotal = false;
|
boolean showTotal = false;
|
||||||
//Check if we need our total
|
// Check if we need our total
|
||||||
if ((getDatasetGenerators().get(0) != null && getDatasetGenerators()
|
if ((getDatasetGenerators().get(0) != null && getDatasetGenerators()
|
||||||
.get(0).isIncludeTotal())
|
.get(0).isIncludeTotal())
|
||||||
|| (1 < getDatasetGenerators().size()
|
|| (1 < getDatasetGenerators().size()
|
||||||
@@ -147,7 +147,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
addFilters(dateFilter);
|
addFilters(dateFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Determine our filterQuery
|
// Determine our filterQuery
|
||||||
String filterQuery = null;
|
String filterQuery = null;
|
||||||
for (int i = 0; i < getFilters().size(); i++) {
|
for (int i = 0; i < getFilters().size(); i++) {
|
||||||
if(filterQuery == null)
|
if(filterQuery == null)
|
||||||
@@ -164,34 +164,34 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
}
|
}
|
||||||
// System.out.println("FILTERQUERY: " + filterQuery);
|
// System.out.println("FILTERQUERY: " + filterQuery);
|
||||||
|
|
||||||
//We determine our values on the queries resolved above
|
// We determine our values on the queries resolved above
|
||||||
Dataset dataset = null;
|
Dataset dataset = null;
|
||||||
|
|
||||||
//Run over our queries.
|
// Run over our queries.
|
||||||
//First how many queries do we have ?
|
// First how many queries do we have ?
|
||||||
if(dateFacet != null){
|
if(dateFacet != null){
|
||||||
//So do all the queries and THEN do the date facet
|
// So do all the queries and THEN do the date facet
|
||||||
for (int i = 0; i < datasetQueries.size(); i++) {
|
for (int i = 0; i < datasetQueries.size(); i++) {
|
||||||
DatasetQuery dataSetQuery = datasetQueries.get(i);
|
DatasetQuery dataSetQuery = datasetQueries.get(i);
|
||||||
if(dataSetQuery.getQueries().size() != 1){
|
if(dataSetQuery.getQueries().size() != 1){
|
||||||
//TODO: do this
|
// TODO: do this
|
||||||
}else{
|
}else{
|
||||||
String query = dataSetQuery.getQueries().get(0).getQuery();
|
String query = dataSetQuery.getQueries().get(0).getQuery();
|
||||||
if(dataSetQuery.getMax() == -1){
|
if(dataSetQuery.getMax() == -1){
|
||||||
//We are asking from our current query all the visits faceted by date
|
// We are asking from our current query all the visits faceted by date
|
||||||
ObjectCount[] results = SolrLogger.queryFacetDate(query, filterQuery, dataSetQuery.getMax(), dateFacet.getDateType(), dateFacet.getStartDate(), dateFacet.getEndDate(), showTotal);
|
ObjectCount[] results = SolrLogger.queryFacetDate(query, filterQuery, dataSetQuery.getMax(), dateFacet.getDateType(), dateFacet.getStartDate(), dateFacet.getEndDate(), showTotal);
|
||||||
dataset = new Dataset(1, results.length);
|
dataset = new Dataset(1, results.length);
|
||||||
//Now that we have our results put em in a matrix
|
// Now that we have our results put em in a matrix
|
||||||
for(int j = 0; j < results.length; j++){
|
for(int j = 0; j < results.length; j++){
|
||||||
dataset.setColLabel(j, results[j].getValue());
|
dataset.setColLabel(j, results[j].getValue());
|
||||||
dataset.addValueToMatrix(0, j, results[j].getCount());
|
dataset.addValueToMatrix(0, j, results[j].getCount());
|
||||||
}
|
}
|
||||||
//TODO: change this !
|
// TODO: change this !
|
||||||
//Now add the column label
|
// Now add the column label
|
||||||
dataset.setRowLabel(0, getResultName(dataSetQuery.getName(), dataSetQuery, context));
|
dataset.setRowLabel(0, getResultName(dataSetQuery.getName(), dataSetQuery, context));
|
||||||
dataset.setRowLabelAttr(0, getAttributes(dataSetQuery.getName(), dataSetQuery, context));
|
dataset.setRowLabelAttr(0, getAttributes(dataSetQuery.getName(), dataSetQuery, context));
|
||||||
}else{
|
}else{
|
||||||
//We need to get the max objects and the next part of the query on them (next part beeing the datasettimequery
|
// We need to get the max objects and the next part of the query on them (next part beeing the datasettimequery
|
||||||
ObjectCount[] maxObjectCounts = SolrLogger.queryFacetField(query, filterQuery, dataSetQuery.getFacetField(), dataSetQuery.getMax(), false, null);
|
ObjectCount[] maxObjectCounts = SolrLogger.queryFacetField(query, filterQuery, dataSetQuery.getFacetField(), dataSetQuery.getMax(), false, null);
|
||||||
for (int j = 0; j < maxObjectCounts.length; j++) {
|
for (int j = 0; j < maxObjectCounts.length; j++) {
|
||||||
ObjectCount firstCount = maxObjectCounts[j];
|
ObjectCount firstCount = maxObjectCounts[j];
|
||||||
@@ -199,19 +199,19 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
ObjectCount[] maxDateFacetCounts = SolrLogger.queryFacetDate(newQuery, filterQuery, dataSetQuery.getMax(), dateFacet.getDateType(), dateFacet.getStartDate(), dateFacet.getEndDate(), showTotal);
|
ObjectCount[] maxDateFacetCounts = SolrLogger.queryFacetDate(newQuery, filterQuery, dataSetQuery.getMax(), dateFacet.getDateType(), dateFacet.getStartDate(), dateFacet.getEndDate(), showTotal);
|
||||||
|
|
||||||
|
|
||||||
//Make sure we have a dataSet
|
// Make sure we have a dataSet
|
||||||
if(dataset == null)
|
if(dataset == null)
|
||||||
{
|
{
|
||||||
dataset = new Dataset(maxObjectCounts.length, maxDateFacetCounts.length);
|
dataset = new Dataset(maxObjectCounts.length, maxDateFacetCounts.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: this is a very dirty fix change this ! ! ! ! ! !
|
// TODO: this is a very dirty fix change this ! ! ! ! ! !
|
||||||
dataset.setRowLabel(j, getResultName(firstCount.getValue(), dataSetQuery, context));
|
dataset.setRowLabel(j, getResultName(firstCount.getValue(), dataSetQuery, context));
|
||||||
dataset.setRowLabelAttr(j, getAttributes(firstCount.getValue(), dataSetQuery, context));
|
dataset.setRowLabelAttr(j, getAttributes(firstCount.getValue(), dataSetQuery, context));
|
||||||
|
|
||||||
for (int k = 0; k < maxDateFacetCounts.length; k++) {
|
for (int k = 0; k < maxDateFacetCounts.length; k++) {
|
||||||
ObjectCount objectCount = maxDateFacetCounts[k];
|
ObjectCount objectCount = maxDateFacetCounts[k];
|
||||||
//No need to add this many times
|
// No need to add this many times
|
||||||
if(j == 0)
|
if(j == 0)
|
||||||
{
|
{
|
||||||
dataset.setColLabel(k, objectCount.getValue());
|
dataset.setColLabel(k, objectCount.getValue());
|
||||||
@@ -226,15 +226,15 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//We do NOT have a date facet so just do queries after each other
|
// We do NOT have a date facet so just do queries after each other
|
||||||
/*
|
/*
|
||||||
for (int i = 0; i < datasetQueries.size(); i++) {
|
for (int i = 0; i < datasetQueries.size(); i++) {
|
||||||
DatasetQuery datasetQuery = datasetQueries.get(i);
|
DatasetQuery datasetQuery = datasetQueries.get(i);
|
||||||
if(datasetQuery.getQueries().size() != 1){
|
if(datasetQuery.getQueries().size() != 1){
|
||||||
//TODO: do this
|
// TODO: do this
|
||||||
}else{
|
}else{
|
||||||
String query = datasetQuery.getQueries().get(0);
|
String query = datasetQuery.getQueries().get(0);
|
||||||
//Loop over the queries & do em
|
// Loop over the queries & do em
|
||||||
// ObjectCount[] topCounts = SolrLogger.queryFacetField(query, );
|
// ObjectCount[] topCounts = SolrLogger.queryFacetField(query, );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,16 +248,16 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
// }else{
|
// }else{
|
||||||
// TODO: do this
|
// TODO: do this
|
||||||
// }
|
// }
|
||||||
//Check if we have more queries that need to be done
|
// Check if we have more queries that need to be done
|
||||||
if(datasetQueries.size() == 2){
|
if(datasetQueries.size() == 2){
|
||||||
DatasetQuery secondDataSet = datasetQueries.get(1);
|
DatasetQuery secondDataSet = datasetQueries.get(1);
|
||||||
//Now do the second one
|
// Now do the second one
|
||||||
ObjectCount[] topCounts2 = queryFacetField(secondDataSet, secondDataSet.getQueries().get(0).getQuery(), filterQuery);
|
ObjectCount[] topCounts2 = queryFacetField(secondDataSet, secondDataSet.getQueries().get(0).getQuery(), filterQuery);
|
||||||
//Now that have results for both of them lets do x.y queries
|
// Now that have results for both of them lets do x.y queries
|
||||||
List<String> facetQueries = new ArrayList<String>();
|
List<String> facetQueries = new ArrayList<String>();
|
||||||
for (ObjectCount count2 : topCounts2) {
|
for (ObjectCount count2 : topCounts2) {
|
||||||
String facetQuery = secondDataSet.getFacetField() + ":" + ClientUtils.escapeQueryChars(count2.getValue());
|
String facetQuery = secondDataSet.getFacetField() + ":" + ClientUtils.escapeQueryChars(count2.getValue());
|
||||||
//Check if we also have a type present (if so this should be put into the query
|
// Check if we also have a type present (if so this should be put into the query)
|
||||||
if ("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
|
if ("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
|
||||||
{
|
{
|
||||||
facetQuery += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
|
facetQuery += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
|
||||||
@@ -269,7 +269,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
ObjectCount count1 = topCounts1[i];
|
ObjectCount count1 = topCounts1[i];
|
||||||
ObjectCount[] currentResult = new ObjectCount[topCounts2.length];
|
ObjectCount[] currentResult = new ObjectCount[topCounts2.length];
|
||||||
|
|
||||||
//Make sure we have a dataSet
|
// Make sure we have a dataSet
|
||||||
if(dataset == null)
|
if(dataset == null)
|
||||||
{
|
{
|
||||||
dataset = new Dataset(topCounts2.length, topCounts1.length);
|
dataset = new Dataset(topCounts2.length, topCounts1.length);
|
||||||
@@ -278,7 +278,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
dataset.setColLabelAttr(i, getAttributes(count1.getValue(), firsDataset, context));
|
dataset.setColLabelAttr(i, getAttributes(count1.getValue(), firsDataset, context));
|
||||||
|
|
||||||
String query = firsDataset.getFacetField() + ":" + ClientUtils.escapeQueryChars(count1.getValue());
|
String query = firsDataset.getFacetField() + ":" + ClientUtils.escapeQueryChars(count1.getValue());
|
||||||
//Check if we also have a type present (if so this should be put into the query
|
// Check if we also have a type present (if so this should be put into the query)
|
||||||
if("id".equals(firsDataset.getFacetField()) && firsDataset.getQueries().get(0).getDsoType() != -1)
|
if("id".equals(firsDataset.getFacetField()) && firsDataset.getQueries().get(0).getDsoType() != -1)
|
||||||
{
|
{
|
||||||
query += " AND type:" + firsDataset.getQueries().get(0).getDsoType();
|
query += " AND type:" + firsDataset.getQueries().get(0).getDsoType();
|
||||||
@@ -287,9 +287,9 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
Map<String, Integer> facetResult = SolrLogger.queryFacetQuery(query, filterQuery, facetQueries);
|
Map<String, Integer> facetResult = SolrLogger.queryFacetQuery(query, filterQuery, facetQueries);
|
||||||
|
|
||||||
|
|
||||||
//TODO: the show total
|
// TODO: the show total
|
||||||
//No need to add this many times
|
// No need to add this many times
|
||||||
//TODO: dit vervangen door te displayen value
|
// TODO: dit vervangen door te displayen value
|
||||||
for (int j = 0; j < topCounts2.length; j++) {
|
for (int j = 0; j < topCounts2.length; j++) {
|
||||||
ObjectCount count2 = topCounts2[j];
|
ObjectCount count2 = topCounts2[j];
|
||||||
if(i == 0) {
|
if(i == 0) {
|
||||||
@@ -297,15 +297,15 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
dataset.setRowLabelAttr(j, getAttributes(count2.getValue(), secondDataSet, context));
|
dataset.setRowLabelAttr(j, getAttributes(count2.getValue(), secondDataSet, context));
|
||||||
|
|
||||||
}
|
}
|
||||||
//Get our value the value is the same as the query
|
// Get our value the value is the same as the query
|
||||||
String facetQuery = secondDataSet.getFacetField() + ":" + ClientUtils.escapeQueryChars(count2.getValue());
|
String facetQuery = secondDataSet.getFacetField() + ":" + ClientUtils.escapeQueryChars(count2.getValue());
|
||||||
//Check if we also have a type present (if so this should be put into the query
|
// Check if we also have a type present (if so this should be put into the query
|
||||||
if ("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
|
if ("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
|
||||||
{
|
{
|
||||||
facetQuery += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
|
facetQuery += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
|
||||||
}
|
}
|
||||||
|
|
||||||
//We got our query so now get the value
|
// We got our query so now get the value
|
||||||
dataset.addValueToMatrix(j, i, facetResult.get(facetQuery));
|
dataset.addValueToMatrix(j, i, facetResult.get(facetQuery));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,20 +313,20 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
for (int j = 0; j < topCounts2.length; j++) {
|
for (int j = 0; j < topCounts2.length; j++) {
|
||||||
ObjectCount count2 = topCounts2[j];
|
ObjectCount count2 = topCounts2[j];
|
||||||
String query = firsDataset.getFacetField() + ":" + count1.getValue();
|
String query = firsDataset.getFacetField() + ":" + count1.getValue();
|
||||||
//Check if we also have a type present (if so this should be put into the query
|
// Check if we also have a type present (if so this should be put into the query
|
||||||
if("id".equals(firsDataset.getFacetField()) && firsDataset.getQueries().get(0).getDsoType() != -1)
|
if("id".equals(firsDataset.getFacetField()) && firsDataset.getQueries().get(0).getDsoType() != -1)
|
||||||
query += " AND type:" + firsDataset.getQueries().get(0).getDsoType();
|
query += " AND type:" + firsDataset.getQueries().get(0).getDsoType();
|
||||||
|
|
||||||
query += " AND " + secondDataSet.getFacetField() + ":" + count2.getValue();
|
query += " AND " + secondDataSet.getFacetField() + ":" + count2.getValue();
|
||||||
//Check if we also have a type present (if so this should be put into the query
|
// Check if we also have a type present (if so this should be put into the query
|
||||||
if("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
|
if("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
|
||||||
query += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
|
query += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();
|
||||||
|
|
||||||
long count = SolrLogger.queryFacetQuery(query, filterQuery);
|
long count = SolrLogger.queryFacetQuery(query, filterQuery);
|
||||||
|
|
||||||
//TODO: the show total
|
// TODO: the show total
|
||||||
//No need to add this many times
|
// No need to add this many times
|
||||||
//TODo: dit vervangen door te displayen value
|
// TODO: dit vervangen door te displayen value
|
||||||
if(i == 0) {
|
if(i == 0) {
|
||||||
dataset.setRowLabel(j, getResultName(count2.getValue(), secondDataSet, context));
|
dataset.setRowLabel(j, getResultName(count2.getValue(), secondDataSet, context));
|
||||||
dataset.setRowLabelAttr(j, getAttributes(count2.getValue(), secondDataSet, context));
|
dataset.setRowLabelAttr(j, getAttributes(count2.getValue(), secondDataSet, context));
|
||||||
@@ -341,7 +341,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
// System.out.println("BOTH");
|
// System.out.println("BOTH");
|
||||||
|
|
||||||
} else{
|
} else{
|
||||||
//Make sure we have a dataSet
|
// Make sure we have a dataSet
|
||||||
dataset = new Dataset(1, topCounts1.length);
|
dataset = new Dataset(1, topCounts1.length);
|
||||||
for (int i = 0; i < topCounts1.length; i++) {
|
for (int i = 0; i < topCounts1.length; i++) {
|
||||||
ObjectCount count = topCounts1[i];
|
ObjectCount count = topCounts1[i];
|
||||||
@@ -365,38 +365,38 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
private void processAxis(DatasetGenerator datasetGenerator, List<DatasetQuery> queries) throws SQLException {
|
private void processAxis(DatasetGenerator datasetGenerator, List<DatasetQuery> queries) throws SQLException {
|
||||||
if(datasetGenerator instanceof DatasetDSpaceObjectGenerator){
|
if(datasetGenerator instanceof DatasetDSpaceObjectGenerator){
|
||||||
DatasetDSpaceObjectGenerator dspaceObjAxis = (DatasetDSpaceObjectGenerator) datasetGenerator;
|
DatasetDSpaceObjectGenerator dspaceObjAxis = (DatasetDSpaceObjectGenerator) datasetGenerator;
|
||||||
//Get the types involved
|
// Get the types involved
|
||||||
List<DSORepresentation> dsoRepresentations = dspaceObjAxis.getDsoRepresentations();
|
List<DSORepresentation> dsoRepresentations = dspaceObjAxis.getDsoRepresentations();
|
||||||
for (int i = 0; i < dsoRepresentations.size(); i++){
|
for (int i = 0; i < dsoRepresentations.size(); i++){
|
||||||
DatasetQuery datasetQuery = new DatasetQuery();
|
DatasetQuery datasetQuery = new DatasetQuery();
|
||||||
Integer dsoType = dsoRepresentations.get(i).getType();
|
Integer dsoType = dsoRepresentations.get(i).getType();
|
||||||
boolean seperate = dsoRepresentations.get(i).getSeparate();
|
boolean separate = dsoRepresentations.get(i).getSeparate();
|
||||||
Integer dsoLength = dsoRepresentations.get(i).getNameLength();
|
Integer dsoLength = dsoRepresentations.get(i).getNameLength();
|
||||||
//Check if our type is our current object
|
// Check if our type is our current object
|
||||||
if(currentDso != null && dsoType == currentDso.getType()){
|
if(currentDso != null && dsoType == currentDso.getType()){
|
||||||
Query query = new Query();
|
Query query = new Query();
|
||||||
query.setDso(currentDso.getID(), currentDso.getType(), dsoLength);
|
query.setDso(currentDso.getID(), currentDso.getType(), dsoLength);
|
||||||
datasetQuery.addQuery(query);
|
datasetQuery.addQuery(query);
|
||||||
}else{
|
}else{
|
||||||
//TODO: only do this for bitstreams from an item
|
// TODO: only do this for bitstreams from an item
|
||||||
Query query = new Query();
|
Query query = new Query();
|
||||||
if(currentDso != null && seperate && dsoType == Constants.BITSTREAM){
|
if(currentDso != null && separate && dsoType == Constants.BITSTREAM){
|
||||||
//CURRENTLY THIS IS ONLY POSSIBLE FOR AN ITEM ! ! ! ! ! ! !
|
// CURRENTLY THIS IS ONLY POSSIBLE FOR AN ITEM ! ! ! ! ! ! !
|
||||||
//We need to get the separate bitstreams from our item and make a query for each of them
|
// We need to get the separate bitstreams from our item and make a query for each of them
|
||||||
Item item = (Item) currentDso;
|
Item item = (Item) currentDso;
|
||||||
for (int j = 0; j < item.getBundles().length; j++) {
|
for (int j = 0; j < item.getBundles().length; j++) {
|
||||||
Bundle bundle = item.getBundles()[j];
|
Bundle bundle = item.getBundles()[j];
|
||||||
for (int k = 0; k < bundle.getBitstreams().length; k++) {
|
for (int k = 0; k < bundle.getBitstreams().length; k++) {
|
||||||
Bitstream bitstream = bundle.getBitstreams()[k];
|
Bitstream bitstream = bundle.getBitstreams()[k];
|
||||||
if(!bitstream.getFormat().isInternal()){
|
if(!bitstream.getFormat().isInternal()){
|
||||||
//Add a separate query for each bitstream
|
// Add a separate query for each bitstream
|
||||||
query.setDso(bitstream.getID(), bitstream.getType(), dsoLength);
|
query.setDso(bitstream.getID(), bitstream.getType(), dsoLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//We have something else than our current object.
|
// We have something else than our current object.
|
||||||
//So we need some kind of children from it, so put this in our query
|
// So we need some kind of children from it, so put this in our query
|
||||||
query.setOwningDso(currentDso);
|
query.setOwningDso(currentDso);
|
||||||
query.setDsoLength(dsoLength);
|
query.setDsoLength(dsoLength);
|
||||||
|
|
||||||
@@ -416,7 +416,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
datasetQuery.setName(title);
|
datasetQuery.setName(title);
|
||||||
//Put the type in so we only get the children of the type specified
|
// Put the type in so we only get the children of the type specified
|
||||||
query.setDsoType(dsoType);
|
query.setDsoType(dsoType);
|
||||||
}
|
}
|
||||||
datasetQuery.addQuery(query);
|
datasetQuery.addQuery(query);
|
||||||
@@ -431,7 +431,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
DatasetTypeGenerator typeAxis = (DatasetTypeGenerator) datasetGenerator;
|
DatasetTypeGenerator typeAxis = (DatasetTypeGenerator) datasetGenerator;
|
||||||
DatasetQuery datasetQuery = new DatasetQuery();
|
DatasetQuery datasetQuery = new DatasetQuery();
|
||||||
|
|
||||||
//First make sure our query is in order
|
// First make sure our query is in order
|
||||||
Query query = new Query();
|
Query query = new Query();
|
||||||
if(currentDso != null)
|
if(currentDso != null)
|
||||||
{
|
{
|
||||||
@@ -439,7 +439,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
}
|
}
|
||||||
datasetQuery.addQuery(query);
|
datasetQuery.addQuery(query);
|
||||||
|
|
||||||
//Then add the rest
|
// Then add the rest
|
||||||
datasetQuery.setMax(typeAxis.getMax());
|
datasetQuery.setMax(typeAxis.getMax());
|
||||||
datasetQuery.setFacetField(typeAxis.getType());
|
datasetQuery.setFacetField(typeAxis.getType());
|
||||||
datasetQuery.setName(typeAxis.getType());
|
datasetQuery.setName(typeAxis.getType());
|
||||||
@@ -567,7 +567,7 @@ public class StatisticsDataVisits extends StatisticsData
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If possible reference this bitstream via a handle, however this may
|
// If possible reference this bitstream via a handle, however this may
|
||||||
// be null if a handle has not yet been assigned. In this case refrence the
|
// be null if a handle has not yet been assigned. In this case reference the
|
||||||
// item its internal id. In the last case where the bitstream is not associated
|
// item its internal id. In the last case where the bitstream is not associated
|
||||||
// with an item (such as a community logo) then reference the bitstreamID directly.
|
// with an item (such as a community logo) then reference the bitstreamID directly.
|
||||||
String identifier = null;
|
String identifier = null;
|
||||||
|
@@ -14,13 +14,13 @@ import java.util.Set;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A Spare v4 IPTable implementation that uses nested HashMaps
|
* A Spare v4 IPTable implementation that uses nested HashMaps
|
||||||
* to optimize IP Address matching over ranges of IP Addresses.
|
* to optimize IP address matching over ranges of IP addresses.
|
||||||
*
|
*
|
||||||
* @author mdiggory at atmire.com
|
* @author mdiggory at atmire.com
|
||||||
*/
|
*/
|
||||||
public class IPTable {
|
public class IPTable {
|
||||||
|
|
||||||
/* A lookup tree for IP Addresses and SubnetRanges */
|
/* A lookup tree for IP addresses and SubnetRanges */
|
||||||
private Map<String, Map<String, Map<String, Set<String>>>> map =
|
private Map<String, Map<String, Map<String, Set<String>>>> map =
|
||||||
new HashMap<String, Map<String, Map<String, Set<String>>>>();
|
new HashMap<String, Map<String, Map<String, Set<String>>>>();
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ public class IPTable {
|
|||||||
|
|
||||||
if (subnets.length != 4)
|
if (subnets.length != 4)
|
||||||
{
|
{
|
||||||
throw new IPFormatException("needs to be single IP Address");
|
throw new IPFormatException("needs to be a single IP address");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Map<String, Set<String>>> first = map.get(subnets[0]);
|
Map<String, Map<String, Set<String>>> first = map.get(subnets[0]);
|
||||||
|
@@ -33,7 +33,7 @@ public class SpiderDetector {
|
|||||||
private static Logger log = Logger.getLogger(SpiderDetector.class);
|
private static Logger log = Logger.getLogger(SpiderDetector.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sparse HAshTable structure to hold IP Address Ranges.
|
* Sparse HashTable structure to hold IP address ranges.
|
||||||
*/
|
*/
|
||||||
private static IPTable table = null;
|
private static IPTable table = null;
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ function getObjectModel()
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the DSpace context for this request since each HTTP request generates
|
* Return the DSpace context for this request since each HTTP request generates
|
||||||
* a new context this object should never be stored and instead allways accessed
|
* a new context this object should never be stored and instead always accessed
|
||||||
* through this method so you are ensured that it is the correct one.
|
* through this method so you are ensured that it is the correct one.
|
||||||
*/
|
*/
|
||||||
function getDSContext()
|
function getDSContext()
|
||||||
@@ -35,7 +35,7 @@ function getDSContext()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The result object could potentialy contain a notice message and a list of
|
* The result object could potentially contain a notice message and a list of
|
||||||
* errors. If either of these are present then they are added to the sitemap's
|
* errors. If either of these are present then they are added to the sitemap's
|
||||||
* parameters.
|
* parameters.
|
||||||
*/
|
*/
|
||||||
@@ -212,7 +212,7 @@ function getCollection(handle, serviceDoc, DSClient)
|
|||||||
|
|
||||||
if (cocoon.request.get("deposit"))
|
if (cocoon.request.get("deposit"))
|
||||||
{
|
{
|
||||||
// A collection, or rather the location of one, has been selected, so lets
|
// A collection, or rather the location of one, has been selected, so let's
|
||||||
// see what file type and package format combos are available.
|
// see what file type and package format combos are available.
|
||||||
|
|
||||||
// We have a new request so need to attach the service doc again.
|
// We have a new request so need to attach the service doc again.
|
||||||
|
@@ -20,7 +20,7 @@ public class AtomDocumentRequest
|
|||||||
/** The password */
|
/** The password */
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
/** The IP Address */
|
/** The IP address */
|
||||||
private String IPAddress;
|
private String IPAddress;
|
||||||
|
|
||||||
/** The location */
|
/** The location */
|
||||||
|
@@ -60,7 +60,7 @@ public class Deposit
|
|||||||
/** Deposit ID */
|
/** Deposit ID */
|
||||||
private String depositID;
|
private String depositID;
|
||||||
|
|
||||||
/** The IP Address */
|
/** The IP address */
|
||||||
private String IPAddress;
|
private String IPAddress;
|
||||||
|
|
||||||
/** The location */
|
/** The location */
|
||||||
|
@@ -24,7 +24,7 @@ public class ServiceDocumentRequest
|
|||||||
/** The onBehalf of name */
|
/** The onBehalf of name */
|
||||||
private String onBehalfOf;
|
private String onBehalfOf;
|
||||||
|
|
||||||
/** The IP Address */
|
/** The IP address */
|
||||||
private String IPAddress;
|
private String IPAddress;
|
||||||
|
|
||||||
/** The location */
|
/** The location */
|
||||||
|
@@ -407,9 +407,9 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
cocoon.addLabel(T_COCOON_VERSION);
|
cocoon.addLabel(T_COCOON_VERSION);
|
||||||
cocoon.addItem(org.apache.cocoon.Constants.VERSION);
|
cocoon.addItem(org.apache.cocoon.Constants.VERSION);
|
||||||
|
|
||||||
//attempt to Display some basic info about Cocoon's Settings & Caches
|
// attempt to Display some basic info about Cocoon's Settings & Caches
|
||||||
|
|
||||||
//Get access to basic Cocoon Settings
|
// Get access to basic Cocoon Settings
|
||||||
if(this.settings!=null)
|
if(this.settings!=null)
|
||||||
{
|
{
|
||||||
//Output Cocoon's Work Directory & Cache Directory
|
//Output Cocoon's Work Directory & Cache Directory
|
||||||
@@ -420,38 +420,38 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if we have access to Cocoon's Default Cache
|
// Check if we have access to Cocoon's Default Cache
|
||||||
//Cocoon's Main (Default) Store is used to store objects that are serializable
|
// Cocoon's Main (Default) Store is used to store objects that are serializable
|
||||||
if(this.storeDefault!=null)
|
if(this.storeDefault!=null)
|
||||||
{
|
{
|
||||||
//Store name is just the className (remove the package info though, just to save space)
|
// Store name is just the className (remove the package info though, just to save space)
|
||||||
String storeName = this.storeDefault.getClass().getName();
|
String storeName = this.storeDefault.getClass().getName();
|
||||||
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
|
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
|
||||||
|
|
||||||
//display main store's cache info
|
// display main store's cache info
|
||||||
cocoon.addLabel(T_COCOON_MAIN_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storeDefault.hashCode())));
|
cocoon.addLabel(T_COCOON_MAIN_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storeDefault.hashCode())));
|
||||||
|
|
||||||
//display cache size & link to clear Cocoon's main cache
|
// display cache size & link to clear Cocoon's main cache
|
||||||
Item defaultSize = cocoon.addItem();
|
Item defaultSize = cocoon.addItem();
|
||||||
defaultSize.addContent(String.valueOf(this.storeDefault.size()) + " ");
|
defaultSize.addContent(String.valueOf(this.storeDefault.size()) + " ");
|
||||||
defaultSize.addXref(contextPath + "/admin/panel?java=true&clearcache=true", T_COCOON_CACHE_CLEAR);
|
defaultSize.addXref(contextPath + "/admin/panel?java=true&clearcache=true", T_COCOON_CACHE_CLEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we have access to Cocoon's Persistent Cache
|
// Check if we have access to Cocoon's Persistent Cache
|
||||||
//Cocoon's Persistent Store may be used by the Default Cache/Store to delegate persistent storage
|
// Cocoon's Persistent Store may be used by the Default Cache/Store to delegate persistent storage
|
||||||
//(it's an optional store which may not exist)
|
// (it's an optional store which may not exist)
|
||||||
if(this.storePersistent!=null)
|
if(this.storePersistent!=null)
|
||||||
{
|
{
|
||||||
//Store name is just the className (remove the package info though, just to save space)
|
// Store name is just the className (remove the package info though, just to save space)
|
||||||
String storeName = this.storeDefault.getClass().getName();
|
String storeName = this.storeDefault.getClass().getName();
|
||||||
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
|
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
|
||||||
|
|
||||||
//display persistent store's cache size info
|
// display persistent store's cache size info
|
||||||
cocoon.addLabel(T_COCOON_PERSISTENT_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storePersistent.hashCode())));
|
cocoon.addLabel(T_COCOON_PERSISTENT_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(this.storePersistent.hashCode())));
|
||||||
cocoon.addItem(String.valueOf(this.storePersistent.size()));
|
cocoon.addItem(String.valueOf(this.storePersistent.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check if we have access to Cocoon's StoreJanitor
|
// Check if we have access to Cocoon's StoreJanitor
|
||||||
//The Store Janitor manages all of Cocoon's "transient caches/stores"
|
// The Store Janitor manages all of Cocoon's "transient caches/stores"
|
||||||
// These "transient" stores are used for non-serializable objects or objects whose
|
// These "transient" stores are used for non-serializable objects or objects whose
|
||||||
// storage doesn't make sense across a server restart.
|
// storage doesn't make sense across a server restart.
|
||||||
if(this.storeJanitor!=null)
|
if(this.storeJanitor!=null)
|
||||||
@@ -460,14 +460,14 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
Iterator i = this.storeJanitor.iterator();
|
Iterator i = this.storeJanitor.iterator();
|
||||||
while(i.hasNext())
|
while(i.hasNext())
|
||||||
{
|
{
|
||||||
//get the Cache Store
|
// get the Cache Store
|
||||||
Store store = (Store) i.next();
|
Store store = (Store) i.next();
|
||||||
|
|
||||||
//Store name is just the className (remove the package info though, just to save space)
|
// Store name is just the className (remove the package info though, just to save space)
|
||||||
String storeName = store.getClass().getName();
|
String storeName = store.getClass().getName();
|
||||||
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
|
storeName = storeName.substring(storeName.lastIndexOf(".")+1);
|
||||||
|
|
||||||
//display its size information
|
// display its size information
|
||||||
cocoon.addLabel(T_COCOON_TRANS_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(store.hashCode())));
|
cocoon.addLabel(T_COCOON_TRANS_CACHE_SIZE.parameterize(storeName + ", 0x" + Integer.toHexString(store.hashCode())));
|
||||||
cocoon.addItem(String.valueOf(store.size()));
|
cocoon.addItem(String.valueOf(store.size()));
|
||||||
}
|
}
|
||||||
@@ -565,7 +565,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
countdown.addOption(30,T_alerts_countdown_30);
|
countdown.addOption(30,T_alerts_countdown_30);
|
||||||
countdown.addOption(60,T_alerts_countdown_60);
|
countdown.addOption(60,T_alerts_countdown_60);
|
||||||
|
|
||||||
// Is there a current count down active?
|
// Is there a current countdown active?
|
||||||
if (SystemwideAlerts.isAlertActive() && SystemwideAlerts.getCountDownToo() - System.currentTimeMillis() > 0)
|
if (SystemwideAlerts.isAlertActive() && SystemwideAlerts.getCountDownToo() - System.currentTimeMillis() > 0)
|
||||||
{
|
{
|
||||||
countdown.addOption(true, -1, T_alerts_countdown_keep);
|
countdown.addOption(true, -1, T_alerts_countdown_keep);
|
||||||
@@ -808,7 +808,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare these two activity events based upon the given sort parameter. In the case of a tie,
|
* Compare these two activity events based upon the given sort parameter. In the case of a tie,
|
||||||
* allways fallback to sorting based upon the timestamp.
|
* always fallback to sorting based upon the timestamp.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int compare(E a, E b)
|
public int compare(E a, E b)
|
||||||
@@ -863,7 +863,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
{
|
{
|
||||||
// Ensure that all sessions with an EPersonID associated are
|
// Ensure that all sessions with an EPersonID associated are
|
||||||
// ordered to the top. Otherwise fall back to comparing session
|
// ordered to the top. Otherwise fall back to comparing session
|
||||||
// IDs. Unfortunitaly we can not compare eperson names because
|
// IDs. Unfortunately, we cannot compare eperson names because
|
||||||
// we do not have access to a context object.
|
// we do not have access to a context object.
|
||||||
if (a.getEPersonID() > 0 && b.getEPersonID() < 0)
|
if (a.getEPersonID() > 0 && b.getEPersonID() < 0)
|
||||||
{
|
{
|
||||||
@@ -883,7 +883,7 @@ public class ControlPanel extends AbstractDSpaceTransformer implements Serviceab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// All ways fall back to sorting by time, when events are equal.
|
// Always fall back to sorting by time, when events are equal.
|
||||||
if (a.getTimeStamp() > b.getTimeStamp())
|
if (a.getTimeStamp() > b.getTimeStamp())
|
||||||
{
|
{
|
||||||
return 1; // A > B
|
return 1; // A > B
|
||||||
|
@@ -49,7 +49,7 @@ import org.xml.sax.SAXException;
|
|||||||
/**
|
/**
|
||||||
* Utility methods to processes actions on Communities and Collections.
|
* Utility methods to processes actions on Communities and Collections.
|
||||||
*
|
*
|
||||||
* @author scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
public class FlowContainerUtils
|
public class FlowContainerUtils
|
||||||
{
|
{
|
||||||
@@ -628,7 +628,7 @@ public class FlowContainerUtils
|
|||||||
|
|
||||||
if (roleID != 0)
|
if (roleID != 0)
|
||||||
{
|
{
|
||||||
throw new UIException("Unable to create a new default read group because either the group allready exists or multiple groups are assigned the default privleges.");
|
throw new UIException("Unable to create a new default read group because either the group already exists or multiple groups are assigned the default privileges.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection collection = Collection.find(context,collectionID);
|
Collection collection = Collection.find(context,collectionID);
|
||||||
@@ -668,7 +668,7 @@ public class FlowContainerUtils
|
|||||||
|
|
||||||
if (roleID < 1)
|
if (roleID < 1)
|
||||||
{
|
{
|
||||||
throw new UIException("Unable to delete the default read role because the role is either allready assigned to the anonymous group or multiple groups are assigned the default priveleges.");
|
throw new UIException("Unable to delete the default read role because the role is either already assigned to the anonymous group or multiple groups are assigned the default privileges.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection collection = Collection.find(context,collectionID);
|
Collection collection = Collection.find(context,collectionID);
|
||||||
@@ -1255,8 +1255,8 @@ public class FlowContainerUtils
|
|||||||
* then an error message will be returned that might (sometimes not) tell the user how
|
* then an error message will be returned that might (sometimes not) tell the user how
|
||||||
* to correct the problem.
|
* to correct the problem.
|
||||||
*
|
*
|
||||||
* @param value The metadat's value
|
* @param value The metadata value
|
||||||
* @return An error string of the problem or null if there is no problem with the metadata's value.
|
* @return An error string of the problem or null if there is no problem with the metadata value.
|
||||||
*/
|
*/
|
||||||
public static String checkXMLFragment(String value)
|
public static String checkXMLFragment(String value)
|
||||||
{
|
{
|
||||||
|
@@ -31,7 +31,7 @@ import org.dspace.eperson.EPersonDeletionException;
|
|||||||
* Utility methods to processes actions on EPeople. These methods are used
|
* Utility methods to processes actions on EPeople. These methods are used
|
||||||
* exclusively from the administrative flow scripts.
|
* exclusively from the administrative flow scripts.
|
||||||
*
|
*
|
||||||
* @author scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
public class FlowEPersonUtils {
|
public class FlowEPersonUtils {
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ public class FlowEPersonUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check if the email address is all ready being used.
|
// Check if the email address is already being used.
|
||||||
EPerson potentialDupicate = EPerson.findByEmail(context,email);
|
EPerson potentialDupicate = EPerson.findByEmail(context,email);
|
||||||
if (potentialDupicate != null)
|
if (potentialDupicate != null)
|
||||||
{
|
{
|
||||||
|
@@ -26,9 +26,9 @@ import org.dspace.eperson.Group;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility methods to processes actions on Groups. These methods are used
|
* Utility methods to processes actions on Groups. These methods are used
|
||||||
* exclusivly from the administrative flow scripts.
|
* exclusively from the administrative flow scripts.
|
||||||
*
|
*
|
||||||
* @author scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
public class FlowGroupUtils {
|
public class FlowGroupUtils {
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ public class FlowGroupUtils {
|
|||||||
*/
|
*/
|
||||||
public static String[] addMember(String[] list, String id)
|
public static String[] addMember(String[] list, String id)
|
||||||
{
|
{
|
||||||
// FIXME: this is terribly ineffecient.
|
// FIXME: this is terribly inefficient.
|
||||||
List<String> newList = new ArrayList<String>(Arrays.asList(list));
|
List<String> newList = new ArrayList<String>(Arrays.asList(list));
|
||||||
newList.add(id);
|
newList.add(id);
|
||||||
return newList.toArray(new String[newList.size()]);
|
return newList.toArray(new String[newList.size()]);
|
||||||
@@ -153,7 +153,7 @@ public class FlowGroupUtils {
|
|||||||
*/
|
*/
|
||||||
public static String[] removeMember(String[] list, String id)
|
public static String[] removeMember(String[] list, String id)
|
||||||
{
|
{
|
||||||
// FIXME: this is terribly ineffecient.
|
// FIXME: this is terribly inefficient.
|
||||||
List<String> newList = new ArrayList<String>(Arrays.asList(list));
|
List<String> newList = new ArrayList<String>(Arrays.asList(list));
|
||||||
newList.remove(id);
|
newList.remove(id);
|
||||||
return newList.toArray(new String[newList.size()]);
|
return newList.toArray(new String[newList.size()]);
|
||||||
@@ -176,7 +176,7 @@ public class FlowGroupUtils {
|
|||||||
{
|
{
|
||||||
FlowResult result = new FlowResult();
|
FlowResult result = new FlowResult();
|
||||||
|
|
||||||
// Decode the name incase it uses non-ascii characters.
|
// Decode the name in case it uses non-ascii characters.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
newName = URLDecoder.decode(newName, Constants.DEFAULT_ENCODING);
|
newName = URLDecoder.decode(newName, Constants.DEFAULT_ENCODING);
|
||||||
@@ -189,7 +189,7 @@ public class FlowGroupUtils {
|
|||||||
Group group = null;
|
Group group = null;
|
||||||
if (groupID == -1)
|
if (groupID == -1)
|
||||||
{
|
{
|
||||||
// First check if the name is blank.
|
// First, check if the name is blank.
|
||||||
if (newName == null || newName.length() == 0)
|
if (newName == null || newName.length() == 0)
|
||||||
{
|
{
|
||||||
// Group's can not have blank names.
|
// Group's can not have blank names.
|
||||||
@@ -201,7 +201,7 @@ public class FlowGroupUtils {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a new group, check if the newName is allready in use.
|
// Create a new group, check if the newName is already in use.
|
||||||
Group potentialDuplicate = Group.findByName(context,newName);
|
Group potentialDuplicate = Group.findByName(context,newName);
|
||||||
|
|
||||||
if (potentialDuplicate == null)
|
if (potentialDuplicate == null)
|
||||||
@@ -212,12 +212,12 @@ public class FlowGroupUtils {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The name is allready in use, return in error.
|
// The name is already in use, return an error.
|
||||||
result.setContinue(false);
|
result.setContinue(false);
|
||||||
result.addError("group_name");
|
result.addError("group_name");
|
||||||
result.addError("group_name_duplicate");
|
result.addError("group_name_duplicate");
|
||||||
result.setOutcome(false);
|
result.setOutcome(false);
|
||||||
result.setMessage(new Message("default","The group name is allready in use"));
|
result.setMessage(new Message("default","The group name is already in use"));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,7 @@ public class FlowGroupUtils {
|
|||||||
// Only update the name if there has been a change.
|
// Only update the name if there has been a change.
|
||||||
if (newName != null && newName.length() > 0 && !name.equals(newName))
|
if (newName != null && newName.length() > 0 && !name.equals(newName))
|
||||||
{
|
{
|
||||||
// The group name is to be updated, check if the newName is allready in use.
|
// The group name is to be updated, check if the newName is already in use.
|
||||||
Group potentialDuplicate = Group.findByName(context,newName);
|
Group potentialDuplicate = Group.findByName(context,newName);
|
||||||
|
|
||||||
if (potentialDuplicate == null)
|
if (potentialDuplicate == null)
|
||||||
@@ -240,19 +240,19 @@ public class FlowGroupUtils {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The name is allready in use, return in error.
|
// The name is already in use, return an error.
|
||||||
result.setContinue(false);
|
result.setContinue(false);
|
||||||
result.addError("group_name");
|
result.addError("group_name");
|
||||||
result.addError("group_name_duplicate");
|
result.addError("group_name_duplicate");
|
||||||
result.setOutcome(false);
|
result.setOutcome(false);
|
||||||
result.setMessage(new Message("default","The group name is allready in use"));
|
result.setMessage(new Message("default","The group name is already in use"));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second, Prepare to check members by turning arrays into lists
|
// Second, prepare to check members by turning arrays into lists
|
||||||
List<Integer> newEPeopleIDs = new ArrayList<Integer>();
|
List<Integer> newEPeopleIDs = new ArrayList<Integer>();
|
||||||
for (String epeopleID : newEPeopleIDsArray)
|
for (String epeopleID : newEPeopleIDsArray)
|
||||||
{
|
{
|
||||||
@@ -316,7 +316,7 @@ public class FlowGroupUtils {
|
|||||||
group.update();
|
group.update();
|
||||||
context.commit();
|
context.commit();
|
||||||
|
|
||||||
// Let's record our group id incase we created a new one.
|
// Let's record our group id in case we created a new one.
|
||||||
result.setParameter("groupID", group.getID());
|
result.setParameter("groupID", group.getID());
|
||||||
result.setContinue(true);
|
result.setContinue(true);
|
||||||
result.setOutcome(true);
|
result.setOutcome(true);
|
||||||
@@ -326,7 +326,7 @@ public class FlowGroupUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the specified groups. It is assumed that the user has allready confirm this selection.
|
* Remove the specified groups. It is assumed that the user has already confirmed this selection.
|
||||||
*
|
*
|
||||||
* @param context The current DSpace context
|
* @param context The current DSpace context
|
||||||
* @param groupIDs A list of groups to be removed.
|
* @param groupIDs A list of groups to be removed.
|
||||||
@@ -400,7 +400,7 @@ public class FlowGroupUtils {
|
|||||||
/**
|
/**
|
||||||
* These are the possible collection suffixes, all groups which are
|
* These are the possible collection suffixes, all groups which are
|
||||||
* specific to a collection will end with one of these. The collection
|
* specific to a collection will end with one of these. The collection
|
||||||
* id should be inbetween the prefix and the suffix.
|
* id should be in between the prefix and the suffix.
|
||||||
*
|
*
|
||||||
* Note: the order of these suffixes are important, see getCollectionRole()
|
* Note: the order of these suffixes are important, see getCollectionRole()
|
||||||
*/
|
*/
|
||||||
@@ -433,7 +433,7 @@ public class FlowGroupUtils {
|
|||||||
}
|
}
|
||||||
catch (NumberFormatException nfe)
|
catch (NumberFormatException nfe)
|
||||||
{
|
{
|
||||||
// Somethnig went wrong, just ignore the exception and
|
// Something went wrong, just ignore the exception and
|
||||||
// continue searching for a collection id
|
// continue searching for a collection id
|
||||||
} // try & catch
|
} // try & catch
|
||||||
} // if it ends with a proper suffix.
|
} // if it ends with a proper suffix.
|
||||||
|
@@ -38,7 +38,7 @@ import org.dspace.handle.HandleManager;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility methods to processes actions on Groups. These methods are used
|
* Utility methods to processes actions on Groups. These methods are used
|
||||||
* exclusivly from the administrative flow scripts.
|
* exclusively from the administrative flow scripts.
|
||||||
*
|
*
|
||||||
* @author Jay Paz
|
* @author Jay Paz
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
@@ -51,8 +51,8 @@ public class FlowItemUtils
|
|||||||
private static final Message T_metadata_added = new Message("default","New metadata was added.");
|
private static final Message T_metadata_added = new Message("default","New metadata was added.");
|
||||||
private static final Message T_item_withdrawn = new Message("default","The item has been withdrawn.");
|
private static final Message T_item_withdrawn = new Message("default","The item has been withdrawn.");
|
||||||
private static final Message T_item_reinstated = new Message("default","The item has been reinstated.");
|
private static final Message T_item_reinstated = new Message("default","The item has been reinstated.");
|
||||||
private static final Message T_item_moved = new Message("default","The item has been moved.");
|
private static final Message T_item_moved = new Message("default","The item has been moved.");
|
||||||
private static final Message T_item_move_destination_not_found = new Message("default","The selected destination collection could not be found.");
|
private static final Message T_item_move_destination_not_found = new Message("default","The selected destination collection could not be found.");
|
||||||
private static final Message T_bitstream_added = new Message("default","The new bitstream was successfully uploaded.");
|
private static final Message T_bitstream_added = new Message("default","The new bitstream was successfully uploaded.");
|
||||||
private static final Message T_bitstream_failed = new Message("default","Error while uploading file.");
|
private static final Message T_bitstream_failed = new Message("default","Error while uploading file.");
|
||||||
private static final Message T_bitstream_updated = new Message("default","The bitstream has been updated.");
|
private static final Message T_bitstream_updated = new Message("default","The bitstream has been updated.");
|
||||||
|
@@ -16,14 +16,14 @@ import org.dspace.app.xmlui.wing.Message;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents the results that may be generated during a flow script
|
* This class represents the results that may be generated during a flow script
|
||||||
* in this administrative section. Typicaly, some method preforms an operation
|
* in this administrative section. Typically, some method performs an operation
|
||||||
* and returns an object of type FlowResult, then the flow script can inspect
|
* and returns an object of type FlowResult, then the flow script can inspect
|
||||||
* the results object to determine what the next course of action is.
|
* the results object to determine what the next course of action is.
|
||||||
*
|
*
|
||||||
* Basicaly, this results object stores all the errors and contiunation states
|
* Basically, this results object stores all the errors and continuation states
|
||||||
* that need to be represented. There are four types of information stored:
|
* that need to be represented. There are four types of information stored:
|
||||||
*
|
*
|
||||||
* 1) Continuation, this is a simple boolean variable that indicates wheather
|
* 1) Continuation, this is a simple boolean variable that indicates whether
|
||||||
* the required operation is complete and the user may continue on to the next step.
|
* the required operation is complete and the user may continue on to the next step.
|
||||||
*
|
*
|
||||||
* 2) Notice information, this is a simple encoding of a notice message to be displayed
|
* 2) Notice information, this is a simple encoding of a notice message to be displayed
|
||||||
@@ -32,10 +32,10 @@ import org.dspace.app.xmlui.wing.Message;
|
|||||||
* or characters are required.
|
* or characters are required.
|
||||||
*
|
*
|
||||||
* 3) Errors, this is a list of errors that were encountered during processing.
|
* 3) Errors, this is a list of errors that were encountered during processing.
|
||||||
* Typical, it just consists of a list of errored fields. However occasionaly there
|
* Typically, it just consists of a list of errored fields. However occasionally there
|
||||||
* may be other specialized errors listed.
|
* may be other specialized errors listed.
|
||||||
*
|
*
|
||||||
* 4) Parameters, this is a map of attached parameters that may be relevnt to the
|
* 4) Parameters, this is a map of attached parameters that may be relevant to the
|
||||||
* result. This should be used for things such as generated id's when objects are newly
|
* result. This should be used for things such as generated id's when objects are newly
|
||||||
* created.
|
* created.
|
||||||
*
|
*
|
||||||
@@ -44,7 +44,7 @@ import org.dspace.app.xmlui.wing.Message;
|
|||||||
public class FlowResult {
|
public class FlowResult {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine wheather the operation has been completed enough that the user
|
* Determine whether the operation has been completed enough that the user
|
||||||
* may successufully continue on to the next step.
|
* may successufully continue on to the next step.
|
||||||
*/
|
*/
|
||||||
private boolean continuep;
|
private boolean continuep;
|
||||||
@@ -52,18 +52,18 @@ public class FlowResult {
|
|||||||
/**
|
/**
|
||||||
* Notice parameters:
|
* Notice parameters:
|
||||||
*
|
*
|
||||||
* Outcome: The outcome of the notice, may be either success, failure, or netural.
|
* Outcome: The outcome of the notice, may be either success, failure, or neutral.
|
||||||
*
|
*
|
||||||
* Header: The notice's label, an i18n dictionary key.
|
* Header: The notice's label, an i18n dictionary key.
|
||||||
*
|
*
|
||||||
* message: The main body of the notice, an i18n dictionary key.
|
* message: The main body of the notice, an i18n dictionary key.
|
||||||
*
|
*
|
||||||
* characters: Supplementaiol information for the notice, plain text. This is
|
* characters: Supplemental information for the notice, plain text. This is
|
||||||
* typicaly used for exepctions.
|
* typically used for exceptions.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private enum Outcome{ SUCCESS, FAILURE, NETURAL};
|
private enum Outcome{ SUCCESS, FAILURE, NEUTRAL};
|
||||||
private Outcome outcome = Outcome.NETURAL;
|
private Outcome outcome = Outcome.NEUTRAL;
|
||||||
private Message header;
|
private Message header;
|
||||||
private Message message;
|
private Message message;
|
||||||
private String characters;
|
private String characters;
|
||||||
@@ -103,8 +103,8 @@ public class FlowResult {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the notice outcome to either success or failure. Note,
|
* Set the notice outcome to either success or failure. Note,
|
||||||
* the default outcome is netural, once an outcome is set the
|
* the default outcome is neutral, once an outcome is set the
|
||||||
* netural outcome can never be atained again.
|
* neutral outcome can never be attained again.
|
||||||
*
|
*
|
||||||
* @param success True for success, false for failure.
|
* @param success True for success, false for failure.
|
||||||
*/
|
*/
|
||||||
@@ -122,7 +122,7 @@ public class FlowResult {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the notice outcome in string form, either success
|
* Get the notice outcome in string form, either success
|
||||||
* or failure. If the outcome is netural then null is returned.
|
* or failure. If the outcome is neutral then null is returned.
|
||||||
*/
|
*/
|
||||||
public String getOutcome()
|
public String getOutcome()
|
||||||
{
|
{
|
||||||
@@ -231,7 +231,7 @@ public class FlowResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the list of errors in string form, i.e. a comma seperated list
|
* Return the list of errors in string form, i.e. a comma-separated list
|
||||||
* of errors. If there are no errors then null is returned.
|
* of errors. If there are no errors then null is returned.
|
||||||
*/
|
*/
|
||||||
public String getErrorString()
|
public String getErrorString()
|
||||||
@@ -258,7 +258,7 @@ public class FlowResult {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attatch a new parameter to this result object with the specified
|
* Attach a new parameter to this result object with the specified
|
||||||
* name & value.
|
* name & value.
|
||||||
*
|
*
|
||||||
* @param name The parameter's name
|
* @param name The parameter's name
|
||||||
|
@@ -186,7 +186,7 @@ public class ItemExport extends AbstractDSpaceTransformer implements
|
|||||||
// Special case, don't cache anything if the user is logging
|
// Special case, don't cache anything if the user is logging
|
||||||
// in. The problem occures because of timming, this cache key
|
// in. The problem occures because of timming, this cache key
|
||||||
// is generated before we know whether the operation has
|
// is generated before we know whether the operation has
|
||||||
// succeded or failed. So we don't know whether to cache this
|
// succeeded or failed. So we don't know whether to cache this
|
||||||
// under the user's specific cache or under the anonymous user.
|
// under the user's specific cache or under the anonymous user.
|
||||||
if (request.getParameter("login_email") != null
|
if (request.getParameter("login_email") != null
|
||||||
|| request.getParameter("login_password") != null
|
|| request.getParameter("login_password") != null
|
||||||
|
@@ -102,7 +102,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
// Special case, don't cache anything if the user is logging
|
// Special case, don't cache anything if the user is logging
|
||||||
// in. The problem occures because of timming, this cache key
|
// in. The problem occures because of timming, this cache key
|
||||||
// is generated before we know whether the operation has
|
// is generated before we know whether the operation has
|
||||||
// succeded or failed. So we don't know whether to cache this
|
// succeeded or failed. So we don't know whether to cache this
|
||||||
// under the user's specific cache or under the anonymous user.
|
// under the user's specific cache or under the anonymous user.
|
||||||
if (request.getParameter("login_email") != null ||
|
if (request.getParameter("login_email") != null ||
|
||||||
request.getParameter("login_password") != null ||
|
request.getParameter("login_password") != null ||
|
||||||
|
@@ -19,9 +19,9 @@ import org.dspace.app.xmlui.wing.element.Para;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a generic error message saying the user can
|
* Display a generic error message saying the user can
|
||||||
* not preform the requested action.
|
* not perform the requested action.
|
||||||
*
|
*
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
public class NotAuthorized extends AbstractDSpaceTransformer
|
public class NotAuthorized extends AbstractDSpaceTransformer
|
||||||
{
|
{
|
||||||
|
@@ -31,7 +31,7 @@ import org.dspace.authorize.AuthorizeException;
|
|||||||
* can describe the new eperson before being created. If the user's
|
* can describe the new eperson before being created. If the user's
|
||||||
* input is incorrect in someway then they may be returning here with
|
* input is incorrect in someway then they may be returning here with
|
||||||
* some fields in error. In particular there is a special case for the
|
* some fields in error. In particular there is a special case for the
|
||||||
* condition when the email-adress entered is allready in use by
|
* condition when the email-address entered is already in use by
|
||||||
* another user.
|
* another user.
|
||||||
*
|
*
|
||||||
* @author Alexey Maslov
|
* @author Alexey Maslov
|
||||||
|
@@ -26,7 +26,7 @@ import org.dspace.eperson.EPerson;
|
|||||||
/**
|
/**
|
||||||
* The manage epeople page is the starting point page for managing
|
* The manage epeople page is the starting point page for managing
|
||||||
* epeople. From here the user is able to browse or search for epeople,
|
* epeople. From here the user is able to browse or search for epeople,
|
||||||
* once identified the user can selected them for deletition by selecting
|
* once identified the user can selected them for deletion by selecting
|
||||||
* the checkboxes and clicking delete or click their name to edit the
|
* the checkboxes and clicking delete or click their name to edit the
|
||||||
* eperson.
|
* eperson.
|
||||||
*
|
*
|
||||||
|
@@ -24,7 +24,7 @@ import org.dspace.eperson.Group;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Present the user with a list of soon-to-be-deleted Groups.
|
* Present the user with a list of soon-to-be-deleted Groups.
|
||||||
* If the user clicks confirm deletition then they will be
|
* If the user clicks confirm deletion then they will be
|
||||||
* deleted otherwise they will be spared the wrath of deletion.
|
* deleted otherwise they will be spared the wrath of deletion.
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
|
@@ -414,7 +414,7 @@ public class EditGroupForm extends AbstractDSpaceTransformer
|
|||||||
personData.addCell().addXref(url, fullName);
|
personData.addCell().addXref(url, fullName);
|
||||||
personData.addCell().addXref(url, email);
|
personData.addCell().addXref(url, email);
|
||||||
|
|
||||||
// check if they are allready a member of the group
|
// check if they are already a member of the group
|
||||||
if (memberEPeopleIDs.contains(person.getID()))
|
if (memberEPeopleIDs.contains(person.getID()))
|
||||||
{
|
{
|
||||||
// Check if they really members or just pending members
|
// Check if they really members or just pending members
|
||||||
@@ -531,7 +531,7 @@ public class EditGroupForm extends AbstractDSpaceTransformer
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check if the group is allready a member or would create a cycle.
|
// Check if the group is already a member or would create a cycle.
|
||||||
if (memberGroupIDs.contains(group.getID()))
|
if (memberGroupIDs.contains(group.getID()))
|
||||||
{
|
{
|
||||||
// Check if they really members or just pending members
|
// Check if they really members or just pending members
|
||||||
@@ -691,12 +691,12 @@ public class EditGroupForm extends AbstractDSpaceTransformer
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a singe member row for groups.
|
* Add a single member row for groups.
|
||||||
*
|
*
|
||||||
* @param table The table to add the row too.
|
* @param table The table to add the row too.
|
||||||
* @param group The group being displayed in this row.
|
* @param group The group being displayed in this row.
|
||||||
* @param highlight Should the row be highlighted.
|
* @param highlight Should the row be highlighted.
|
||||||
* @param pendingAddition Is this group pending additition
|
* @param pendingAddition Is this group pending addition
|
||||||
* @param pendingRemoval Is this group pending removal
|
* @param pendingRemoval Is this group pending removal
|
||||||
*/
|
*/
|
||||||
private void addMemberRow(Table table,Group group, boolean highlight, boolean pendingAddition, boolean pendingRemoval) throws WingException, SQLException
|
private void addMemberRow(Table table,Group group, boolean highlight, boolean pendingAddition, boolean pendingRemoval) throws WingException, SQLException
|
||||||
|
@@ -31,7 +31,7 @@ import org.dspace.eperson.Group;
|
|||||||
/**
|
/**
|
||||||
* Manage groups page is the entry point for group management. From here the user
|
* Manage groups page is the entry point for group management. From here the user
|
||||||
* may browse/search a the list of groups, they may also add new groups or select
|
* may browse/search a the list of groups, they may also add new groups or select
|
||||||
* exiting groups to edit or delete.
|
* existing groups to edit or delete.
|
||||||
*
|
*
|
||||||
* @author Alexey Maslov
|
* @author Alexey Maslov
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
|
@@ -164,7 +164,7 @@ public class AddBitstreamForm extends AbstractDSpaceTransformer
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
// At least one bundle exists, does the user have privleges to upload to it?
|
// At least one bundle exists, does the user have privileges to upload to it?
|
||||||
Bundle bundle = bundles[0];
|
Bundle bundle = bundles[0];
|
||||||
if (!AuthorizeManager.authorizeActionBoolean(context, bundle, Constants.ADD))
|
if (!AuthorizeManager.authorizeActionBoolean(context, bundle, Constants.ADD))
|
||||||
{
|
{
|
||||||
|
@@ -29,7 +29,7 @@ import org.dspace.content.Item;
|
|||||||
/**
|
/**
|
||||||
* This page is used as a general confirmation page for any
|
* This page is used as a general confirmation page for any
|
||||||
* actions on items. It will display the item and ask if the
|
* actions on items. It will display the item and ask if the
|
||||||
* user is sure they want to preform the action.
|
* user is sure they want to perform the action.
|
||||||
*
|
*
|
||||||
* The "confirm" parameter determines what action is confirmed.
|
* The "confirm" parameter determines what action is confirmed.
|
||||||
* There are three possible values, "delete", "withdraw", or
|
* There are three possible values, "delete", "withdraw", or
|
||||||
@@ -138,7 +138,7 @@ public class ConfirmItemForm extends AbstractDSpaceTransformer {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare two metadata element's name so that they may be sorted.
|
* Compare names of two metadata elements so that they may be sorted.
|
||||||
*/
|
*/
|
||||||
static class DCValueComparator implements Comparator, Serializable {
|
static class DCValueComparator implements Comparator, Serializable {
|
||||||
public int compare(Object arg0, Object arg1) {
|
public int compare(Object arg0, Object arg1) {
|
||||||
|
@@ -37,7 +37,7 @@ import org.dspace.core.Constants;
|
|||||||
* edit them, or upload new bitstreams.
|
* edit them, or upload new bitstreams.
|
||||||
*
|
*
|
||||||
* @author Jay Paz
|
* @author Jay Paz
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class EditItemBitstreamsForm extends AbstractDSpaceTransformer {
|
public class EditItemBitstreamsForm extends AbstractDSpaceTransformer {
|
||||||
|
@@ -27,7 +27,7 @@ import org.dspace.core.Constants;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Display basic meta-meta information about the item and allow the user to change
|
* Display basic meta-meta information about the item and allow the user to change
|
||||||
* it's state such as withdraw or reinstate, possibily even completely deleting the item!
|
* its state such as withdraw or reinstate, possibly even completely deleting the item!
|
||||||
*
|
*
|
||||||
* @author Jay Paz
|
* @author Jay Paz
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
@@ -58,12 +58,12 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
|
|||||||
private static final Message T_label_auth = message("xmlui.administrative.item.EditItemStatusForm.label_auth");
|
private static final Message T_label_auth = message("xmlui.administrative.item.EditItemStatusForm.label_auth");
|
||||||
private static final Message T_label_withdraw = message("xmlui.administrative.item.EditItemStatusForm.label_withdraw");
|
private static final Message T_label_withdraw = message("xmlui.administrative.item.EditItemStatusForm.label_withdraw");
|
||||||
private static final Message T_label_reinstate = message("xmlui.administrative.item.EditItemStatusForm.label_reinstate");
|
private static final Message T_label_reinstate = message("xmlui.administrative.item.EditItemStatusForm.label_reinstate");
|
||||||
private static final Message T_label_move = message("xmlui.administrative.item.EditItemStatusForm.label_move");
|
private static final Message T_label_move = message("xmlui.administrative.item.EditItemStatusForm.label_move");
|
||||||
private static final Message T_label_delete = message("xmlui.administrative.item.EditItemStatusForm.label_delete");
|
private static final Message T_label_delete = message("xmlui.administrative.item.EditItemStatusForm.label_delete");
|
||||||
private static final Message T_submit_authorizations = message("xmlui.administrative.item.EditItemStatusForm.submit_authorizations");
|
private static final Message T_submit_authorizations = message("xmlui.administrative.item.EditItemStatusForm.submit_authorizations");
|
||||||
private static final Message T_submit_withdraw = message("xmlui.administrative.item.EditItemStatusForm.submit_withdraw");
|
private static final Message T_submit_withdraw = message("xmlui.administrative.item.EditItemStatusForm.submit_withdraw");
|
||||||
private static final Message T_submit_reinstate = message("xmlui.administrative.item.EditItemStatusForm.submit_reinstate");
|
private static final Message T_submit_reinstate = message("xmlui.administrative.item.EditItemStatusForm.submit_reinstate");
|
||||||
private static final Message T_submit_move = message("xmlui.administrative.item.EditItemStatusForm.submit_move");
|
private static final Message T_submit_move = message("xmlui.administrative.item.EditItemStatusForm.submit_move");
|
||||||
private static final Message T_submit_delete = message("xmlui.administrative.item.EditItemStatusForm.submit_delete");
|
private static final Message T_submit_delete = message("xmlui.administrative.item.EditItemStatusForm.submit_delete");
|
||||||
private static final Message T_na = message("xmlui.administrative.item.EditItemStatusForm.na");
|
private static final Message T_na = message("xmlui.administrative.item.EditItemStatusForm.na");
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// PARA: Helpfull instructions
|
// PARA: Helpful instructions
|
||||||
main.addPara(T_para1);
|
main.addPara(T_para1);
|
||||||
|
|
||||||
|
|
||||||
@@ -137,7 +137,8 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
|
|||||||
if(item.getHandle()==null){
|
if(item.getHandle()==null){
|
||||||
itemInfo.addItem(T_na);
|
itemInfo.addItem(T_na);
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
itemInfo.addItem().addXref(ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle(),ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle());
|
itemInfo.addItem().addXref(ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle(),ConfigurationManager.getProperty("dspace.url") + "/handle/" + item.getHandle());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,46 +151,46 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
|
|||||||
catch (AuthorizeException authex)
|
catch (AuthorizeException authex)
|
||||||
{
|
{
|
||||||
addNotAllowedButton(itemInfo.addItem(), "submit_authorization", T_submit_authorizations);
|
addNotAllowedButton(itemInfo.addItem(), "submit_authorization", T_submit_authorizations);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!item.isWithdrawn())
|
if(!item.isWithdrawn())
|
||||||
{
|
{
|
||||||
itemInfo.addLabel(T_label_withdraw);
|
itemInfo.addLabel(T_label_withdraw);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AuthorizeUtil.authorizeWithdrawItem(context, item);
|
AuthorizeUtil.authorizeWithdrawItem(context, item);
|
||||||
itemInfo.addItem().addButton("submit_withdraw").setValue(T_submit_withdraw);
|
itemInfo.addItem().addButton("submit_withdraw").setValue(T_submit_withdraw);
|
||||||
}
|
}
|
||||||
catch (AuthorizeException authex)
|
catch (AuthorizeException authex)
|
||||||
{
|
{
|
||||||
addNotAllowedButton(itemInfo.addItem(), "submit_withdraw", T_submit_withdraw);
|
addNotAllowedButton(itemInfo.addItem(), "submit_withdraw", T_submit_withdraw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
itemInfo.addLabel(T_label_reinstate);
|
itemInfo.addLabel(T_label_reinstate);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AuthorizeUtil.authorizeReinstateItem(context, item);
|
AuthorizeUtil.authorizeReinstateItem(context, item);
|
||||||
itemInfo.addItem().addButton("submit_reinstate").setValue(T_submit_reinstate);
|
itemInfo.addItem().addButton("submit_reinstate").setValue(T_submit_reinstate);
|
||||||
}
|
}
|
||||||
catch (AuthorizeException authex)
|
catch (AuthorizeException authex)
|
||||||
{
|
{
|
||||||
addNotAllowedButton(itemInfo.addItem(), "submit_reinstate", T_submit_reinstate);
|
addNotAllowedButton(itemInfo.addItem(), "submit_reinstate", T_submit_reinstate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
itemInfo.addLabel(T_label_move);
|
itemInfo.addLabel(T_label_move);
|
||||||
addCollectionAdminOnlyButton(itemInfo.addItem(), item.getOwningCollection(), "submit_move", T_submit_move);
|
addCollectionAdminOnlyButton(itemInfo.addItem(), item.getOwningCollection(), "submit_move", T_submit_move);
|
||||||
|
|
||||||
itemInfo.addLabel(T_label_delete);
|
itemInfo.addLabel(T_label_delete);
|
||||||
if (AuthorizeManager.authorizeActionBoolean(context, item, Constants.DELETE))
|
if (AuthorizeManager.authorizeActionBoolean(context, item, Constants.DELETE))
|
||||||
{
|
{
|
||||||
itemInfo.addItem().addButton("submit_delete").setValue(T_submit_delete);
|
itemInfo.addItem().addButton("submit_delete").setValue(T_submit_delete);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
addNotAllowedButton(itemInfo.addItem(), "submit_delete", T_submit_delete);
|
addNotAllowedButton(itemInfo.addItem(), "submit_delete", T_submit_delete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -211,24 +212,24 @@ public class EditItemStatusForm extends AbstractDSpaceTransformer {
|
|||||||
*/
|
*/
|
||||||
private void addNotAllowedButton(org.dspace.app.xmlui.wing.element.Item item, String buttonName, Message buttonLabel) throws WingException, SQLException
|
private void addNotAllowedButton(org.dspace.app.xmlui.wing.element.Item item, String buttonName, Message buttonLabel) throws WingException, SQLException
|
||||||
{
|
{
|
||||||
Button button = item.addButton(buttonName);
|
Button button = item.addButton(buttonName);
|
||||||
button.setValue(buttonLabel);
|
button.setValue(buttonLabel);
|
||||||
button.setDisabled();
|
button.setDisabled();
|
||||||
item.addHighlight("fade").addContent(T_not_allowed);
|
item.addHighlight("fade").addContent(T_not_allowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addCollectionAdminOnlyButton(org.dspace.app.xmlui.wing.element.Item item, Collection collection, String buttonName, Message buttonLabel) throws WingException, SQLException
|
private void addCollectionAdminOnlyButton(org.dspace.app.xmlui.wing.element.Item item, Collection collection, String buttonName, Message buttonLabel) throws WingException, SQLException
|
||||||
{
|
{
|
||||||
Button button = item.addButton(buttonName);
|
Button button = item.addButton(buttonName);
|
||||||
button.setValue(buttonLabel);
|
button.setValue(buttonLabel);
|
||||||
|
|
||||||
|
|
||||||
if (!AuthorizeManager.isAdmin(context, collection))
|
if (!AuthorizeManager.isAdmin(context, collection))
|
||||||
{
|
{
|
||||||
// Only admins can create or delete
|
// Only admins can create or delete
|
||||||
button.setDisabled();
|
button.setDisabled();
|
||||||
item.addHighlight("fade").addContent(T_collectionadmins_only);
|
item.addHighlight("fade").addContent(T_collectionadmins_only);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ import org.dspace.content.Item;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Display basic meta-meta information about the item and allow the user to
|
* Display basic meta-meta information about the item and allow the user to
|
||||||
* change it's state such as withdraw or reinstate, possibily even completely
|
* change its state such as withdraw or reinstate, possibly even completely
|
||||||
* deleting the item!
|
* deleting the item!
|
||||||
*
|
*
|
||||||
* @author Jay Paz
|
* @author Jay Paz
|
||||||
@@ -59,7 +59,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
|
|||||||
private static final Message T_show_simple =
|
private static final Message T_show_simple =
|
||||||
message("xmlui.ArtifactBrowser.ItemViewer.show_simple");
|
message("xmlui.ArtifactBrowser.ItemViewer.show_simple");
|
||||||
|
|
||||||
private static final Message T_show_full =
|
private static final Message T_show_full =
|
||||||
message("xmlui.ArtifactBrowser.ItemViewer.show_full");
|
message("xmlui.ArtifactBrowser.ItemViewer.show_full");
|
||||||
public void addPageMeta(PageMeta pageMeta) throws WingException {
|
public void addPageMeta(PageMeta pageMeta) throws WingException {
|
||||||
pageMeta.addMetadata("title").addContent(T_title);
|
pageMeta.addMetadata("title").addContent(T_title);
|
||||||
@@ -72,13 +72,13 @@ public class ViewItem extends AbstractDSpaceTransformer {
|
|||||||
public void addBody(Body body) throws SQLException, WingException {
|
public void addBody(Body body) throws SQLException, WingException {
|
||||||
// Get our parameters and state
|
// Get our parameters and state
|
||||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||||
String show = request.getParameter("show");
|
String show = request.getParameter("show");
|
||||||
boolean showFullItem = false;
|
boolean showFullItem = false;
|
||||||
if (show != null && show.length() > 0)
|
if (show != null && show.length() > 0)
|
||||||
{
|
{
|
||||||
showFullItem = true;
|
showFullItem = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int itemID = parameters.getParameterAsInteger("itemID", -1);
|
int itemID = parameters.getParameterAsInteger("itemID", -1);
|
||||||
Item item = Item.find(context, itemID);
|
Item item = Item.find(context, itemID);
|
||||||
String baseURL = contextPath + "/admin/item?administrative-continue="
|
String baseURL = contextPath + "/admin/item?administrative-continue="
|
||||||
@@ -91,7 +91,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
|
|||||||
contextPath + "/admin/item", Division.METHOD_POST,
|
contextPath + "/admin/item", Division.METHOD_POST,
|
||||||
"primary administrative edit-item-status");
|
"primary administrative edit-item-status");
|
||||||
main.setHead(T_option_head);
|
main.setHead(T_option_head);
|
||||||
|
|
||||||
// LIST: options
|
// LIST: options
|
||||||
List options = main.addList("options", List.TYPE_SIMPLE, "horizontal");
|
List options = main.addList("options", List.TYPE_SIMPLE, "horizontal");
|
||||||
options.addItem().addXref(
|
options.addItem().addXref(
|
||||||
@@ -102,7 +102,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
|
|||||||
T_option_metadata);
|
T_option_metadata);
|
||||||
options.addItem().addHighlight("bold").addXref(tabLink, T_option_view);
|
options.addItem().addHighlight("bold").addXref(tabLink, T_option_view);
|
||||||
options.addItem().addXref(baseURL + "&submit_curate", T_option_curate);
|
options.addItem().addXref(baseURL + "&submit_curate", T_option_curate);
|
||||||
|
|
||||||
// item
|
// item
|
||||||
|
|
||||||
Para showfullPara = main.addPara(null, "item-view-toggle item-view-toggle-top");
|
Para showfullPara = main.addPara(null, "item-view-toggle item-view-toggle-top");
|
||||||
@@ -121,7 +121,7 @@ public class ViewItem extends AbstractDSpaceTransformer {
|
|||||||
ReferenceSet referenceSet;
|
ReferenceSet referenceSet;
|
||||||
referenceSet = main.addReferenceSet("collection-viewer",
|
referenceSet = main.addReferenceSet("collection-viewer",
|
||||||
showFullItem?ReferenceSet.TYPE_DETAIL_VIEW:ReferenceSet.TYPE_SUMMARY_VIEW);
|
showFullItem?ReferenceSet.TYPE_DETAIL_VIEW:ReferenceSet.TYPE_SUMMARY_VIEW);
|
||||||
// Refrence the actual Item
|
// Reference the actual Item
|
||||||
ReferenceSet appearsInclude = referenceSet.addReference(item)
|
ReferenceSet appearsInclude = referenceSet.addReference(item)
|
||||||
.addReferenceSet(ReferenceSet.TYPE_DETAIL_LIST, null, "hierarchy");
|
.addReferenceSet(ReferenceSet.TYPE_DETAIL_LIST, null, "hierarchy");
|
||||||
appearsInclude.setHead(T_head_parent_collections);
|
appearsInclude.setHead(T_head_parent_collections);
|
||||||
|
@@ -33,7 +33,7 @@ import org.xml.sax.SAXException;
|
|||||||
/**
|
/**
|
||||||
* List all items in this collection that are mapped from other collections.
|
* List all items in this collection that are mapped from other collections.
|
||||||
*
|
*
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class BrowseItemForm extends AbstractDSpaceTransformer {
|
public class BrowseItemForm extends AbstractDSpaceTransformer {
|
||||||
|
@@ -31,7 +31,7 @@ import org.xml.sax.SAXException;
|
|||||||
* search for new items to import or browse a list of currently mapped
|
* search for new items to import or browse a list of currently mapped
|
||||||
* items.
|
* items.
|
||||||
*
|
*
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MapperMain extends AbstractDSpaceTransformer {
|
public class MapperMain extends AbstractDSpaceTransformer {
|
||||||
|
@@ -34,7 +34,7 @@ import org.xml.sax.SAXException;
|
|||||||
/**
|
/**
|
||||||
* Search for items from other collections to map into this collection.
|
* Search for items from other collections to map into this collection.
|
||||||
*
|
*
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SearchItemForm extends AbstractDSpaceTransformer {
|
public class SearchItemForm extends AbstractDSpaceTransformer {
|
||||||
@@ -71,7 +71,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
|
|||||||
Collection collection = Collection.find(context,collectionID);
|
Collection collection = Collection.find(context,collectionID);
|
||||||
|
|
||||||
String query = decodeFromURL(parameters.getParameter("query",null));
|
String query = decodeFromURL(parameters.getParameter("query",null));
|
||||||
java.util.List<Item> items = preformSearch(collection,query);
|
java.util.List<Item> items = performSearch(collection,query);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
|
|||||||
{
|
{
|
||||||
author = dcCreators[0].value;
|
author = dcCreators[0].value;
|
||||||
} else {
|
} else {
|
||||||
// Do a fall back look for contributors
|
// Do a fallback look for contributors
|
||||||
DCValue[] dcContributors = item.getDC("contributor",Item.ANY,Item.ANY);
|
DCValue[] dcContributors = item.getDC("contributor",Item.ANY,Item.ANY);
|
||||||
if (dcContributors != null && dcContributors.length >= 1)
|
if (dcContributors != null && dcContributors.length >= 1)
|
||||||
{
|
{
|
||||||
@@ -166,7 +166,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
|
|||||||
* @param collection The collection to mapp into
|
* @param collection The collection to mapp into
|
||||||
* @param query The search query.
|
* @param query The search query.
|
||||||
*/
|
*/
|
||||||
private java.util.List<Item> preformSearch(Collection collection, String query) throws SQLException, IOException
|
private java.util.List<Item> performSearch(Collection collection, String query) throws SQLException, IOException
|
||||||
{
|
{
|
||||||
|
|
||||||
// Search the repository
|
// Search the repository
|
||||||
@@ -196,7 +196,7 @@ public class SearchItemForm extends AbstractDSpaceTransformer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,10 +23,10 @@ import org.dspace.authorize.AuthorizeException;
|
|||||||
import org.dspace.content.BitstreamFormat;
|
import org.dspace.content.BitstreamFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Confirm the deletition of bitstream formats by listing to-be-deleted
|
* Confirm the deletion of bitstream formats by listing to-be-deleted
|
||||||
* formats and asking the user for confirmation.
|
* formats and asking the user for confirmation.
|
||||||
*
|
*
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
public class DeleteBitstreamFormatsConfirm extends AbstractDSpaceTransformer
|
public class DeleteBitstreamFormatsConfirm extends AbstractDSpaceTransformer
|
||||||
{
|
{
|
||||||
|
@@ -27,7 +27,7 @@ import org.dspace.content.MetadataSchema;
|
|||||||
* Prompt the user with a list of to-be-deleted metadata fields and
|
* Prompt the user with a list of to-be-deleted metadata fields and
|
||||||
* ask the user if they are sure they want them deleted.
|
* ask the user if they are sure they want them deleted.
|
||||||
*
|
*
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
public class DeleteMetadataFieldsConfirm extends AbstractDSpaceTransformer
|
public class DeleteMetadataFieldsConfirm extends AbstractDSpaceTransformer
|
||||||
{
|
{
|
||||||
|
@@ -25,7 +25,7 @@ import org.dspace.content.MetadataSchema;
|
|||||||
/**
|
/**
|
||||||
* Prompt the user to determin if they really want to delete the displayed schemas.
|
* Prompt the user to determin if they really want to delete the displayed schemas.
|
||||||
*
|
*
|
||||||
* @author Scott phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
public class DeleteMetadataSchemaConfirm extends AbstractDSpaceTransformer
|
public class DeleteMetadataSchemaConfirm extends AbstractDSpaceTransformer
|
||||||
{
|
{
|
||||||
|
@@ -216,7 +216,7 @@ public class EditMetadataSchema extends AbstractDSpaceTransformer
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Only show the actions if there are fields available to preform them on.
|
// Only show the actions if there are fields available to perform them on.
|
||||||
Para actions = main.addPara();
|
Para actions = main.addPara();
|
||||||
actions.addButton("submit_delete").setValue(T_submit_delete);
|
actions.addButton("submit_delete").setValue(T_submit_delete);
|
||||||
if (MetadataSchema.findAll(context).length > 1)
|
if (MetadataSchema.findAll(context).length > 1)
|
||||||
@@ -347,7 +347,7 @@ public class EditMetadataSchema extends AbstractDSpaceTransformer
|
|||||||
* Determine if there were any special errors and display approparte
|
* Determine if there were any special errors and display approparte
|
||||||
* text. Because of the inline nature of the element and qualifier
|
* text. Because of the inline nature of the element and qualifier
|
||||||
* fields these errors can not be placed on the field. Instead they
|
* fields these errors can not be placed on the field. Instead they
|
||||||
* have to be added as seperate items above the field.
|
* have to be added as separate items above the field.
|
||||||
*
|
*
|
||||||
* @param form The form to add errors to.
|
* @param form The form to add errors to.
|
||||||
* @param errors A list of errors.
|
* @param errors A list of errors.
|
||||||
|
@@ -51,10 +51,10 @@ import org.xml.sax.SAXException;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This is an abstract search page. It is a collection of search methods that
|
* This is an abstract search page. It is a collection of search methods that
|
||||||
* are common between different search implementation. An implementer must
|
* are common between different search implementations. An implementation must
|
||||||
* implement at least three methods: addBody(), getQuery(), and generateURL().
|
* provide at least three methods: addBody(), getQuery(), and generateURL().
|
||||||
*
|
*
|
||||||
* See the two implementors: SimpleSearch and AdvancedSearch.
|
* See the two implementations: SimpleSearch and AdvancedSearch.
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
@@ -538,8 +538,8 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer
|
|||||||
* Determine if the scope of the search should fixed or is changeable by the
|
* Determine if the scope of the search should fixed or is changeable by the
|
||||||
* user.
|
* user.
|
||||||
*
|
*
|
||||||
* The search scope when preformed by url, i.e. they are at the url handle/xxxx/xx/search
|
* The search scope when performed by url, i.e. they are at the url handle/xxxx/xx/search
|
||||||
* then it is fixed. However at the global level the search is variable.
|
* then it is fixed. However, at the global level the search is variable.
|
||||||
*
|
*
|
||||||
* @return true if the scope is variable, false otherwise.
|
* @return true if the scope is variable, false otherwise.
|
||||||
*/
|
*/
|
||||||
|
@@ -39,16 +39,16 @@ import org.dspace.core.ConfigurationManager;
|
|||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Preform an advanced search of the repository. The user is presented with
|
* Perform an advanced search of the repository. The user is presented with
|
||||||
* three search parameters, that may be ORed, ANDed, NOTed together.
|
* three search parameters, that may be ORed, ANDed, NOTed together.
|
||||||
*
|
*
|
||||||
* At the present time only three fields are displayed however if the theme
|
* At the present time only three fields are displayed however if the theme
|
||||||
* whishes to expand this they can by setting the num_search_fields to the
|
* whishes to expand this they can do so by setting the num_search_fields to the
|
||||||
* desired number of search fields. Also the theme can change the number of
|
* desired number of search fields. Also, the theme can change the number of
|
||||||
* results per the page by setting results_per_page
|
* results per the page by setting results_per_page
|
||||||
*
|
*
|
||||||
* FIXME: The list of what fields are search should come from a configurable
|
* FIXME: The list of what fields are search should come from a configurable
|
||||||
* place. Possibily the sitemap configuration.
|
* place. Possibly the sitemap configuration.
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
*/
|
*/
|
||||||
@@ -191,7 +191,7 @@ public class AdvancedSearch extends AbstractSearch implements CacheableProcessin
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a conjunction field in the given for the given cell. A
|
* Build a conjunction field in the given for the given cell. A
|
||||||
* conjunction consists of logical the operators AND, OR, NOT.
|
* conjunction consists of logical operators AND, OR, NOT.
|
||||||
*
|
*
|
||||||
* @param row The current row
|
* @param row The current row
|
||||||
* @param cell The current cell
|
* @param cell The current cell
|
||||||
@@ -406,13 +406,13 @@ public class AdvancedSearch extends AbstractSearch implements CacheableProcessin
|
|||||||
{
|
{
|
||||||
// Specific search field specified, add the field specific field.
|
// Specific search field specified, add the field specific field.
|
||||||
|
|
||||||
// Replace singe quote's with double quotes (only if they match)
|
// Replace single quotes with double quotes (only if they match)
|
||||||
String subQuery = util.substitute("s/\'(.*)\'/\"$1\"/g", field.getQuery());
|
String subQuery = util.substitute("s/\'(.*)\'/\"$1\"/g", field.getQuery());
|
||||||
|
|
||||||
// If the field is not quoted ...
|
// If the field is not quoted ...
|
||||||
if (!util.match("/\".*\"/", subQuery))
|
if (!util.match("/\".*\"/", subQuery))
|
||||||
{
|
{
|
||||||
// ... then seperate each word and re-specify the search field.
|
// ... then separate each word and re-specify the search field.
|
||||||
subQuery = util.substitute("s/[ ]+/ " + field.getField() + ":/g", subQuery);
|
subQuery = util.substitute("s/[ ]+/ " + field.getField() + ":/g", subQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,7 +521,7 @@ public class AdvancedSearch extends AbstractSearch implements CacheableProcessin
|
|||||||
*/
|
*/
|
||||||
private static class SearchField {
|
private static class SearchField {
|
||||||
|
|
||||||
/** What index the search field is, typicaly there are just three - but the theme may exand this number */
|
/** What index the search field is, typically there are just three - but the theme may expand this number */
|
||||||
private int index;
|
private int index;
|
||||||
|
|
||||||
/** The field to search, ANY if none specified */
|
/** The field to search, ANY if none specified */
|
||||||
|
@@ -115,8 +115,8 @@ public class CollectionRecentSubmissions extends AbstractDSpaceTransformer imple
|
|||||||
// Add the actual collection;
|
// Add the actual collection;
|
||||||
validity.add(collection);
|
validity.add(collection);
|
||||||
|
|
||||||
// add reciently submitted items
|
// add recently submitted items
|
||||||
for(BrowseItem item : getRecientlySubmittedItems(collection))
|
for(BrowseItem item : getRecentlySubmittedItems(collection))
|
||||||
{
|
{
|
||||||
validity.add(item);
|
validity.add(item);
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ public class CollectionRecentSubmissions extends AbstractDSpaceTransformer imple
|
|||||||
Collection collection = (Collection) dso;
|
Collection collection = (Collection) dso;
|
||||||
|
|
||||||
|
|
||||||
java.util.List<BrowseItem> items = getRecientlySubmittedItems(collection);
|
java.util.List<BrowseItem> items = getRecentlySubmittedItems(collection);
|
||||||
if(items.size() == 0)
|
if(items.size() == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -169,7 +169,7 @@ public class CollectionRecentSubmissions extends AbstractDSpaceTransformer imple
|
|||||||
* @param collection The collection.
|
* @param collection The collection.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked") // The cast from getLastSubmitted is correct, it dose infact return a list of Items.
|
@SuppressWarnings("unchecked") // The cast from getLastSubmitted is correct, it dose infact return a list of Items.
|
||||||
private java.util.List<BrowseItem> getRecientlySubmittedItems(Collection collection)
|
private java.util.List<BrowseItem> getRecentlySubmittedItems(Collection collection)
|
||||||
throws SQLException
|
throws SQLException
|
||||||
{
|
{
|
||||||
if (recentSubmissionItems != null)
|
if (recentSubmissionItems != null)
|
||||||
|
@@ -43,7 +43,7 @@ public class CommunitySearch extends AbstractDSpaceTransformer {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a single community (and refrence any sub communites or
|
* Display a single community (and reference any subcommunites or
|
||||||
* collections)
|
* collections)
|
||||||
*/
|
*/
|
||||||
public void addBody(Body body) throws SAXException, WingException,
|
public void addBody(Body body) throws SAXException, WingException,
|
||||||
|
@@ -231,7 +231,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a single community (and refrence any sub communites or
|
* Display a single community (and reference any sub communites or
|
||||||
* collections)
|
* collections)
|
||||||
*/
|
*/
|
||||||
public void addBody(Body body) throws SAXException, WingException,
|
public void addBody(Body body) throws SAXException, WingException,
|
||||||
@@ -307,7 +307,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
ReferenceSet.TYPE_DETAIL_VIEW);
|
ReferenceSet.TYPE_DETAIL_VIEW);
|
||||||
Reference communityInclude = referenceSet.addReference(community);
|
Reference communityInclude = referenceSet.addReference(community);
|
||||||
|
|
||||||
// If the community has any children communities also refrence them.
|
// If the community has any children communities also reference them.
|
||||||
if (subCommunities != null && subCommunities.length > 0)
|
if (subCommunities != null && subCommunities.length > 0)
|
||||||
{
|
{
|
||||||
ReferenceSet communityReferenceSet = communityInclude
|
ReferenceSet communityReferenceSet = communityInclude
|
||||||
@@ -315,7 +315,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
|
|
||||||
communityReferenceSet.setHead(T_head_sub_communities);
|
communityReferenceSet.setHead(T_head_sub_communities);
|
||||||
|
|
||||||
// Sub communities
|
// Subcommunities
|
||||||
for (Community subCommunity : subCommunities)
|
for (Community subCommunity : subCommunities)
|
||||||
{
|
{
|
||||||
communityReferenceSet.addReference(subCommunity);
|
communityReferenceSet.addReference(subCommunity);
|
||||||
@@ -329,14 +329,14 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
communityReferenceSet.setHead(T_head_sub_collections);
|
communityReferenceSet.setHead(T_head_sub_collections);
|
||||||
|
|
||||||
|
|
||||||
// Sub collections
|
// Subcollections
|
||||||
for (Collection collection : collections)
|
for (Collection collection : collections)
|
||||||
{
|
{
|
||||||
communityReferenceSet.addReference(collection);
|
communityReferenceSet.addReference(collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}// main refrence
|
} // main reference
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -299,7 +299,7 @@ public class ItemViewer extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
ReferenceSet.TYPE_SUMMARY_VIEW);
|
ReferenceSet.TYPE_SUMMARY_VIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refrence the actual Item
|
// Reference the actual Item
|
||||||
ReferenceSet appearsInclude = referenceSet.addReference(item).addReferenceSet(ReferenceSet.TYPE_DETAIL_LIST,null,"hierarchy");
|
ReferenceSet appearsInclude = referenceSet.addReference(item).addReferenceSet(ReferenceSet.TYPE_DETAIL_LIST,null,"hierarchy");
|
||||||
appearsInclude.setHead(T_head_parent_collections);
|
appearsInclude.setHead(T_head_parent_collections);
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ import org.dspace.core.ConfigurationManager;
|
|||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This transform applys the basic navigational links that should be available
|
* This transform apples the basic navigational links that should be available
|
||||||
* on all pages generated by DSpace.
|
* on all pages generated by DSpace.
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
@@ -158,7 +158,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insure that the context path is added to the page meta.
|
* Ensure that the context path is added to the page meta.
|
||||||
*/
|
*/
|
||||||
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
||||||
WingException, UIException, SQLException, IOException,
|
WingException, UIException, SQLException, IOException,
|
||||||
|
@@ -31,7 +31,7 @@ import org.dspace.content.DSpaceObject;
|
|||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Preform a simple search of the repository. The user provides a simple one
|
* Perform a simple search of the repository. The user provides a simple one
|
||||||
* field query (the url parameter is named query) and the results are processed.
|
* field query (the url parameter is named query) and the results are processed.
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
|
@@ -31,7 +31,7 @@ import org.dspace.eperson.EPerson;
|
|||||||
* This action uses the http parameters of login_email, login_password, and
|
* This action uses the http parameters of login_email, login_password, and
|
||||||
* login_realm as credentials.
|
* login_realm as credentials.
|
||||||
*
|
*
|
||||||
* If the authentication attempt is successfull then an HTTP redirect will be
|
* If the authentication attempt is successful then an HTTP redirect will be
|
||||||
* sent to the browser redirecting them to their original location in the
|
* sent to the browser redirecting them to their original location in the
|
||||||
* system before authenticated or if none is supplied back to the DSpace
|
* system before authenticated or if none is supplied back to the DSpace
|
||||||
* homepage. The action will also return true, thus contents of the action will
|
* homepage. The action will also return true, thus contents of the action will
|
||||||
@@ -58,7 +58,7 @@ public class AuthenticateAction extends AbstractAction
|
|||||||
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel,
|
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel,
|
||||||
String source, Parameters parameters) throws Exception
|
String source, Parameters parameters) throws Exception
|
||||||
{
|
{
|
||||||
// First check if we are preforming a new login
|
// First check if we are performing a new login
|
||||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||||
|
|
||||||
String email = request.getParameter("login_email");
|
String email = request.getParameter("login_email");
|
||||||
@@ -86,7 +86,7 @@ public class AuthenticateAction extends AbstractAction
|
|||||||
if (AuthenticationUtil.isInterupptedRequest(objectModel))
|
if (AuthenticationUtil.isInterupptedRequest(objectModel))
|
||||||
{
|
{
|
||||||
// Resume the request and set the redirect target URL to
|
// Resume the request and set the redirect target URL to
|
||||||
// that of the originaly interrupted request.
|
// that of the originally interrupted request.
|
||||||
redirectURL += AuthenticationUtil.resumeInterruptedRequest(objectModel);
|
redirectURL += AuthenticationUtil.resumeInterruptedRequest(objectModel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -96,14 +96,14 @@ public class AuthenticateAction extends AbstractAction
|
|||||||
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
|
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authentication successfull send a redirect.
|
// Authentication successful send a redirect.
|
||||||
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
|
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
|
||||||
|
|
||||||
httpResponse.sendRedirect(redirectURL);
|
httpResponse.sendRedirect(redirectURL);
|
||||||
|
|
||||||
// log the user out for the rest of this current request, however they will be reauthenticated
|
// log the user out for the rest of this current request, however they will be reauthenticated
|
||||||
// fully when they come back from the redirect. This prevents caching problems where part of the
|
// fully when they come back from the redirect. This prevents caching problems where part of the
|
||||||
// request is preformed fore the user was authenticated and the other half after it succedded. This
|
// request is performed before the user was authenticated and the other half after it succeeded. This
|
||||||
// way the user is fully authenticated from the start of the request.
|
// way the user is fully authenticated from the start of the request.
|
||||||
context.setCurrentUser(null);
|
context.setCurrentUser(null);
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ public class AuthenticateAction extends AbstractAction
|
|||||||
}
|
}
|
||||||
catch (SQLException sqle)
|
catch (SQLException sqle)
|
||||||
{
|
{
|
||||||
throw new PatternException("Unable to preform authentication",
|
throw new PatternException("Unable to perform authentication",
|
||||||
sqle);
|
sqle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,14 +61,14 @@ public class InvalidToken extends AbstractDSpaceTransformer
|
|||||||
|
|
||||||
invalid.addPara(T_para1);
|
invalid.addPara(T_para1);
|
||||||
|
|
||||||
Para example1 = invalid.addPara("invalid-token-examlpe","code");
|
Para example1 = invalid.addPara("invalid-token-example","code");
|
||||||
example1.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJK");
|
example1.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJK");
|
||||||
Para example2 = invalid.addPara("invalid-token-examlpe","code");
|
Para example2 = invalid.addPara("invalid-token-example","code");
|
||||||
example2.addContent("LMNOP");
|
example2.addContent("LMNOP");
|
||||||
|
|
||||||
invalid.addPara(T_para2);
|
invalid.addPara(T_para2);
|
||||||
|
|
||||||
Para example3 = invalid.addPara("valid-token-examlpe","code");
|
Para example3 = invalid.addPara("valid-token-example","code");
|
||||||
example3.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJKLMNOP");
|
example3.addContent(ConfigurationManager.getProperty("dspace.url") + "/register?token=ABCDEFGHIJKLMNOP");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ import org.dspace.eperson.EPerson;
|
|||||||
* action uses the http parameters of username, ldap_password, and login_realm
|
* action uses the http parameters of username, ldap_password, and login_realm
|
||||||
* as credentials.
|
* as credentials.
|
||||||
*
|
*
|
||||||
* If the authentication attempt is successfull then an HTTP redirect will be
|
* If the authentication attempt is successful then an HTTP redirect will be
|
||||||
* sent to the browser redirecting them to their original location in the system
|
* sent to the browser redirecting them to their original location in the system
|
||||||
* before authenticated or if none is supplied back to the DSpace homepage. The
|
* before authenticated or if none is supplied back to the DSpace homepage. The
|
||||||
* action will also return true, thus contents of the action will be excuted.
|
* action will also return true, thus contents of the action will be excuted.
|
||||||
@@ -54,7 +54,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
|
|||||||
public Map act(Redirector redirector, SourceResolver resolver,
|
public Map act(Redirector redirector, SourceResolver resolver,
|
||||||
Map objectModel, String source, Parameters parameters)
|
Map objectModel, String source, Parameters parameters)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// First check if we are preforming a new login
|
// First check if we are performing a new login
|
||||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||||
|
|
||||||
String username = request.getParameter("username");
|
String username = request.getParameter("username");
|
||||||
@@ -78,7 +78,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
|
|||||||
|
|
||||||
if (AuthenticationUtil.isInterupptedRequest(objectModel)) {
|
if (AuthenticationUtil.isInterupptedRequest(objectModel)) {
|
||||||
// Resume the request and set the redirect target URL to
|
// Resume the request and set the redirect target URL to
|
||||||
// that of the originaly interrupted request.
|
// that of the originally interrupted request.
|
||||||
redirectURL += AuthenticationUtil
|
redirectURL += AuthenticationUtil
|
||||||
.resumeInterruptedRequest(objectModel);
|
.resumeInterruptedRequest(objectModel);
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
|
|||||||
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
|
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authentication successfull send a redirect.
|
// Authentication successful send a redirect.
|
||||||
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel
|
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel
|
||||||
.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
|
.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
|
||||||
|
|
||||||
@@ -99,8 +99,8 @@ public class LDAPAuthenticateAction extends AbstractAction {
|
|||||||
// however they will be reauthenticated
|
// however they will be reauthenticated
|
||||||
// fully when they come back from the redirect. This prevents
|
// fully when they come back from the redirect. This prevents
|
||||||
// caching problems where part of the
|
// caching problems where part of the
|
||||||
// request is preformed fore the user was authenticated and the
|
// request is performed fore the user was authenticated and the
|
||||||
// other half after it succedded. This
|
// other half after it succeeded. This
|
||||||
// way the user is fully authenticated from the start of the
|
// way the user is fully authenticated from the start of the
|
||||||
// request.
|
// request.
|
||||||
context.setCurrentUser(null);
|
context.setCurrentUser(null);
|
||||||
@@ -108,7 +108,7 @@ public class LDAPAuthenticateAction extends AbstractAction {
|
|||||||
return new HashMap();
|
return new HashMap();
|
||||||
}
|
}
|
||||||
} catch (SQLException sqle) {
|
} catch (SQLException sqle) {
|
||||||
throw new PatternException("Unable to preform authentication", sqle);
|
throw new PatternException("Unable to perform authentication", sqle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@@ -152,24 +152,24 @@ public class LoginChooser extends AbstractDSpaceTransformer implements
|
|||||||
Division reason = body.addDivision("login-reason");
|
Division reason = body.addDivision("login-reason");
|
||||||
|
|
||||||
if (header != null)
|
if (header != null)
|
||||||
{
|
{
|
||||||
reason.setHead(message(header));
|
reason.setHead(message(header));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Allways have a head.
|
// Always have a head.
|
||||||
reason.setHead("Authentication Required");
|
reason.setHead("Authentication Required");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message != null)
|
if (message != null)
|
||||||
{
|
{
|
||||||
reason.addPara(message(message));
|
reason.addPara(message(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (characters != null)
|
if (characters != null)
|
||||||
{
|
{
|
||||||
reason.addPara(characters);
|
reason.addPara(characters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Division loginChooser = body.addDivision("login-chooser");
|
Division loginChooser = body.addDivision("login-chooser");
|
||||||
|
@@ -39,11 +39,11 @@ import org.xml.sax.SAXException;
|
|||||||
* 1) Login and Logout links
|
* 1) Login and Logout links
|
||||||
*
|
*
|
||||||
* 2) Navigational links to register or edit their profile based
|
* 2) Navigational links to register or edit their profile based
|
||||||
* upon wheather the user is authenticatied or not.
|
* upon whether the user is authenticatied or not.
|
||||||
*
|
*
|
||||||
* 3) User metadata
|
* 3) User metadata
|
||||||
*
|
*
|
||||||
* 4) The user's language prefrences (wheather someone is logged
|
* 4) The user's language preferences (whether someone is logged
|
||||||
* in or not)
|
* in or not)
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
@@ -83,7 +83,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
// Special case, don't cache anything if the user is logging
|
// Special case, don't cache anything if the user is logging
|
||||||
// in. The problem occures because of timming, this cache key
|
// in. The problem occures because of timming, this cache key
|
||||||
// is generated before we know whether the operation has
|
// is generated before we know whether the operation has
|
||||||
// succeded or failed. So we don't know whether to cache this
|
// succeeded or failed. So we don't know whether to cache this
|
||||||
// under the user's specific cache or under the anonymous user.
|
// under the user's specific cache or under the anonymous user.
|
||||||
if (request.getParameter("login_email") != null ||
|
if (request.getParameter("login_email") != null ||
|
||||||
request.getParameter("login_password") != null ||
|
request.getParameter("login_password") != null ||
|
||||||
@@ -95,7 +95,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
// FIXME:
|
// FIXME:
|
||||||
// Do not cache the home page. There is a bug that is causing the
|
// Do not cache the home page. There is a bug that is causing the
|
||||||
// homepage to be cached with user's data after a logout. This
|
// homepage to be cached with user's data after a logout. This
|
||||||
// polutes the cache. As a work-around this problem we just won't
|
// pollutes the cache. As a work-around this problem we just won't
|
||||||
// cache this page.
|
// cache this page.
|
||||||
if (request.getSitemapURI().length() == 0)
|
if (request.getSitemapURI().length() == 0)
|
||||||
{
|
{
|
||||||
@@ -217,10 +217,10 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
userMeta.setAuthenticated(false);
|
userMeta.setAuthenticated(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allways have a login URL.
|
// Always have a login URL.
|
||||||
userMeta.addMetadata("identifier","loginURL").addContent(contextPath+"/login");
|
userMeta.addMetadata("identifier","loginURL").addContent(contextPath+"/login");
|
||||||
|
|
||||||
// Allways add language information
|
// Always add language information
|
||||||
Request request = ObjectModelHelper.getRequest(objectModel);
|
Request request = ObjectModelHelper.getRequest(objectModel);
|
||||||
Enumeration locales = request.getLocales();
|
Enumeration locales = request.getLocales();
|
||||||
while (locales.hasMoreElements())
|
while (locales.hasMoreElements())
|
||||||
|
@@ -31,7 +31,7 @@ import org.dspace.eperson.EPerson;
|
|||||||
* This action uses the http parameters as supplied by Shibboleth SP.
|
* This action uses the http parameters as supplied by Shibboleth SP.
|
||||||
* Read dspace.cfg for configuration detail.
|
* Read dspace.cfg for configuration detail.
|
||||||
*
|
*
|
||||||
* If the authentication attempt is successfull then an HTTP redirect will be
|
* If the authentication attempt is successful then an HTTP redirect will be
|
||||||
* sent to the browser redirecting them to their original location in the
|
* sent to the browser redirecting them to their original location in the
|
||||||
* system before authenticated or if none is supplied back to the DSpace
|
* system before authenticated or if none is supplied back to the DSpace
|
||||||
* homepage. The action will also return true, thus contents of the action will
|
* homepage. The action will also return true, thus contents of the action will
|
||||||
@@ -60,7 +60,7 @@ public class ShibbolethAction extends AbstractAction
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//rely on implicit authN of Shib
|
// rely on implicit authN of Shib
|
||||||
Context context = AuthenticationUtil.authenticate(objectModel, null, null, null);
|
Context context = AuthenticationUtil.authenticate(objectModel, null, null, null);
|
||||||
|
|
||||||
EPerson eperson = null;
|
EPerson eperson = null;
|
||||||
@@ -78,7 +78,7 @@ public class ShibbolethAction extends AbstractAction
|
|||||||
if (AuthenticationUtil.isInterupptedRequest(objectModel))
|
if (AuthenticationUtil.isInterupptedRequest(objectModel))
|
||||||
{
|
{
|
||||||
// Resume the request and set the redirect target URL to
|
// Resume the request and set the redirect target URL to
|
||||||
// that of the originaly interrupted request.
|
// that of the originally interrupted request.
|
||||||
redirectURL += AuthenticationUtil.resumeInterruptedRequest(objectModel);
|
redirectURL += AuthenticationUtil.resumeInterruptedRequest(objectModel);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -88,14 +88,14 @@ public class ShibbolethAction extends AbstractAction
|
|||||||
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
|
redirectURL += (loginRedirect != null) ? loginRedirect.trim() : "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Authentication successfull send a redirect.
|
// Authentication successful - send a redirect.
|
||||||
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
|
final HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);
|
||||||
|
|
||||||
httpResponse.sendRedirect(redirectURL);
|
httpResponse.sendRedirect(redirectURL);
|
||||||
|
|
||||||
// log the user out for the rest of this current request, however they will be reauthenticated
|
// log the user out for the rest of this current request, however they will be reauthenticated
|
||||||
// fully when they come back from the redirect. This prevents caching problems where part of the
|
// fully when they come back from the redirect. This prevents caching problems where part of the
|
||||||
// request is preformed for the user was authenticated and the other half after it succedded. This
|
// request is performed for the user was authenticated and the other half after it succeeded. This
|
||||||
// way the user is fully authenticated from the start of the request.
|
// way the user is fully authenticated from the start of the request.
|
||||||
//
|
//
|
||||||
// TODO: have no idea what this is, but leave it as it is, could be broken
|
// TODO: have no idea what this is, but leave it as it is, could be broken
|
||||||
@@ -106,7 +106,7 @@ public class ShibbolethAction extends AbstractAction
|
|||||||
}
|
}
|
||||||
catch (SQLException sqle)
|
catch (SQLException sqle)
|
||||||
{
|
{
|
||||||
throw new PatternException("Unable to preform Shibboleth authentication",
|
throw new PatternException("Unable to perform Shibboleth authentication",
|
||||||
sqle);
|
sqle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,13 +22,13 @@ import org.dspace.app.xmlui.utils.AuthenticationUtil;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This action will start the nessary steps to authenticate a user. After the user
|
* This action will start the necessary steps to authenticate a user. After the user
|
||||||
* successfully authenticates the user will resume this request with all parameters
|
* successfuly authenticates, the user will resume this request with all parameters
|
||||||
* and attributes intact. An optional message can be added that will be displayed
|
* and attributes intact. An optional message can be added that will be displayed
|
||||||
* on the login form. This could be used to provide a reason why the user is being
|
* on the login form. This could be used to provide a reason why the user is being
|
||||||
* queried for a user name and password.
|
* queried for a user name and password.
|
||||||
*
|
*
|
||||||
* Possible parameter are:
|
* Possible parameters are:
|
||||||
*
|
*
|
||||||
* header: An i18n message that will be used as the header for the message.
|
* header: An i18n message that will be used as the header for the message.
|
||||||
*
|
*
|
||||||
@@ -43,7 +43,7 @@ import org.dspace.app.xmlui.utils.AuthenticationUtil;
|
|||||||
* <map:act type="StartAuthenticationAction"/>
|
* <map:act type="StartAuthenticationAction"/>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Typicaly this is used in conjunction with the AuthenticatedSelector as:
|
* Typically, this is used in conjunction with the AuthenticatedSelector as:
|
||||||
*
|
*
|
||||||
* <map:select type="AuthenticatedSelector">
|
* <map:select type="AuthenticatedSelector">
|
||||||
* <map:when test="eperson">
|
* <map:when test="eperson">
|
||||||
@@ -73,7 +73,7 @@ public class StartAuthenticationAction extends AbstractAction
|
|||||||
String message = parameters.getParameter("message",null);
|
String message = parameters.getParameter("message",null);
|
||||||
String characters = parameters.getParameter("characters",null);
|
String characters = parameters.getParameter("characters",null);
|
||||||
|
|
||||||
// Interupt this request
|
// Interrupt this request
|
||||||
AuthenticationUtil.interruptRequest(objectModel,header,message,characters);
|
AuthenticationUtil.interruptRequest(objectModel,header,message,characters);
|
||||||
|
|
||||||
final HttpServletRequest httpRequest = (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
|
final HttpServletRequest httpRequest = (HttpServletRequest) objectModel.get(HttpEnvironment.HTTP_REQUEST_OBJECT);
|
||||||
|
@@ -41,7 +41,7 @@ import org.xml.sax.SAXException;
|
|||||||
*
|
*
|
||||||
* retry - A boolean value indicating that the previously entered email was invalid.
|
* retry - A boolean value indicating that the previously entered email was invalid.
|
||||||
*
|
*
|
||||||
* accountExists - A boolean value indicating the email previously entered allready
|
* accountExists - A boolean value indicating the email previously entered already
|
||||||
* belongs to a user.
|
* belongs to a user.
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
@@ -97,7 +97,7 @@ public class StartRegistration extends AbstractDSpaceTransformer implements Cach
|
|||||||
private java.util.List<String> errors;
|
private java.util.List<String> errors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the last failed attempt was because an account allready
|
* Determine if the last failed attempt was because an account already
|
||||||
* existed for the given email address
|
* existed for the given email address
|
||||||
*/
|
*/
|
||||||
private boolean accountExists;
|
private boolean accountExists;
|
||||||
|
@@ -17,32 +17,32 @@ import org.dspace.app.xmlui.wing.element.Division;
|
|||||||
import org.dspace.authorize.AuthorizeException;
|
import org.dspace.authorize.AuthorizeException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class will add a simple notification div the DRI document. Typicaly
|
* This class will add a simple notification div the DRI document. Typically
|
||||||
* this transformer is used after an action has been preformed to let the
|
* this transformer is used after an action has been performed to let the
|
||||||
* user know if an operation succeded or failed.
|
* user know if an operation succeeded or failed.
|
||||||
*
|
*
|
||||||
* The possible paramaters are:
|
* The possible paramaters are:
|
||||||
*
|
*
|
||||||
* outcome: The outcome determines whether the notice is positive or negative.
|
* outcome: The outcome determines whether the notice is positive or negative.
|
||||||
* Possible values are: "success", "failure", or "netural". If no values are
|
* Possible values are: "success", "failure", or "neutral". If no values are
|
||||||
* supplied then netural is assumed.
|
* supplied then neutral is assumed.
|
||||||
*
|
*
|
||||||
* header: An i18n dictionary key referencing the text that should be used
|
* header: An i18n dictionary key referencing the text that should be used
|
||||||
* as a header for this notice.
|
* as a header for this notice.
|
||||||
*
|
*
|
||||||
* message: An i18n dictionary key refrencing the text that should be used as
|
* message: An i18n dictionary key referencing the text that should be used as
|
||||||
* the content for this notice.
|
* the content for this notice.
|
||||||
*
|
*
|
||||||
* characters: Plain text string that should be used as the content for this
|
* characters: Plain text string that should be used as the content for this
|
||||||
* notice. Normaly all messages should be i18n dictionary keys however this
|
* notice. Normally, all messages should be i18n dictionary keys, however this
|
||||||
* parameter is usefull for error messages that are not nessasarly translated.
|
* parameter is useful for error messages that are not necessarily translated.
|
||||||
*
|
*
|
||||||
* All parameters are optional but you must supply at least the message or the
|
* All parameters are optional but you must supply at least the message or the
|
||||||
* characters
|
* characters
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Examlpe:
|
* Example:
|
||||||
* <map:transformer type="notice">
|
* <map:transformer type="notice">
|
||||||
* <map:parameter name="outcome" value="success"/>
|
* <map:parameter name="outcome" value="success"/>
|
||||||
* <map:parameter name="message" value="xmlui.<aspect>.<class>.<type>"/>
|
* <map:parameter name="message" value="xmlui.<aspect>.<class>.<type>"/>
|
||||||
@@ -75,9 +75,9 @@ public class NoticeTransformer extends AbstractDSpaceTransformer
|
|||||||
}
|
}
|
||||||
|
|
||||||
String rend = "notice";
|
String rend = "notice";
|
||||||
if ("netural".equals(outcome))
|
if ("neutral".equals(outcome))
|
||||||
{
|
{
|
||||||
rend += " netural";
|
rend += " neutral";
|
||||||
}
|
}
|
||||||
else if ("success".equals(outcome))
|
else if ("success".equals(outcome))
|
||||||
{
|
{
|
||||||
|
@@ -32,7 +32,7 @@ import org.xml.sax.Attributes;
|
|||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This special comonent checks to see if the body element is empty (has no sub elements) and if
|
* This special component checks to see if the body element is empty (has no sub elements) and if
|
||||||
* it is then displays some page not found text.
|
* it is then displays some page not found text.
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
@@ -107,7 +107,7 @@ public class PageNotFoundTransformer extends AbstractDSpaceTransformer implement
|
|||||||
if (this.bodyEvent != null)
|
if (this.bodyEvent != null)
|
||||||
{
|
{
|
||||||
// If we have recorded the startElement for body and we are
|
// If we have recorded the startElement for body and we are
|
||||||
// recieving another start event, then there must be something
|
// receiving another start event, then there must be something
|
||||||
// inside the body element, so we send the held body and carry
|
// inside the body element, so we send the held body and carry
|
||||||
// on as normal.
|
// on as normal.
|
||||||
sendEvent(this.bodyEvent);
|
sendEvent(this.bodyEvent);
|
||||||
@@ -134,7 +134,7 @@ public class PageNotFoundTransformer extends AbstractDSpaceTransformer implement
|
|||||||
{
|
{
|
||||||
if (this.bodyEvent != null && WingConstants.DRI.URI.equals(namespaceURI) && Body.E_BODY.equals(localName))
|
if (this.bodyEvent != null && WingConstants.DRI.URI.equals(namespaceURI) && Body.E_BODY.equals(localName))
|
||||||
{
|
{
|
||||||
// If we are recieving an endElement event for body while we
|
// If we are receiving an endElement event for body while we
|
||||||
// still have a startElement body event recorded then
|
// still have a startElement body event recorded then
|
||||||
// the body element must have been empty. In this case, record
|
// the body element must have been empty. In this case, record
|
||||||
// that the body is empty, and send both the start and end body events.
|
// that the body is empty, and send both the start and end body events.
|
||||||
|
@@ -75,7 +75,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insure that the context path is added to the page meta.
|
* Ensure that the context path is added to the page meta.
|
||||||
*/
|
*/
|
||||||
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
||||||
WingException, UIException, SQLException, IOException,
|
WingException, UIException, SQLException, IOException,
|
||||||
|
@@ -153,7 +153,7 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
|
|||||||
* Grab all the page's parameters from the sitemap. This includes
|
* Grab all the page's parameters from the sitemap. This includes
|
||||||
* workspaceID, step, and a list of errored fields.
|
* workspaceID, step, and a list of errored fields.
|
||||||
*
|
*
|
||||||
* If the implementer set any required parameters then insure that
|
* If the implementer set any required parameters then ensure that
|
||||||
* they are all present.
|
* they are all present.
|
||||||
*/
|
*/
|
||||||
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
|
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
|
||||||
@@ -169,7 +169,7 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
|
|||||||
this.errorFlag = Integer.valueOf(parameters.getParameter("error", String.valueOf(AbstractProcessingStep.STATUS_COMPLETE)));
|
this.errorFlag = Integer.valueOf(parameters.getParameter("error", String.valueOf(AbstractProcessingStep.STATUS_COMPLETE)));
|
||||||
this.errorFields = getErrorFields(parameters);
|
this.errorFields = getErrorFields(parameters);
|
||||||
|
|
||||||
//load in-progress submission
|
// load in-progress submission
|
||||||
if (this.id != null)
|
if (this.id != null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -261,25 +261,25 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
|
|||||||
*/
|
*/
|
||||||
public void addSubmissionProgressList(Division div) throws WingException
|
public void addSubmissionProgressList(Division div) throws WingException
|
||||||
{
|
{
|
||||||
//each entry in progress bar is placed under this "submit-progress" div
|
// each entry in progress bar is placed under this "submit-progress" div
|
||||||
List progress = div.addList("submit-progress",List.TYPE_PROGRESS);
|
List progress = div.addList("submit-progress",List.TYPE_PROGRESS);
|
||||||
|
|
||||||
//get Map of progress bar information
|
// get Map of progress bar information
|
||||||
//key: entry # (i.e. step & page),
|
// key: entry # (i.e. step & page),
|
||||||
//value: entry name key (i.e. display name)
|
// value: entry name key (i.e. display name)
|
||||||
Map<String, String> progBarInfo = this.submissionInfo.getProgressBarInfo();
|
Map<String, String> progBarInfo = this.submissionInfo.getProgressBarInfo();
|
||||||
|
|
||||||
//add each entry to progress bar
|
// add each entry to progress bar
|
||||||
for (Map.Entry<String, String> progBarEntry : progBarInfo.entrySet())
|
for (Map.Entry<String, String> progBarEntry : progBarInfo.entrySet())
|
||||||
{
|
{
|
||||||
//Since we are using XML-UI, we need to prepend the heading key with "xmlui.Submission."
|
// Since we are using XML-UI, we need to prepend the heading key with "xmlui.Submission."
|
||||||
String entryNameKey = "xmlui.Submission." + progBarEntry.getValue();
|
String entryNameKey = "xmlui.Submission." + progBarEntry.getValue();
|
||||||
|
|
||||||
//the value of entryNum is current step & page
|
// the value of entryNum is current step & page
|
||||||
//(e.g. 1.2 is page 2 of step 1)
|
// (e.g. 1.2 is page 2 of step 1)
|
||||||
StepAndPage currentStepAndPage = new StepAndPage(progBarEntry.getKey());
|
StepAndPage currentStepAndPage = new StepAndPage(progBarEntry.getKey());
|
||||||
|
|
||||||
//add a button to progress bar for this step & page
|
// add a button to progress bar for this step & page
|
||||||
addJumpButton(progress, message(entryNameKey), currentStepAndPage);
|
addJumpButton(progress, message(entryNameKey), currentStepAndPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,10 +307,10 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
|
|||||||
public void addJumpButton(List list, Message buttonText, StepAndPage stepAndPage)
|
public void addJumpButton(List list, Message buttonText, StepAndPage stepAndPage)
|
||||||
throws WingException
|
throws WingException
|
||||||
{
|
{
|
||||||
//Only add the button if we have button text and a valid step & page!
|
// Only add the button if we have button text and a valid step & page!
|
||||||
if(buttonText!=null && stepAndPage.isSet())
|
if(buttonText!=null && stepAndPage.isSet())
|
||||||
{
|
{
|
||||||
//add a Jump To button for this section
|
// add a Jump To button for this section
|
||||||
Button jumpButton = list.addItem("step_" + stepAndPage, renderJumpButton(stepAndPage))
|
Button jumpButton = list.addItem("step_" + stepAndPage, renderJumpButton(stepAndPage))
|
||||||
.addButton(AbstractProcessingStep.PROGRESS_BAR_PREFIX + stepAndPage);
|
.addButton(AbstractProcessingStep.PROGRESS_BAR_PREFIX + stepAndPage);
|
||||||
jumpButton.setValue(buttonText);
|
jumpButton.setValue(buttonText);
|
||||||
@@ -334,21 +334,21 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
|
|||||||
{
|
{
|
||||||
Item actions = controls.addItem();
|
Item actions = controls.addItem();
|
||||||
|
|
||||||
//only have "<-Previous" button if not first step
|
// only have "<-Previous" button if not first step
|
||||||
if(!isFirstStep())
|
if(!isFirstStep())
|
||||||
{
|
{
|
||||||
actions.addButton(AbstractProcessingStep.PREVIOUS_BUTTON).setValue(T_previous);
|
actions.addButton(AbstractProcessingStep.PREVIOUS_BUTTON).setValue(T_previous);
|
||||||
}
|
}
|
||||||
|
|
||||||
//always show "Save/Cancel"
|
// always show "Save/Cancel"
|
||||||
actions.addButton(AbstractProcessingStep.CANCEL_BUTTON).setValue(T_save);
|
actions.addButton(AbstractProcessingStep.CANCEL_BUTTON).setValue(T_save);
|
||||||
|
|
||||||
//If last step, show "Complete Submission"
|
// If last step, show "Complete Submission"
|
||||||
if(isLastStep())
|
if(isLastStep())
|
||||||
{
|
{
|
||||||
actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_complete);
|
actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_complete);
|
||||||
}
|
}
|
||||||
else //otherwise, show "Next->"
|
else // otherwise, show "Next->"
|
||||||
{
|
{
|
||||||
actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_next);
|
actions.addButton(AbstractProcessingStep.NEXT_BUTTON).setValue(T_next);
|
||||||
}
|
}
|
||||||
@@ -492,12 +492,12 @@ public abstract class AbstractStep extends AbstractDSpaceTransformer
|
|||||||
* <P>
|
* <P>
|
||||||
* If the given step and page is greater than the max,
|
* If the given step and page is greater than the max,
|
||||||
* render it with "disabled" style.
|
* render it with "disabled" style.
|
||||||
*
|
*
|
||||||
* @param givenStepAndPage
|
* @param givenStepAndPage
|
||||||
* This given step & page (e.g. (1,2))
|
* This given step & page (e.g. (1,2))
|
||||||
* @return
|
* @return
|
||||||
* render style for this button
|
* render style for this button
|
||||||
*/
|
*/
|
||||||
private String renderJumpButton(StepAndPage givenStepAndPage)
|
private String renderJumpButton(StepAndPage givenStepAndPage)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@@ -64,7 +64,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
options.addList("context");
|
options.addList("context");
|
||||||
options.addList("administrative");
|
options.addList("administrative");
|
||||||
|
|
||||||
// This dosn't flow very well, lets remove it and see if anyone misses it.
|
// This doesn't flow very well, lets remove it and see if anyone misses it.
|
||||||
// DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
// DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
||||||
// if (dso != null && dso instanceof Collection)
|
// if (dso != null && dso instanceof Collection)
|
||||||
// {
|
// {
|
||||||
|
@@ -78,7 +78,7 @@ public class StepTransformer extends AbstractDSpaceTransformer
|
|||||||
* Grab all the step's parameters from the sitemap. This includes
|
* Grab all the step's parameters from the sitemap. This includes
|
||||||
* workspaceID, step, and a list of errored fields.
|
* workspaceID, step, and a list of errored fields.
|
||||||
*
|
*
|
||||||
* If the implementer set any required parameters then insure that
|
* If the implementer set any required parameters then ensure that
|
||||||
* they are all present.
|
* they are all present.
|
||||||
*/
|
*/
|
||||||
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
|
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
|
||||||
@@ -86,23 +86,23 @@ public class StepTransformer extends AbstractDSpaceTransformer
|
|||||||
{
|
{
|
||||||
super.setup(resolver,objectModel,src,parameters);
|
super.setup(resolver,objectModel,src,parameters);
|
||||||
|
|
||||||
//retrieve id and transformer information
|
// retrieve id and transformer information
|
||||||
//(This ID should always exist by this point, since the
|
// (This ID should always exist by this point, since the
|
||||||
// selection of the collection should have already happened!)
|
// selection of the collection should have already happened!)
|
||||||
this.id = parameters.getParameter("id",null);
|
this.id = parameters.getParameter("id",null);
|
||||||
this.transformerClassName = parameters.getParameter("transformer",null);
|
this.transformerClassName = parameters.getParameter("transformer",null);
|
||||||
|
|
||||||
//even though its not used in this class, this "step" parameter
|
// even though its not used in this class, this "step" parameter
|
||||||
//is heavily used by the Transformers which extend the
|
// is heavily used by the Transformers which extend the
|
||||||
//org.dspace.app.xmlui.submission.AbstractStep
|
// org.dspace.app.xmlui.submission.AbstractStep
|
||||||
this.stepAndPage = Double.valueOf(parameters.getParameter("step","-1"));
|
this.stepAndPage = Double.valueOf(parameters.getParameter("step","-1"));
|
||||||
|
|
||||||
//retrieve collection handle if it's there
|
// retrieve collection handle if it's there
|
||||||
this.collectionHandle = parameters.getParameter("handle",null);
|
this.collectionHandle = parameters.getParameter("handle",null);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//retrieve an instance of the transformer class
|
// retrieve an instance of the transformer class
|
||||||
ClassLoader loader = this.getClass().getClassLoader();
|
ClassLoader loader = this.getClass().getClassLoader();
|
||||||
Class stepClass = loader
|
Class stepClass = loader
|
||||||
.loadClass(this.transformerClassName);
|
.loadClass(this.transformerClassName);
|
||||||
@@ -114,18 +114,18 @@ public class StepTransformer extends AbstractDSpaceTransformer
|
|||||||
}
|
}
|
||||||
catch(ClassNotFoundException cnfe)
|
catch(ClassNotFoundException cnfe)
|
||||||
{
|
{
|
||||||
//means that we couldn't find a class by the given name
|
// means that we couldn't find a class by the given name
|
||||||
throw new ProcessingException("Class Not Found: " + this.transformerClassName, cnfe);
|
throw new ProcessingException("Class Not Found: " + this.transformerClassName, cnfe);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
//means we couldn't instantiate the class as an AbstractStep
|
// means we couldn't instantiate the class as an AbstractStep
|
||||||
throw new ProcessingException("Unable to instantiate class " + this.transformerClassName + ". " +
|
throw new ProcessingException("Unable to instantiate class " + this.transformerClassName + ". " +
|
||||||
"Please make sure it extends org.dspace.app.xmlui.submission.AbstractSubmissionStep!", e);
|
"Please make sure it extends org.dspace.app.xmlui.submission.AbstractSubmissionStep!", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//call the setup for this step
|
// call the setup for this step
|
||||||
if(step!=null)
|
if(step!=null)
|
||||||
{
|
{
|
||||||
step.setup(resolver, objectModel, src, parameters);
|
step.setup(resolver, objectModel, src, parameters);
|
||||||
|
@@ -400,7 +400,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -517,7 +517,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -627,7 +627,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -710,7 +710,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -791,7 +791,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -892,7 +892,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -968,7 +968,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -1039,7 +1039,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
@@ -1121,7 +1121,7 @@ public class DescribeStep extends AbstractSubmissionStep
|
|||||||
* @param fieldName
|
* @param fieldName
|
||||||
* The field's name.
|
* The field's name.
|
||||||
* @param dcInput
|
* @param dcInput
|
||||||
* The field's input deffinition
|
* The field's input definition
|
||||||
* @param dcValues
|
* @param dcValues
|
||||||
* The field's pre-existing values.
|
* The field's pre-existing values.
|
||||||
*/
|
*/
|
||||||
|
@@ -29,7 +29,7 @@ import org.xml.sax.SAXException;
|
|||||||
* step will ask the user two questions which will direct whether future
|
* step will ask the user two questions which will direct whether future
|
||||||
* questions will be asked of the user. Since they user may move next or
|
* questions will be asked of the user. Since they user may move next or
|
||||||
* previous or even jump around between the stages some metadata values
|
* previous or even jump around between the stages some metadata values
|
||||||
* may all ready be filled for selected values. i.e. if the user selected
|
* may already be filled for selected values. i.e. if the user selected
|
||||||
* that there may be multiple titles and then later comes back and unchecks
|
* that there may be multiple titles and then later comes back and unchecks
|
||||||
* then multiple titles box. In this case these metadata entries are removed
|
* then multiple titles box. In this case these metadata entries are removed
|
||||||
* from the item, a note is displayed informing the user of this discrepency.
|
* from the item, a note is displayed informing the user of this discrepency.
|
||||||
|
@@ -34,7 +34,7 @@ import org.xml.sax.SAXException;
|
|||||||
* This is the last step of the item submission processes. During this
|
* This is the last step of the item submission processes. During this
|
||||||
* step the user must agree to the collection's standard distribution
|
* step the user must agree to the collection's standard distribution
|
||||||
* license. If the user can not agree to the license they they may either
|
* license. If the user can not agree to the license they they may either
|
||||||
* save the submission untill a later time or remove the submission completely.
|
* save the submission until a later time or remove the submission completely.
|
||||||
*
|
*
|
||||||
* This step will include the full license text inside the page using the
|
* This step will include the full license text inside the page using the
|
||||||
* HTML fragment method.
|
* HTML fragment method.
|
||||||
@@ -115,13 +115,13 @@ public class LicenseStep extends AbstractSubmissionStep
|
|||||||
// If user did not check "I accept" checkbox
|
// If user did not check "I accept" checkbox
|
||||||
if(this.errorFlag==org.dspace.submit.step.LicenseStep.STATUS_LICENSE_REJECTED)
|
if(this.errorFlag==org.dspace.submit.step.LicenseStep.STATUS_LICENSE_REJECTED)
|
||||||
{
|
{
|
||||||
log.info(LogManager.getHeader(context, "reject_license", submissionInfo.getSubmissionLogInfo()));
|
log.info(LogManager.getHeader(context, "reject_license", submissionInfo.getSubmissionLogInfo()));
|
||||||
|
|
||||||
decision.addError(T_decision_error);
|
decision.addError(T_decision_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
//add standard control/paging buttons
|
// add standard control/paging buttons
|
||||||
addControlButtons(controls);
|
addControlButtons(controls);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -147,7 +147,7 @@ public class LicenseStep extends AbstractSubmissionStep
|
|||||||
WingException, UIException, SQLException, IOException,
|
WingException, UIException, SQLException, IOException,
|
||||||
AuthorizeException
|
AuthorizeException
|
||||||
{
|
{
|
||||||
//License step doesn't require reviewing
|
// License step doesn't require reviewing
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -31,7 +31,7 @@ import org.xml.sax.SAXException;
|
|||||||
/**
|
/**
|
||||||
* Allow the user to select a collection they wish to submit an item to,
|
* Allow the user to select a collection they wish to submit an item to,
|
||||||
* this step is sort-of but not officialy part of the item submission
|
* this step is sort-of but not officialy part of the item submission
|
||||||
* processes. Normaly a user will have selected a collection to submit
|
* processes. Normally a user will have selected a collection to submit
|
||||||
* too by going to the collection's page, but if that was invalid or the
|
* too by going to the collection's page, but if that was invalid or the
|
||||||
* user came directly from the mydspace page then this step is given.
|
* user came directly from the mydspace page then this step is given.
|
||||||
*
|
*
|
||||||
|
@@ -42,11 +42,11 @@ import org.xml.sax.SAXException;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a step of the item submission processes. The upload
|
* This is a step of the item submission processes. The upload
|
||||||
* stages allows the user to upload files into the submission. The
|
* stages allow the user to upload files into the submission. The
|
||||||
* form is optimized for one file, but allows the user to upload
|
* form is optimized for one file, but allows the user to upload
|
||||||
* more if needed.
|
* more if needed.
|
||||||
* <P>
|
* <P>
|
||||||
* The form is brokenup into three sections:
|
* The form is broken up into three sections:
|
||||||
* <P>
|
* <P>
|
||||||
* Part A: Ask the user to upload a file
|
* Part A: Ask the user to upload a file
|
||||||
* Part B: List previously uploaded files
|
* Part B: List previously uploaded files
|
||||||
@@ -138,8 +138,8 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
{
|
{
|
||||||
super.setup(resolver,objectModel,src,parameters);
|
super.setup(resolver,objectModel,src,parameters);
|
||||||
|
|
||||||
//If this page for editing an uploaded file's information
|
// If this page for editing an uploaded file's information
|
||||||
//was requested, then we need to load EditFileStep instead!
|
// was requested, then we need to load EditFileStep instead!
|
||||||
if(this.errorFlag==org.dspace.submit.step.UploadStep.STATUS_EDIT_BITSTREAM)
|
if(this.errorFlag==org.dspace.submit.step.UploadStep.STATUS_EDIT_BITSTREAM)
|
||||||
{
|
{
|
||||||
this.editFile = new EditFileStep();
|
this.editFile = new EditFileStep();
|
||||||
@@ -154,8 +154,8 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
public void addBody(Body body) throws SAXException, WingException,
|
public void addBody(Body body) throws SAXException, WingException,
|
||||||
UIException, SQLException, IOException, AuthorizeException
|
UIException, SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
//If we are actually editing an uploaded file's information,
|
// If we are actually editing information of an uploaded file,
|
||||||
//then display that body instead!
|
// then display that body instead!
|
||||||
if(this.editFile!=null)
|
if(this.editFile!=null)
|
||||||
{
|
{
|
||||||
editFile.addBody(body);
|
editFile.addBody(body);
|
||||||
@@ -193,7 +193,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
file.setHelp(T_file_help);
|
file.setHelp(T_file_help);
|
||||||
file.setRequired();
|
file.setRequired();
|
||||||
|
|
||||||
//if no files found error was thrown by processing class, display it!
|
// if no files found error was thrown by processing class, display it!
|
||||||
if (this.errorFlag==org.dspace.submit.step.UploadStep.STATUS_NO_FILES_ERROR)
|
if (this.errorFlag==org.dspace.submit.step.UploadStep.STATUS_NO_FILES_ERROR)
|
||||||
{
|
{
|
||||||
file.addError(T_file_error);
|
file.addError(T_file_error);
|
||||||
@@ -226,7 +226,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Part B:
|
// Part B:
|
||||||
// If the user has allready uploaded files provide a list for the user.
|
// If the user has already uploaded files provide a list for the user.
|
||||||
if (bitstreams.length > 0 || workflow)
|
if (bitstreams.length > 0 || workflow)
|
||||||
{
|
{
|
||||||
Table summary = div.addTable("submit-upload-summary",(bitstreams.length * 2) + 2,7);
|
Table summary = div.addTable("submit-upload-summary",(bitstreams.length * 2) + 2,7);
|
||||||
@@ -325,7 +325,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
|
|
||||||
if (!workflow)
|
if (!workflow)
|
||||||
{
|
{
|
||||||
// Workflow user's can not remove files.
|
// Workflow users can not remove files.
|
||||||
Row actionRow = summary.addRow();
|
Row actionRow = summary.addRow();
|
||||||
actionRow.addCell();
|
actionRow.addCell();
|
||||||
Button removeSeleceted = actionRow.addCell(null, null, 0, 6, null).addButton("submit_remove_selected");
|
Button removeSeleceted = actionRow.addCell(null, null, 0, 6, null).addButton("submit_remove_selected");
|
||||||
@@ -349,7 +349,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
* <P>
|
* <P>
|
||||||
* NOTE: To remain consistent across all Steps, you should first
|
* NOTE: To remain consistent across all Steps, you should first
|
||||||
* add a sub-List object (with this step's name as the heading),
|
* add a sub-List object (with this step's name as the heading),
|
||||||
* by using a call to reviewList.addList(). This sublist is
|
* by using a call to reviewList.addList(). This sublist is
|
||||||
* the list you return from this method!
|
* the list you return from this method!
|
||||||
*
|
*
|
||||||
* @param reviewList
|
* @param reviewList
|
||||||
@@ -367,7 +367,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
List uploadSection = reviewList.addList("submit-review-" + this.stepAndPage, List.TYPE_FORM);
|
List uploadSection = reviewList.addList("submit-review-" + this.stepAndPage, List.TYPE_FORM);
|
||||||
uploadSection.setHead(T_head);
|
uploadSection.setHead(T_head);
|
||||||
|
|
||||||
//Review all uploaded files
|
// Review all uploaded files
|
||||||
Item item = submission.getItem();
|
Item item = submission.getItem();
|
||||||
Bundle[] bundles = item.getBundles("ORIGINAL");
|
Bundle[] bundles = item.getBundles("ORIGINAL");
|
||||||
Bitstream[] bitstreams = new Bitstream[0];
|
Bitstream[] bitstreams = new Bitstream[0];
|
||||||
@@ -400,7 +400,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//return this new "upload" section
|
// return this new "upload" section
|
||||||
return uploadSection;
|
return uploadSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ public class UploadStep extends AbstractSubmissionStep
|
|||||||
*
|
*
|
||||||
* @param item The DSpace Item that the bitstream is part of
|
* @param item The DSpace Item that the bitstream is part of
|
||||||
* @param bitstream The bitstream to link to
|
* @param bitstream The bitstream to link to
|
||||||
* @returns a String link to the bistream
|
* @returns a String link to the bitstream
|
||||||
*/
|
*/
|
||||||
private String makeBitstreamLink(Item item, Bitstream bitstream)
|
private String makeBitstreamLink(Item item, Bitstream bitstream)
|
||||||
{
|
{
|
||||||
|
@@ -33,7 +33,7 @@ import java.io.Serializable;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This transform applys the basic navigational links that should be available
|
* This transform applies the basic navigational links that should be available
|
||||||
* on all pages generated by DSpace.
|
* on all pages generated by DSpace.
|
||||||
*
|
*
|
||||||
* @author Scott Phillips
|
* @author Scott Phillips
|
||||||
@@ -89,7 +89,7 @@ public class Navigation extends AbstractDSpaceTransformer implements CacheablePr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insure that the context path is added to the page meta.
|
* Ensure that the context path is added to the page meta.
|
||||||
*/
|
*/
|
||||||
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
public void addPageMeta(PageMeta pageMeta) throws SAXException,
|
||||||
WingException, UIException, SQLException, IOException,
|
WingException, UIException, SQLException, IOException,
|
||||||
|
@@ -83,7 +83,7 @@ public class FlowUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the given task back to the pool of unclaimed tasks for another user
|
* Return the given task back to the pool of unclaimed tasks for another user
|
||||||
* to select and preform.
|
* to select and perform.
|
||||||
*
|
*
|
||||||
* @param context The current DSpace content
|
* @param context The current DSpace content
|
||||||
* @param id The unique ID of the current workflow
|
* @param id The unique ID of the current workflow
|
||||||
@@ -97,7 +97,7 @@ public class FlowUtils {
|
|||||||
|
|
||||||
context.commit();
|
context.commit();
|
||||||
|
|
||||||
//Log this unclaim action
|
// Log this unclaim action
|
||||||
log.info(LogManager.getHeader(context, "unclaim_workflow",
|
log.info(LogManager.getHeader(context, "unclaim_workflow",
|
||||||
"workflow_item_id=" + workflowItem.getID() + ",item_id="
|
"workflow_item_id=" + workflowItem.getID() + ",item_id="
|
||||||
+ workflowItem.getItem().getID() + ",collection_id="
|
+ workflowItem.getItem().getID() + ",collection_id="
|
||||||
@@ -107,7 +107,7 @@ public class FlowUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Claim this task from the pool of unclaimed task so that this user may
|
* Claim this task from the pool of unclaimed task so that this user may
|
||||||
* preform the task by either approving or rejecting it.
|
* perform the task by either approving or rejecting it.
|
||||||
*
|
*
|
||||||
* @param context The current DSpace content
|
* @param context The current DSpace content
|
||||||
* @param id The unique ID of the current workflow
|
* @param id The unique ID of the current workflow
|
||||||
@@ -118,7 +118,7 @@ public class FlowUtils {
|
|||||||
if(workflowItem.getState() != WorkflowManager.WFSTATE_STEP1POOL &&
|
if(workflowItem.getState() != WorkflowManager.WFSTATE_STEP1POOL &&
|
||||||
workflowItem.getState() != WorkflowManager.WFSTATE_STEP2POOL &&
|
workflowItem.getState() != WorkflowManager.WFSTATE_STEP2POOL &&
|
||||||
workflowItem.getState() != WorkflowManager.WFSTATE_STEP3POOL){
|
workflowItem.getState() != WorkflowManager.WFSTATE_STEP3POOL){
|
||||||
//Only allow tasks in the pool to be claimed !
|
// Only allow tasks in the pool to be claimed !
|
||||||
throw new AuthorizeException("Error while claiming task: this task has already been claimed !");
|
throw new AuthorizeException("Error while claiming task: this task has already been claimed !");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ public class FlowUtils {
|
|||||||
|
|
||||||
context.commit();
|
context.commit();
|
||||||
|
|
||||||
//log this claim information
|
// log this claim information
|
||||||
log.info(LogManager.getHeader(context, "claim_task", "workflow_item_id="
|
log.info(LogManager.getHeader(context, "claim_task", "workflow_item_id="
|
||||||
+ workflowItem.getID() + "item_id=" + workflowItem.getItem().getID()
|
+ workflowItem.getID() + "item_id=" + workflowItem.getItem().getID()
|
||||||
+ "collection_id=" + workflowItem.getCollection().getID()
|
+ "collection_id=" + workflowItem.getCollection().getID()
|
||||||
@@ -152,7 +152,7 @@ public class FlowUtils {
|
|||||||
if((workflowItem.getState() == WorkflowManager.WFSTATE_STEP1POOL ||
|
if((workflowItem.getState() == WorkflowManager.WFSTATE_STEP1POOL ||
|
||||||
workflowItem.getState() == WorkflowManager.WFSTATE_STEP2POOL ||
|
workflowItem.getState() == WorkflowManager.WFSTATE_STEP2POOL ||
|
||||||
workflowItem.getState() == WorkflowManager.WFSTATE_STEP3POOL)){
|
workflowItem.getState() == WorkflowManager.WFSTATE_STEP3POOL)){
|
||||||
//Verify if the current user has the current workflowItem among his pooled tasks
|
// Verify if the current user has the current workflowItem among his pooled tasks
|
||||||
boolean hasPooledTask = false;
|
boolean hasPooledTask = false;
|
||||||
List<WorkflowItem> pooledTasks = WorkflowManager.getPooledTasks(context, context.getCurrentUser());
|
List<WorkflowItem> pooledTasks = WorkflowManager.getPooledTasks(context, context.getCurrentUser());
|
||||||
for (WorkflowItem pooledItem : pooledTasks) {
|
for (WorkflowItem pooledItem : pooledTasks) {
|
||||||
@@ -186,7 +186,7 @@ public class FlowUtils {
|
|||||||
{
|
{
|
||||||
WorkspaceItem wsi = WorkflowManager.reject(context, workflowItem,context.getCurrentUser(), reason);
|
WorkspaceItem wsi = WorkflowManager.reject(context, workflowItem,context.getCurrentUser(), reason);
|
||||||
|
|
||||||
//Load the Submission Process for the collection this WSI is associated with
|
// Load the Submission Process for the collection this WSI is associated with
|
||||||
Collection c = wsi.getCollection();
|
Collection c = wsi.getCollection();
|
||||||
SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
|
SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
|
||||||
SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(c.getHandle(), false);
|
SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(c.getHandle(), false);
|
||||||
@@ -201,7 +201,7 @@ public class FlowUtils {
|
|||||||
|
|
||||||
context.commit();
|
context.commit();
|
||||||
|
|
||||||
//Submission rejected. Log this information
|
// Submission rejected. Log this information
|
||||||
log.info(LogManager.getHeader(context, "reject_workflow", "workflow_item_id="
|
log.info(LogManager.getHeader(context, "reject_workflow", "workflow_item_id="
|
||||||
+ wsi.getID() + "item_id=" + wsi.getItem().getID()
|
+ wsi.getID() + "item_id=" + wsi.getItem().getID()
|
||||||
+ "collection_id=" + wsi.getCollection().getID()
|
+ "collection_id=" + wsi.getCollection().getID()
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user