Skip to content

Commit

Permalink
#85 english translation in java classes
Browse files Browse the repository at this point in the history
  • Loading branch information
cserhatit committed Jun 19, 2024
1 parent e34c3a9 commit 5efcf3e
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
import hu.icellmobilsoft.dookug.common.system.rest.action.BaseAction;

/**
* Általános cache-elést támogató osztály
* Class supporting general caching
*
* @param <KEY>
* cache kulcs típusa, ami alapján keresünk
* Type of cache key used for lookup
* @param <VALUE>
* a cache-ben tárolt elemek típusa
* Type of elements stored in the cache
*
* @author istvan.peli
* @since 0.5.0
Expand All @@ -57,16 +57,16 @@ public abstract class AbstractCache<KEY, VALUE> extends BaseAction implements Ev
private CacheMetricsCollector metricsCollector;

/**
* Visszaadja a használt guava cache objektumot
* Returns the used Guava cache object
*
* @return a használt guava cache objektumot
* @return the guava cache object
*/
protected abstract Cache<KEY, VALUE> getCache();

/**
* Létrehoz egy cache builder-t ami tartalmazza a cache beállításait
* Creates a cache builder which contains the settings
*
* @return a létrehozott cache builder
* @return the {@link CacheBuilder}
*/
protected CacheBuilder<Object, Object> createCacheBuilder() {
CacheBuilder<Object, Object> cacheBuilder = CacheBuilder.newBuilder();
Expand All @@ -79,21 +79,21 @@ protected CacheBuilder<Object, Object> createCacheBuilder() {
}

/**
* Cache TTL meghatározása
* get the value of TTL
*
* @return a ttl értéke
* @return TTL value
*/
protected abstract long getTtl();

/**
* Metrika/Statisztika engedélyezése
* Checks enabling of metrics/statistics
*
* @return true, ha engedélyezve van
* @return true, if enabled
*/
protected abstract boolean isStatisticsEnabled();

/**
* Visszaadja a konfigban használt nevet
* Get the cache name from configuration
*
* @return a konfigban használt név
*/
Expand All @@ -114,12 +114,12 @@ public void evict() {
}

/**
* Törli a kulcshoz tárolt adatokat a cache-ből
* Removes the data from cache stored under the key
*
* @param key
* a keresett kulcs
* the key to delete
* @throws BaseException
* hiba esetén
* on error
*/
protected void evict(KEY key) throws BaseException {
if (key == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import hu.icellmobilsoft.dookug.common.system.rest.action.BaseAction;

/**
* Cache metrikákat gyűjtő action
* Action for collecting cache metrics
*
* @author istvan.peli
* @since 0.5.0
Expand All @@ -58,14 +58,14 @@ public class CacheMetricsCollector extends BaseAction {
private MetricRegistry metricRegistry;

/**
* Kigyűjti az átadott cache objektumból a metrikákat
* Collects metrics from the passed cache object
*
* @param cache
* vizsgált cache példány
* the cache object
* @param cacheName
* az átadott cache neve
* name of cache
* @throws BaseException
* hiba esetén
* on error
*/
public void updateMetrics(Cache<?, ?> cache, String cacheName) throws BaseException {
if (cache == null || StringUtils.isBlank(cacheName)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import hu.icellmobilsoft.dookug.schemas.common._1_0.config.evict.EvictResponse;

/**
* {@link Evictable} szolgáltatások igény szerint törölhetik az állapotaikat Az action iterál végig ezeken a szolgáltatásokon
* {@link Evictable} services can delete their states on demand. The action iterates through these services
*
* @author tamas.cserhati
* @since 0.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
public class OpenAPIFilter implements OASFilter {

/**
* mp-openapi takes objects with a pattern (not String, e.g. date types) as object type, so it does not generate the pattern into the definition.
* mp-openapi takes objects with a pattern (not String, e.g., date types) as object type, so it does not generate the pattern into the definition.
*
* @param schema
* the {@link org.eclipse.microprofile.openapi.annotations.media.Schema}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ private void compileTemplate(BaseGeneratorSetupType generatorSetup, Template fir
}
} else {
if (templateContainer.length() > 1) {
// több template esetén az egymásra való hivatkozás miatt mindenféleképpen kell template engine
// In the case of multiple templates, a template engine is absolutely necessary due to the references to each other
throw new BusinessException(CoffeeFaultType.INVALID_INPUT, "Cannot compile more than one template without template engine!");
} else {
// 1 template esetén nem kell template engine, ha nem kell paraméter sem
// If there is only one template and no parameters are needed, a template engine is not required
templateContainer.setCompiledResult(new String(firstTemplate.getTemplateContent(), StandardCharsets.UTF_8));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class DocumentMetadataQueryAction extends BaseAction {
private DocumentQueryService documentQueryService;

/**
* Dokument metadata query, can be filtered and paged
* Document metadata query, can be filtered and paginated
*
* @param queryRequest
* {@link DocumentMetadataQueryRequest}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ private Document generateAndGetDocument(StoredTemplateGeneratorSetupType generat
.select(ITemplateStore.class, new StorageMethodQualifier.Literal(generatorSetup.getTemplateStorageMethod().name()))
.get();

// Így előtöltöttünk minden - az adott requesthez szükséges - templatet. A template motor resolvere/loadere ezután ebből a containerből
// gazdálkodik.
// This way, we preloaded all the templates needed for the given request. The template engine's resolver/loader then utilizes this container.
store.loadTemplatesByNameAndValidity(
generatorSetup.getTemplate().getTemplateName(),
generatorSetup.getTemplate().getTemplateLanguage(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import hu.icellmobilsoft.dookug.common.model.template.TemplatePartContent;

/**
* {@link TemplatePartContent} entitás adatbázis mūveletei
* Database operations for {@link TemplatePartContent} entity
*
* @author laszlo.padar
* @since 0.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import hu.icellmobilsoft.dookug.common.model.template.TemplatePart;

/**
* {@link TemplatePart} entitás adatbázis mūveletei
* Database operations for {@link TemplatePart} entity
*
* @author laszlo.padar
* @since 0.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import hu.icellmobilsoft.dookug.common.model.template.Template;

/**
* {@link Template} entitás adatbázis mūveletei
* Database operations for {@link Template} entity
*
* @author laszlo.padar
* @since 0.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import hu.icellmobilsoft.dookug.common.model.template.TemplateTemplatePart;

/**
* {@link TemplateTemplatePart} entitás adatbázis mūveletei
* Database oeprations for {@link TemplateTemplatePart} entity
*
* @author laszlo.padar
* @since 0.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void generateToOutputStream(OutputStream outputStream, ParametersDataType
.newInstance(TransformerFactoryImpl.class.getName(), TransformerFactoryImpl.class.getClassLoader());
//
// factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
// ez sajnos egy hibat general: 'XTSE0010: xsl:result-document is disabled when extension functions are disabled'
// Unfortunately, this generates an error: 'XTSE0010: xsl:result-document is disabled when extension functions are disabled'
//
Transformer transformer = factory.newTransformer(new StreamSource(templateStream));

Expand All @@ -165,8 +165,8 @@ public void generateToOutputStream(OutputStream outputStream, ParametersDataType
MessageFormat.format("XSLT PDF transformation failed with error: [{0}]", e.getLocalizedMessage()),
e);
} finally {
// ezt mindig hivjuk meg a finally blokkban, hogy ha barmilyen hiba tortenne a ket signatureGenerator hivas kozott, akkor is lezarjuk az
// eroforrasokat
// Always call this in the finally block to ensure that resources are closed even if any error occurs between the two signatureGenerator
// calls
signatureGenerator.closeStreams();
}
}
Expand Down Expand Up @@ -223,8 +223,7 @@ private Result getFOStream(OutputStream outputStream, SaxonGeneratorParametersDa
private String getLanguage(BaseGeneratorSetupType baseGeneratorSetup) {
String requestLanguage = null;
if (baseGeneratorSetup instanceof StoredTemplateGeneratorSetupType generatorSetup) {
requestLanguage = generatorSetup.getTemplate().getTemplateLanguage() == null ? null
: generatorSetup.getTemplate().getTemplateLanguage();
requestLanguage = generatorSetup.getTemplate().getTemplateLanguage() == null ? null : generatorSetup.getTemplate().getTemplateLanguage();
} else if (baseGeneratorSetup instanceof InlineGeneratorSetupType generatorSetup) {
requestLanguage = generatorSetup.getTemplateLanguage() == null ? null : generatorSetup.getTemplateLanguage();
}
Expand Down

0 comments on commit 5efcf3e

Please sign in to comment.