Skip to content

Commit

Permalink
Update content 2023-06-13 11:02:25
Browse files Browse the repository at this point in the history
  • Loading branch information
yevgen-nykytenko committed Jun 13, 2023
1 parent 240b871 commit 210649a
Show file tree
Hide file tree
Showing 96 changed files with 4,411 additions and 2,647 deletions.
16 changes: 8 additions & 8 deletions english/java/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ is_root: true
## Packages
| Package | Description |
| --- | --- |
| [com.groupdocs.viewer](./com.groupdocs.viewer) | The package provides classes for rendering documents in HTML5, Image or PDF modes fast and with high quality. |
| [com.groupdocs.viewer.caching](./com.groupdocs.viewer.caching) | The package provides classes for customizing caching behaviour. |
| [com.groupdocs.viewer](./com.groupdocs.viewer) | The package provides classes for rendering documents in HTML5, Image, or PDF modes with fast and high-quality results. |
| [com.groupdocs.viewer.caching](./com.groupdocs.viewer.caching) | The package provides classes for customizing caching behavior. |
| [com.groupdocs.viewer.caching.extra](./com.groupdocs.viewer.caching.extra) | The package provides functionality for using custom models in cache implementation. |
| [com.groupdocs.viewer.exception](./com.groupdocs.viewer.exception) | The package provides classes for exceptions which can occur while working with a document. |
| [com.groupdocs.viewer.fonts](./com.groupdocs.viewer.fonts) | The package provides classes classes and enumerations to manage fonts used during rendering process. |
| [com.groupdocs.viewer.interfaces](./com.groupdocs.viewer.interfaces) | The package provides interfaces to instantiate and release output document and it's resources. |
| [com.groupdocs.viewer.logging](./com.groupdocs.viewer.logging) | The package provides classes for configuring logging system. |
| [com.groupdocs.viewer.exception](./com.groupdocs.viewer.exception) | The package provides classes for exceptions that can occur while working with a document. |
| [com.groupdocs.viewer.fonts](./com.groupdocs.viewer.fonts) | The package provides classes and enumerations to manage fonts used during the rendering process. |
| [com.groupdocs.viewer.interfaces](./com.groupdocs.viewer.interfaces) | The package provides interfaces for instantiating and releasing the output document and its resources. |
| [com.groupdocs.viewer.logging](./com.groupdocs.viewer.logging) | The package provides classes for configuring the logging system in GroupDocs.Viewer. |
| [com.groupdocs.viewer.options](./com.groupdocs.viewer.options) | The package provides classes to specify additional options when rendering documents. |
| [com.groupdocs.viewer.results](./com.groupdocs.viewer.results) | The package provides classes which represent document rendering results. |
| [com.groupdocs.viewer.utils](./com.groupdocs.viewer.utils) | The package provides helpers and utils classes. |
| [com.groupdocs.viewer.results](./com.groupdocs.viewer.results) | The package provides classes and interfaces that represent document rendering results. |
| [com.groupdocs.viewer.utils](./com.groupdocs.viewer.utils) | The package provides helper and utility classes for various functionalities. |
9 changes: 8 additions & 1 deletion english/java/com.groupdocs.viewer.caching.extra/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ url: /java/com.groupdocs.viewer.caching.extra/

The package provides functionality for using custom models in cache implementation.

The main class in this package is [CacheableFactory](../../com.groupdocs.viewer.caching.extra/cacheablefactory), which helps in customizing the cache by providing additional functionality.

For more details on using custom models in cache implementation in GroupDocs.Viewer, please refer to the [GroupDocs.Viewer Documentation][].


