Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #13791 #840

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.silverpeas.core.date.TemporalConverter.Conversion;
import org.silverpeas.core.pdc.pdc.model.GlobalSilverResult;
import org.silverpeas.core.template.SilverpeasTemplate;
import org.silverpeas.core.template.SilverpeasTemplateFactory;
import org.silverpeas.core.template.SilverpeasTemplates;
import org.silverpeas.core.ui.DisplayI18NHelper;
import org.silverpeas.core.util.MultiSilverpeasBundle;
import org.silverpeas.kernel.bundle.ResourceLocator;
Expand Down Expand Up @@ -159,6 +159,6 @@ private void setEventAttributes(CalendarEvent event, SilverpeasTemplate template
* @return a new Silverpeas Template
*/
private SilverpeasTemplate getNewTemplate() {
return SilverpeasTemplateFactory.createSilverpeasTemplate(templateConfig);
return SilverpeasTemplates.createSilverpeasTemplate(templateConfig);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
4 changes: 0 additions & 4 deletions gallery/gallery-library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
</dependency>
<dependency>
<groupId>org.silverpeas.core</groupId>
<artifactId>silverpeas-core-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
import org.silverpeas.core.subscription.service.ComponentSubscriptionResource;
import org.silverpeas.core.subscription.service.NodeSubscriptionResource;
import org.silverpeas.core.template.SilverpeasTemplate;
import org.silverpeas.core.template.SilverpeasTemplateFactory;
import org.silverpeas.core.template.SilverpeasTemplates;
import org.silverpeas.core.util.*;
import org.silverpeas.core.util.error.SilverpeasTransverseErrorUtil;
import org.silverpeas.core.util.file.FileFolderManager;
Expand Down Expand Up @@ -277,7 +277,7 @@ private void init() {
getOrganisationController().isComponentManageable(getComponentId(), getUserId());
}
// check if this instance use a specific template of publication
SilverpeasTemplate template = SilverpeasTemplateFactory.createSilverpeasTemplateOnComponents();
SilverpeasTemplate template = SilverpeasTemplates.createSilverpeasTemplateOnComponents();
customPublicationTemplateName = "publication_" + getComponentId();
customPublicationTemplateUsed =
template.isCustomTemplateExists(KMELIA, customPublicationTemplateName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import org.silverpeas.core.io.media.image.thumbnail.ThumbnailSettings;
import org.silverpeas.core.node.model.NodePK;
import org.silverpeas.core.template.SilverpeasTemplate;
import org.silverpeas.core.template.SilverpeasTemplateFactory;
import org.silverpeas.core.template.SilverpeasTemplates;
import org.silverpeas.core.util.ArrayUtil;
import org.silverpeas.core.util.MultiSilverpeasBundle;
import org.silverpeas.kernel.bundle.ResourceLocator;
Expand Down Expand Up @@ -556,7 +556,7 @@ void displayTemplatedFragmentOfPublication(KmeliaPublication aPub,
PublicationFragmentSettings fragmentSettings, String language,
KmeliaSessionController kmeliaScc, MultiSilverpeasBundle resources, Writer out)
throws IOException {
SilverpeasTemplate template = SilverpeasTemplateFactory.createSilverpeasTemplateOnComponents();
SilverpeasTemplate template = SilverpeasTemplates.createSilverpeasTemplateOnComponents();
PublicationDetail pub = aPub.getDetail();
String name = pub.getName(language);
String description = pub.getDescription(language);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.silverpeas.core.node.model.NodeDetail;
import org.silverpeas.core.pdc.pdc.model.GlobalSilverResult;
import org.silverpeas.core.template.SilverpeasTemplate;
import org.silverpeas.core.template.SilverpeasTemplateFactory;
import org.silverpeas.core.template.SilverpeasTemplates;
import org.silverpeas.core.ui.DisplayI18NHelper;
import org.silverpeas.kernel.bundle.ResourceLocator;
import org.silverpeas.kernel.bundle.SettingBundle;
Expand Down Expand Up @@ -217,7 +217,7 @@ private void setWysiwygContent(final SilverpeasTemplate template, final String i
* @return a new Silverpeas Template
*/
protected SilverpeasTemplate getNewTemplate() {
return SilverpeasTemplateFactory.createSilverpeasTemplate(templateConfig);
return SilverpeasTemplates.createSilverpeasTemplate(templateConfig);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.silverpeas.kernel.util.StringUtil;
import org.silverpeas.core.i18n.I18NHelper;
import org.silverpeas.core.template.SilverpeasTemplate;
import org.silverpeas.core.template.SilverpeasTemplateFactory;
import org.silverpeas.core.template.SilverpeasTemplates;

import javax.enterprise.inject.Default;
import javax.inject.Singleton;
Expand Down Expand Up @@ -63,7 +63,7 @@ public class AdvancedNotificationFormatter extends AbstractNotificationFormatter

public SilverpeasTemplate getTemplate(Message message, String mailingListName, boolean moderate) {
Properties configuration = new Properties(templateConfiguration);
SilverpeasTemplate template = SilverpeasTemplateFactory.createSilverpeasTemplate(configuration);
SilverpeasTemplate template = SilverpeasTemplates.createSilverpeasTemplate(configuration);
template.setAttribute("title", message.getTitle());
template.setAttribute("mailingListName", mailingListName);
template.setAttribute("summary", message.getSummary());
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<parent>
<groupId>org.silverpeas</groupId>
<artifactId>silverpeas-project</artifactId>
<version>1.6-build240209</version>
<version>1.6-feature13791</version>
</parent>

<groupId>org.silverpeas</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.silverpeas.components.rssaggregator.service.RssAggregator;
import org.silverpeas.components.rssaggregator.service.RssAggregatorCache;
import org.silverpeas.core.template.SilverpeasTemplate;
import org.silverpeas.core.template.SilverpeasTemplateFactory;
import org.silverpeas.core.template.SilverpeasTemplates;
import org.silverpeas.kernel.bundle.ResourceLocator;
import org.silverpeas.kernel.bundle.SettingBundle;
import org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController;
Expand All @@ -54,7 +54,7 @@
*/
public class RssAgregatorSessionController extends AbstractComponentSessionController {
// instance of RssAggregatorCache singleton
private RssAggregatorCache cache = RssAggregatorCache.getInstance();
private final RssAggregatorCache cache = RssAggregatorCache.getInstance();
private RssAggregator rssBm = null;
private SPChannel currentChannel = null;
private SimpleDateFormat dateFormatter = null;
Expand Down Expand Up @@ -97,18 +97,17 @@ public List<SPChannel> getAvailableChannels() throws RssAgregatorException {
}

/**
* Extract rss files information (channels and items). Return a list of Channel.
* loads rss files information (channels and items).
*/
public List<SPChannel> getChannelsContent() throws RssAgregatorException {
return getRssService().getAllChannels(getComponentId());
public void loadChannelsContent() throws RssAgregatorException {
getRssService().getAllChannels(getComponentId());
}

public SPChannel addChannel(SPChannel channel) throws RssAgregatorException {
public void addChannel(SPChannel channel) {
// add channel in database
channel.setInstanceId(getComponentId());
channel.setCreatorId(getUserId());
channel.setCreationDate(getDateFormatter().format(new Date()));
return getRssAggregator().addChannel(channel);
}

public void updateChannel(SPChannel channel) throws RssAgregatorException {
Expand Down Expand Up @@ -194,7 +193,7 @@ private SilverpeasTemplate getNewTemplate() {
.setProperty(SilverpeasTemplate.TEMPLATE_ROOT_DIR, rs.getString("templatePath"));
templateConfiguration
.setProperty(SilverpeasTemplate.TEMPLATE_CUSTOM_DIR, rs.getString("customersTemplatePath"));
return SilverpeasTemplateFactory.createSilverpeasTemplate(templateConfiguration);
return SilverpeasTemplates.createSilverpeasTemplate(templateConfiguration);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public String getDestination(String function, RssAgregatorSessionController rssS
request.setAttribute("Role", "user");
destination = prepareAggregatedView(rssSC, request, true);
} else if (function.equals("LoadChannels")) {
rssSC.getChannelsContent();
rssSC.loadChannelsContent();
destination = getDestination("Main", rssSC, request);
} else if (function.equals("ToAddChannel")) {
destination = getChannelManagerDestination(rssSC, request);
Expand Down Expand Up @@ -120,8 +120,8 @@ private String getChannelManagerDestination(final RssAgregatorSessionController
* @param rssSC the rss session controller
* @param request the Http Servlet Request
* @param isPortletView true if for portlet view, false else if
* @return
* @throws RssAgregatorException
* @return the next view to which the control flow has to be passed
* @throws RssAgregatorException if an error occurs.
*/
private String prepareAggregatedView(RssAgregatorSessionController rssSC,
HttpServletRequest request, boolean isPortletView) throws RssAgregatorException {
Expand All @@ -146,13 +146,6 @@ private String prepareAggregatedView(RssAgregatorSessionController rssSC,
return destination;
}

/**
* Prepare data for
* @param rssSC
* @param request
* @return
* @throws RssAgregatorException
*/
private String prepareSeparatedView(RssAgregatorSessionController rssSC,
HttpServletRequest request) throws RssAgregatorException {
String destination;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ Created-By: Silverpeas
Dependencies: org.jboss.as.naming,
org.slf4j,
org.apache.xerces,
org.antlr,
org.apache.lucene-7,
jdk.unsupported