@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
ArchivaRestServiceExceptionpublic String getI18nResources(String locale) throws ArchivaRestServiceException
CommonServicesgetI18nResources in interface CommonServicesArchivaRestServiceExceptionprivate void loadResource(Properties properties, StringBuilder resourceName, String locale) throws IOException
IOExceptionprivate String fromProperties(Properties properties)
private void loadResource(Properties finalProperties, String resourceName, String locale) throws IOException
IOExceptionpublic String getAllI18nResources(String locale) throws ArchivaRestServiceException
CommonServicesgetAllI18nResources in interface CommonServicesArchivaRestServiceExceptionprivate void loadFromString(String propsStr, Properties properties) throws ArchivaRestServiceException
ArchivaRestServiceExceptionpublic Boolean validateCronExpression(String cronExpression) throws ArchivaRestServiceException
validateCronExpression in interface CommonServicesArchivaRestServiceExceptionCopyright © 2006–2023 The Apache Software Foundation. All rights reserved.