@Service(value="commonServices#rest") public class DefaultCommonServices extends Object implements CommonServices
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
cachei18n |
protected org.apache.archiva.redback.components.scheduler.CronExpressionValidator |
cronExpressionValidator |
private org.slf4j.Logger |
log |
private static String |
RESOURCE_NAME |
private org.apache.archiva.redback.rest.api.services.UtilServices |
utilServices |
Constructor and Description |
---|
DefaultCommonServices() |
Modifier and Type | Method and Description |
---|---|
private String |
fromProperties(Properties properties) |
String |
getAllI18nResources(String locale)
will return properties available in org/apache/archiva/i18n/default.properties
load default (en) then override with locale used so at least en are returned if no
translation in the locale asked.
|
String |
getI18nResources(String locale)
will return properties available in org/apache/archiva/i18n/default.properties
load default (en) then override with locale used so at least en are returned if no
translation in the locale asked.
|
void |
init() |
private void |
loadFromString(String propsStr,
Properties properties) |
private void |
loadResource(Properties properties,
StringBuilder resourceName,
String locale) |
private void |
loadResource(Properties finalProperties,
String resourceName,
String locale) |
Boolean |
validateCronExpression(String cronExpression) |
private static final String RESOURCE_NAME
private org.slf4j.Logger log
@Inject private org.apache.archiva.redback.rest.api.services.UtilServices utilServices
@Inject protected org.apache.archiva.redback.components.scheduler.CronExpressionValidator cronExpressionValidator
public DefaultCommonServices()
@PostConstruct public void init() throws ArchivaRestServiceException
ArchivaRestServiceException
public String getI18nResources(String locale) throws ArchivaRestServiceException
CommonServices
getI18nResources
in interface CommonServices
ArchivaRestServiceException
private void loadResource(Properties properties, StringBuilder resourceName, String locale) throws IOException
IOException
private String fromProperties(Properties properties)
private void loadResource(Properties finalProperties, String resourceName, String locale) throws IOException
IOException
public String getAllI18nResources(String locale) throws ArchivaRestServiceException
CommonServices
getAllI18nResources
in interface CommonServices
ArchivaRestServiceException
private void loadFromString(String propsStr, Properties properties) throws ArchivaRestServiceException
ArchivaRestServiceException
public Boolean validateCronExpression(String cronExpression) throws ArchivaRestServiceException
validateCronExpression
in interface CommonServices
ArchivaRestServiceException
Copyright © 2006–2023 The Apache Software Foundation. All rights reserved.