[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/


## Classes

| Class | Description |
| --- | --- |
| [CacheableFactory](../com.groupdocs.viewer.caching.extra/cacheablefactory) | This class helps customising [Cache](../com.groupdocs.viewer.caching/cache). |
| [CacheableFactory](../com.groupdocs.viewer.caching.extra/cacheablefactory) | This class helps customize [Cache](../com.groupdocs.viewer.caching/cache). |

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions english/java/com.groupdocs.viewer.caching/_index.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
---
title: com.groupdocs.viewer.caching
second_title: GroupDocs.Viewer for Java API Reference
description: The package provides classes for customizing caching behaviour.
description: The package provides classes for customizing caching behavior.
type: docs
weight: 11
url: /java/com.groupdocs.viewer.caching/
---

The package provides classes for customizing caching behaviour.
The package provides classes for customizing caching behavior.

The main classes and interfaces in this package are:

* [CacheKeys](../../com.groupdocs.viewer.caching/cachekeys) - Provides methods to retrieve unique identifiers for the cache entry.
* [FileCache](../../com.groupdocs.viewer.caching/filecache) - Represents a local on-disk cache.

The [Cache](../../com.groupdocs.viewer.caching/cache) interface defines methods required for storing rendered documents and document resources in the cache.

For more details on customizing caching behavior in GroupDocs.Viewer, please refer to the [GroupDocs.Viewer Documentation][].


[GroupDocs.Viewer Documentation]: https://docs.groupdocs.com/viewer/java/


## Classes

| Class | Description |
| --- | --- |
| [CacheKeys](../com.groupdocs.viewer.caching/cachekeys) | Provides methods to retrieve unique identifier for the cache entry. |
| [CacheKeys](../com.groupdocs.viewer.caching/cachekeys) | Provides methods to retrieve the unique identifier for a cache entry. |
| [FileCache](../com.groupdocs.viewer.caching/filecache) | Represents a local on-disk cache. |

## Interfaces

| Interface | Description |
| --- | --- |
| [Cache](../com.groupdocs.viewer.caching/cache) | Defines methods required for storing rendered document and document resources \\u0441ache. |
| [Cache](../com.groupdocs.viewer.caching/cache) | Defines methods required for storing rendered documents and document resources cache. |
46 changes: 37 additions & 9 deletions english/java/com.groupdocs.viewer.caching/cache/_index.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,50 @@
---
title: Cache
second_title: GroupDocs.Viewer for Java API Reference
description: Defines methods required for storing rendered document and document resources u0441ache.
description: Defines methods required for storing rendered documents and document resources cache.
type: docs
weight: 12
url: /java/com.groupdocs.viewer.caching/cache/
---```
public interface Cache
```

Defines methods required for storing rendered document and document resources \\u0441ache.
Defines methods required for storing rendered documents and document resources cache.

The Cache interface defines the methods required for storing rendered documents and document resources cache in the GroupDocs.Viewer component. It provides a contract for implementing different cache mechanisms to enhance the performance of document rendering by caching frequently accessed data.

Example usage:

```
// Implement a custom cache by implementing the Cache interface
public class MyCustomCache implements Cache {
// Implement the methods of the Cache interface based on your caching mechanism
// ...
}
// Create an instance of your custom cache
Cache myCache = new MyCustomCache();
final ViewerSettings viewerSettings = new ViewerSettings();
// Set the custom cache to viewerSettings
viewerSettings.setCache(myCache);
// Use the viewerSettings object for creating Viewer object to render document with custom cache
try (Viewer viewer = new Viewer(documentPath, viewerSettings)) {
// Use the viewer object for document rendering
}
```

Note: The Cache interface allows you to implement custom cache mechanisms tailored to your specific requirements. GroupDocs.Viewer also provides built-in cache implementation such as [FileCache](../../com.groupdocs.viewer.caching/filecache).
## Methods

| Method | Description |
| --- | --- |
| [set(String key, Object value)](#set-java.lang.String-java.lang.Object-) | Inserts a cache entry into the cache. |
| [<T>get(String key, Class<T> clazz)](#-T-get-java.lang.String-java.lang.Class-T--) | Gets the entry associated with this key if present and null otherwise. |
| [getKeys(String filter)](#getKeys-java.lang.String-) | Returns all keys matching filter. |
| [<T>get(String key, Class<T> clazz)](#-T-get-java.lang.String-java.lang.Class-T--) | Retrieves the entry associated with the specified key if it is present, and returns null otherwise. |
| [getKeys(String filter)](#getKeys-java.lang.String-) | Returns all keys that match the specified filter. |
### set(String key, Object value) {#set-java.lang.String-java.lang.Object-}
```
public abstract void set(String key, Object value)
Expand All @@ -37,28 +65,28 @@ public abstract T <T>get(String key, Class<T> clazz)
```


Gets the entry associated with this key if present and null otherwise.
Retrieves the entry associated with the specified key if it is present, and returns null otherwise.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| key | java.lang.String | A key identifying the requested entry. |
| clazz | java.lang.Class<T> | |
| clazz | java.lang.Class<T> | The class type of the expected entry. |

**Returns:**
T - Object if the key was found and null otherwise.
T - the entry associated with the key if found, or null otherwise.
### getKeys(String filter) {#getKeys-java.lang.String-}
```
public abstract List<String> getKeys(String filter)
```


Returns all keys matching filter.
Returns all keys that match the specified filter.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| filter | java.lang.String | The filter to use. |

**Returns:**
java.util.List<java.lang.String> - Keys matching the filter.
java.util.List<java.lang.String> - A list of keys that match the filter.
74 changes: 46 additions & 28 deletions english/java/com.groupdocs.viewer.caching/cachekeys/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: CacheKeys
second_title: GroupDocs.Viewer for Java API Reference
description: Provides methods to retrieve unique identifier for the cache entry.
description: Provides methods to retrieve the unique identifier for a cache entry.
type: docs
weight: 10
url: /java/com.groupdocs.viewer.caching/cachekeys/
Expand All @@ -12,7 +12,25 @@ java.lang.Object
public class CacheKeys
```

Provides methods to retrieve unique identifier for the cache entry.
Provides methods to retrieve the unique identifier for a cache entry.

The class allows you to generate cache keys based on different parameters, such as the document path, rendering options, and resource name. These cache keys can be used to store and retrieve cached data for efficient document rendering.

Example usage:

```
// Generate a cache key for a file
String fileKey = CacheKeys.getFileKey("filename.pdf");
// Generate a cache key for a page
String pageKey = CacheKeys.getPageKey(pageNumber, FileType.HTML.getExtension());
// Generate a cache key for a resource
Resource resource = new Resource("styles.css", false);
String pageKey = CacheKeys.getResourceKey(pageNumber, resource);
```
## Fields

| Field | Description |
Expand All @@ -22,14 +40,14 @@ Provides methods to retrieve unique identifier for the cache entry.

| Method | Description |
| --- | --- |
| [getAttachmentsKey()](#getAttachmentsKey--) | Returns unique identifier for the cache entry that represents collection of [Attachment](../../com.groupdocs.viewer.results/attachment) objects. |
| [getAttachmentKey(String attachmentId)](#getAttachmentKey-java.lang.String-) | Returns unique identifier for the cache entry that represents attachment file. |
| [getViewInfoKey()](#getViewInfoKey--) | Returns unique identifier for the cache entry that represents [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. |
| [getFileInfoKey()](#getFileInfoKey--) | Returns unique identifier for the cache entry that represents [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. |
| [getFileKey(String extension)](#getFileKey-java.lang.String-) | Returns unique identifier for the cache entry that represents file. |
| [getPageKey(int pageNumber, String extension)](#getPageKey-int-java.lang.String-) | Returns unique identifier for the cache entry that represents page file. |
| [getResourceKey(int pageNumber, Resource resource)](#getResourceKey-int-com.groupdocs.viewer.results.Resource-) | Returns unique identifier for the cache entry that represents [Resource](../../com.groupdocs.viewer.results/resource) object. |
| [getResourceFilter(int pageNumber)](#getResourceFilter-int-) | Returns filter string to search for cache entries that represents [Resource](../../com.groupdocs.viewer.results/resource) objects. |
| [getAttachmentsKey()](#getAttachmentsKey--) | Returns the unique identifier for the cache entry that represents a collection of [Attachment](../../com.groupdocs.viewer.results/attachment) objects. |
| [getAttachmentKey(String attachmentId)](#getAttachmentKey-java.lang.String-) | Retrieves the unique identifier for the cache entry representing an attachment file. |
| [getViewInfoKey()](#getViewInfoKey--) | Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. |
| [getFileInfoKey()](#getFileInfoKey--) | Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object. |
| [getFileKey(String extension)](#getFileKey-java.lang.String-) | Retrieves the unique identifier for the cache entry that represents a file. |
| [getPageKey(int pageNumber, String extension)](#getPageKey-int-java.lang.String-) | Retrieves the unique identifier for the cache entry that represents a page file. |
| [getResourceKey(int pageNumber, Resource resource)](#getResourceKey-int-com.groupdocs.viewer.results.Resource-) | Returns a unique identifier for the cache entry that represents a [Resource](../../com.groupdocs.viewer.results/resource) object. |
| [getResourceFilter(int pageNumber)](#getResourceFilter-int-) | Returns a filter string to search for cache entries that represent [Resource](../../com.groupdocs.viewer.results/resource) objects. |
### PAGE_NUMBER {#PAGE-NUMBER}
```
public static final String PAGE_NUMBER
Expand All @@ -42,67 +60,67 @@ public static String getAttachmentsKey()
```


Returns unique identifier for the cache entry that represents collection of [Attachment](../../com.groupdocs.viewer.results/attachment) objects.
Returns the unique identifier for the cache entry that represents a collection of [Attachment](../../com.groupdocs.viewer.results/attachment) objects.

**Returns:**
java.lang.String - Unique identifier for the cache entry that represents collection of [Attachment](../../com.groupdocs.viewer.results/attachment) objects.
java.lang.String - the unique identifier for the attachments cache entry.
### getAttachmentKey(String attachmentId) {#getAttachmentKey-java.lang.String-}
```
public static String getAttachmentKey(String attachmentId)
```


Returns unique identifier for the cache entry that represents attachment file.
Retrieves the unique identifier for the cache entry representing an attachment file.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| attachmentId | java.lang.String | Unique (in context of single file) identifier of the attachment. |
| attachmentId | java.lang.String | The unique identifier of the attachment (in the context of a single file). |

**Returns:**
java.lang.String - Unique identifier for the cache entry that represents attachment file.
java.lang.String - the unique identifier for the attachment file cache entry.
### getViewInfoKey() {#getViewInfoKey--}
```
public static String getViewInfoKey()
```


Returns unique identifier for the cache entry that represents [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object.
Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object.

**Returns:**
java.lang.String - Unique identifier for the cache entry that represents [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object.
java.lang.String - the unique identifier for the cache entry.
### getFileInfoKey() {#getFileInfoKey--}
```
public static String getFileInfoKey()
```


Returns unique identifier for the cache entry that represents [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object.
Retrieves the unique identifier for the cache entry that represents a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object.

**Returns:**
java.lang.String - Unique identifier for the cache entry that represents [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object.
java.lang.String - the unique identifier for the cache entry representing a [ViewInfo](../../com.groupdocs.viewer.results/viewinfo) object.
### getFileKey(String extension) {#getFileKey-java.lang.String-}
```
public static String getFileKey(String extension)
```


Returns unique identifier for the cache entry that represents file.
Retrieves the unique identifier for the cache entry that represents a file.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| extension | java.lang.String | The filename suffix (including the period ".") e.g. ".doc". |

**Returns:**
java.lang.String - Unique identifier for the cache entry that represents file.
java.lang.String - the unique identifier for the cache entry representing a file.
### getPageKey(int pageNumber, String extension) {#getPageKey-int-java.lang.String-}
```
public static String getPageKey(int pageNumber, String extension)
```


Returns unique identifier for the cache entry that represents page file.
Retrieves the unique identifier for the cache entry that represents a page file.

**Parameters:**
| Parameter | Type | Description |
Expand All @@ -111,14 +129,14 @@ Returns unique identifier for the cache entry that represents page file.
| extension | java.lang.String | The filename suffix (including the period ".") e.g. ".doc". |

**Returns:**
java.lang.String - Unique identifier for the cache entry that represents page file.
java.lang.String - the unique identifier for the cache entry representing a page file.
### getResourceKey(int pageNumber, Resource resource) {#getResourceKey-int-com.groupdocs.viewer.results.Resource-}
```
public static String getResourceKey(int pageNumber, Resource resource)
```


Returns unique identifier for the cache entry that represents [Resource](../../com.groupdocs.viewer.results/resource) object.
Returns a unique identifier for the cache entry that represents a [Resource](../../com.groupdocs.viewer.results/resource) object.

**Parameters:**
| Parameter | Type | Description |
Expand All @@ -127,19 +145,19 @@ Returns unique identifier for the cache entry that represents [Resource](../../c
| resource | [Resource](../../com.groupdocs.viewer.results/resource) | The HTML resource. |

**Returns:**
java.lang.String - Unique identifier for the cache entry that represents [Resource](../../com.groupdocs.viewer.results/resource) object.
java.lang.String - the unique identifier for the cache entry.
### getResourceFilter(int pageNumber) {#getResourceFilter-int-}
```
public static String getResourceFilter(int pageNumber)
```


Returns filter string to search for cache entries that represents [Resource](../../com.groupdocs.viewer.results/resource) objects.
Returns a filter string to search for cache entries that represent [Resource](../../com.groupdocs.viewer.results/resource) objects.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| pageNumber | int | The number of page. |
| pageNumber | int | The number of the page. |

**Returns:**
java.lang.String - Filter string to search for cache entries that represents [Resource](../../com.groupdocs.viewer.results/resource) objects.
java.lang.String - the filter string to search for cache entries.
Loading

0 comments on commit 210649a

Please sign in to comment.