Skip to content

Commit

Permalink
Merge pull request #468 from ec-jrc/develop
Browse files Browse the repository at this point in the history
v2.6.1rc-1
  • Loading branch information
oruscalleda authored Oct 3, 2024
2 parents 359290b + c040caa commit a202095
Show file tree
Hide file tree
Showing 97 changed files with 1,811 additions and 1,350 deletions.
2 changes: 2 additions & 0 deletions documentation/administrator-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,5 @@ You can change some of the variables of the different email templates, such as t
To change those, you can access the[configuration.properties](https://github.com/ec-jrc/re3gistry/blob/master/sources/Re3gistry2/src/main/resources/configurations_files/configuration.properties) file, where you can search the mail template variables by searching the "mail.text" variables.
You can see the different subjects and text that you can change. Consider that some of these may need some proper code changing in their respective java classes.
App's default name is Re3gistry2; this variable is used in email templates showing the instance name. The property that manages this name is called "application.default.name". This variable can be found in the same [configuration.properties](https://github.com/ec-jrc/re3gistry/blob/master/sources/Re3gistry2/src/main/resources/configurations_files/configuration.properties) file.

Please configure an email server to handle notifications and ensure proper delivery of emails.
6 changes: 6 additions & 0 deletions documentation/developer-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ To modify the URL where the page icons (favicons) and images point, navigate to

Once you've made changes to the **web.cdn_url** property, it will be used in `sources\Re3gistry2\src\main\webapp\jsp\includes\head.inc.jsp` to generate the final URLs for the page icons and images, enabling you to customize their paths as necessary.

## Webapp Icons
By default, the site header logo image is configured to display a different picture for each language. When you change the language using the language selector, the logo will automatically update to match the selected language.

![Site HeaderLogo](images/site-header-logo.png)

If you prefer to use a single logo for all languages, you can modify the configuration file located at `dist/webapp/public_html/conf/conf.js` Set the **registryApp.multiLogo** variable to false. Below this variable, you will find **registryApp.singleLogoPath**, where you should specify the path to the single logo.



Expand Down
Binary file added documentation/images/site-header-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions documentation/user-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,8 @@ Depending on the type of installation, using an external authentication provider

Users can receive different email notifications to inform them about statuses and actions done to the items and actions they have taken part in. These notifications indicate the status of the items (Items been submitted, published etc.) and some of the actions done in the instance, such as permissions and roles given to a user.

Please ensure that an email server is configured to handle notifications and proper delivery of emails.

## Bulk Import and Bulk Edit

This feature allows the user to make modifications to multiple existing items.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import eu.europa.ec.re3gistry2.crudimplementation.RegActionManager;
import eu.europa.ec.re3gistry2.model.RegAction;
import java.io.IOException;
import java.util.logging.Level;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.servlet.ServletException;
Expand Down Expand Up @@ -62,7 +63,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
try {
regAction = regActionManager.get(actionUUID);
} catch (NoResultException e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within ActionDetail class. Please check the details: " + e.getMessage(), e.getMessage());
}

// Setting the RegAction parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,16 @@
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.logging.Level;

@WebServlet(WebConstants.PAGE_URINAME_ADDITEM)
public class AddItem extends HttpServlet {

private void processRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
// Init logger
Logger logger = Configuration.getInstance().getLogger();
Logger logger = Configuration.getInstance().getLogger();

// Init frontend servlet
Configuration.getInstance().initServlet(request, response, false, false);
Expand Down Expand Up @@ -93,20 +95,19 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
RegRelationpredicate regRelationpredicateRegister = regRelationpredicateManager.get(BaseConstants.KEY_PREDICATE_REGISTER);

// Getting parameters
//String languageUuid = request.getParameter(BaseConstants.KEY_REQUEST_LANGUAGEUUID);
String languageUuid = request.getParameter(BaseConstants.KEY_REQUEST_LANGUAGEUUID);
String itemUuid = request.getParameter(BaseConstants.KEY_REQUEST_ITEMUUID);
String formNewItemCheck = request.getParameter(BaseConstants.KEY_REQUEST_NEWITEMINSERT);
String newItemItemclassUuid = request.getParameter(BaseConstants.KEY_FORM_FIELD_NAME_NEWITEMREGITEMCLASSUUID);
String formRegItemContainerUuid = request.getParameter(BaseConstants.KEY_FORM_FIELD_NAME_REGITEMCONTAINERUUID);
String externalItem = request.getParameter(BaseConstants.KEY_FORM_FIELD_NAME_EXTERNAL_ITEM);
//languageUuid = (languageUuid != null) ? InputSanitizerHelper.sanitizeInput(languageUuid) : null;

languageUuid = (languageUuid != null) ? InputSanitizerHelper.sanitizeInput(languageUuid) : null;
itemUuid = (itemUuid != null) ? InputSanitizerHelper.sanitizeInput(itemUuid) : null;
formNewItemCheck = (formNewItemCheck != null) ? InputSanitizerHelper.sanitizeInput(formNewItemCheck) : null;
newItemItemclassUuid = (newItemItemclassUuid != null) ? InputSanitizerHelper.sanitizeInput(newItemItemclassUuid) : null;
formRegItemContainerUuid = (formRegItemContainerUuid != null) ? InputSanitizerHelper.sanitizeInput(formRegItemContainerUuid) : null;
externalItem = (externalItem != null) ? InputSanitizerHelper.sanitizeInput(externalItem) : null;

externalItem = (externalItem != null) ? InputSanitizerHelper.sanitizeInput(externalItem) : null;

if (itemUuid == null || itemUuid.length() < 1) {
itemUuid = formRegItemContainerUuid;
Expand All @@ -123,7 +124,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp

// Getting the language by parameter (if not available the master language is used)
RegLanguagecode regLanguagecode = null;

// Adding a new item it always add in the masterLanguage
/*if (languageUuid != null && languageUuid.length() == 2) {
try {
Expand All @@ -132,7 +133,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
regLanguagecode = masterLanguage;
}
} else {*/
regLanguagecode = masterLanguage;
regLanguagecode = masterLanguage;
//}
request.setAttribute(BaseConstants.KEY_REQUEST_CURRENTLANGUAGE, regLanguagecode);

Expand All @@ -153,6 +154,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
try {
regItemRegistry = regRelationRegistries.get(0).getRegItemObject();
} catch (Exception e) {
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.INFO, e.getMessage(), e.getMessage());
regItemRegistry = null;
}
}
Expand All @@ -164,6 +166,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
try {
regItemRegister = regRelationRegisters.get(0).getRegItemObject();
} catch (Exception e) {
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.INFO, e.getMessage(), e.getMessage());
regItemRegister = null;
}
}
Expand Down Expand Up @@ -224,18 +227,19 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp

// Getting the request's parameters
Map requestParameters = request.getParameterMap();

// Dispatch the rerquest
try {
regItemproposedHandler.handleRegItemproposedAddition(requestParameters, regUser, localization);
} catch (Exception e) {
String operationResult = e.getMessage();
request.setAttribute(BaseConstants.KEY_REQUEST_OPERATIONRESULT, operationResult);
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within AddItem class. Please check the details: " + e.getMessage(), e.getMessage());

}

// Redirecting to the Item container page
response.sendRedirect("." + WebConstants.PAGE_URINAME_BROWSE + "?" + BaseConstants.KEY_REQUEST_ITEMUUID + "=" + formRegItemContainerUuid);
request.getRequestDispatcher("." + WebConstants.PAGE_URINAME_BROWSE + "?" + BaseConstants.KEY_REQUEST_ITEMUUID + "=" + itemUuid + "&" + BaseConstants.KEY_REQUEST_LANGUAGEUUID + "=" + languageUuid).forward(request, response);

} else {

Expand Down Expand Up @@ -287,6 +291,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
request.getRequestDispatcher(WebConstants.PAGE_JSP_FOLDER + WebConstants.PAGE_PATH_ADDITEM + WebConstants.PAGE_URINAME_ADDITEM + WebConstants.PAGE_JSP_EXTENSION).forward(request, response);

} catch (Exception e) {
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within AddItem class. Please check the details: " + e.getMessage(), e.getMessage());
// Redirecting to the Item container page
response.sendRedirect("." + WebConstants.PAGE_URINAME_BROWSE + "?" + BaseConstants.KEY_REQUEST_ITEMUUID + "=" + itemUuid);
}
Expand All @@ -296,10 +301,11 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
response.sendRedirect("." + WebConstants.PAGE_URINAME_BROWSE + "?" + BaseConstants.KEY_REQUEST_ITEMUUID + "=" + itemUuid);
}
} catch (NoResultException e) {
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within AddItem class. Please check the details: " + e.getMessage(), e.getMessage());
// Redirecting to the Item container page
response.sendRedirect("." + WebConstants.PAGE_URINAME_BROWSE + "?" + BaseConstants.KEY_REQUEST_ITEMUUID + "=" + itemUuid);
} catch (Exception e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within AddItem class. Please check the details: " + e.getMessage(), e.getMessage());
}
} else {
response.sendRedirect("." + WebConstants.PAGE_URINAME_BROWSE);
Expand All @@ -312,7 +318,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro
processRequest(request, response);
} catch (Exception ex) {
Logger logger = Configuration.getInstance().getLogger();
logger.error(ex.getMessage(), ex);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within AddItem class. Please check the details: " + ex.getMessage(), ex.getMessage());
}
}

Expand All @@ -322,7 +328,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) thr
processRequest(request, response);
} catch (Exception ex) {
Logger logger = Configuration.getInstance().getLogger();
logger.error(ex.getMessage(), ex);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within AddItem class. Please check the details: " + ex.getMessage(), ex.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.ResourceBundle;
import java.util.logging.Level;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.servlet.ServletException;
Expand Down Expand Up @@ -178,7 +179,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
}

} catch (NoResultException e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within AddRegister class. Please check the details: " + e.getMessage(), e.getMessage());
// Setting the operation success attribute
operationResult = localization.getString("error.generic");
request.setAttribute(BaseConstants.KEY_REQUEST_OPERATIONRESULT, operationResult);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.servlet.ServletException;
Expand Down Expand Up @@ -90,7 +91,8 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
mainRegistryItemclassLocalId = properties.getProperty("application.multiregistry.mainregistryitemclasslocalid");
mainRegistryLocalId = properties.getProperty("application.multiregistry.mainregistrylocalid");
} catch (Exception e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within Browse class. Please check the details: " + e.getMessage(), e.getMessage());

}

// Setup the entity manager
Expand Down Expand Up @@ -310,7 +312,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
try {
regItemproposedHandler.handleRegItemproposedSave(requestParameters, regUser);
} catch (Exception e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within Browse class. Please check the details: " + e.getMessage(), e.getMessage());
saveError = true;
}
} else if (regItemproposed != null && ( // Permission to edit Registers and items
Expand All @@ -328,7 +330,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
try {
regItemproposedHandler.handleRegItemproposedNewSave(requestParameters, regUser);
} catch (Exception e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within Browse class. Please check the details: " + e.getMessage(), e.getMessage());
saveError = true;
}
}
Expand Down Expand Up @@ -385,7 +387,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
}
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within Browse class. Please check the details: " + e.getMessage(), e.getMessage());
response.sendRedirect(".");
} finally {
if (entityManager.isOpen()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
request.getRequestDispatcher("." + WebConstants.PAGE_URINAME_BROWSE + "?" + BaseConstants.KEY_REQUEST_ITEMUUID + "=" + itemUuid + "&" + BaseConstants.KEY_REQUEST_LANGUAGEUUID + "=" + languageUuid).forward(request, response);
}
} catch (Exception ex) {
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within BulkImport class. Please check the details: " + ex.getMessage(), ex.getMessage());
// request.setAttribute(BaseConstants.KEY_REQUEST_BULK_ERROR, ex.getMessage());
request.getRequestDispatcher("." + WebConstants.PAGE_URINAME_BROWSE + "?" + BaseConstants.KEY_REQUEST_ITEMUUID + "=" + itemUuid + "&" + BaseConstants.KEY_REQUEST_LANGUAGEUUID + "=" + languageUuid).forward(request, response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import java.util.List;
import java.util.Optional;
import java.util.ResourceBundle;
import java.util.logging.Level;
import javax.mail.internet.InternetAddress;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
Expand Down Expand Up @@ -272,6 +273,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
}

} catch (NoResultException e) {
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within ControlBody class. Please check the details: " + e.getMessage(), e.getMessage());
}
}

Expand All @@ -295,6 +297,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp

} catch (Exception e) {
// Redirecting to the RegItemclasses list page
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within ControlBody class. Please check the details: " + e.getMessage(), e.getMessage());
response.sendRedirect("." + WebConstants.PAGE_PATH_INDEX + WebConstants.PAGE_URINAME_INDEX);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import eu.europa.ec.re3gistry2.web.utility.jsp.JspCommon;
import java.io.IOException;
import java.util.List;
import java.util.logging.Level;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.servlet.ServletException;
Expand Down Expand Up @@ -146,7 +147,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
redirectURI = "." + WebConstants.PAGE_PATH_SUBMITTINGORGANISATIONS + WebConstants.PAGE_URINAME_SUBMITTINGORGANISATIONS;
// request.getRequestDispatcher(WebConstants.PAGE_JSP_FOLDER + WebConstants.PAGE_PATH_SUBMITTINGORGANISATIONS + WebConstants.PAGE_URINAME_SUBMITTINGORGANISATIONS + WebConstants.PAGE_JSP_EXTENSION).forward(request, response);
} catch (NoResultException e) {
logger.error(e.getMessage(), e);
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within DiscardProposal class. Please check the details: " + e.getMessage(), e.getMessage());
}
} else // discard item
if (regItemproposedUUID != null && !regItemproposedUUID.isEmpty()) {
Expand Down Expand Up @@ -226,6 +227,7 @@ private void processRequest(HttpServletRequest request, HttpServletResponse resp
response.sendRedirect(redirectURI);

} catch (NoResultException e) {
java.util.logging.Logger.getLogger(RegisterManager.class.getName()).log(Level.SEVERE, "Error encountered within DiscardProposal class. Please check the details: " + e.getMessage(), e.getMessage());
}

}
Expand Down
Loading

0 comments on commit a202095

Please sign in to comment.