|
URL for direct access to the JobArchive result list (getJobArchiveResultListUrlBuilder) |
Scroll Prev Top Next More |
This function allows you to generate the URL for direct access by third party applications to a specific JobArchive result list.
By default, the current revision of a document is always determined.
Parameter |
Type |
Description |
|---|---|---|
$resultListId |
int |
Id of the JobArchive result list |
This function returns an object of the JobArchive_ResultListUrlBuilder type. This object offers the following methods to set the URL for the direct access to the result list and to return the URL:
Method setUsername
Sets the name of the JobRouter user the URL is generated for. This call is required.
Parameter |
Type |
Description |
|---|---|---|
$username |
string |
Name of the user the URL has to be valid for |
Method setValidFrom
Sets the date from which on the URL is to be valid. The call is optional (the URL will be valid instantly).
Parameter |
Type |
Description |
|---|---|---|
$validFrom |
DateTime | string |
Date from which on the URL is to be valid. |
Method setValidUntil
Sets the date until which the URL is to be valid. The call is optional (the URL will be valid indefinite).
Parameter |
Type |
Description |
|---|---|---|
$validUntil |
DateTime | string |
Date until which the URL is to be valid. |
Method addCompareFilter
Adds a comparison filter to an index field. The call is optional.
Parameter |
Type |
Description |
|---|---|---|
$fieldName |
string |
Name of the index field that is to be filtered |
$fieldValue |
string |
Value used for the filter |
$operator |
string |
Operator (<, <=, >, >=) |
Method addExactFilter
Adds an exact filter to an index field. The call is optional.
Parameter |
Type |
Description |
|---|---|---|
$fieldName |
string |
Name of the index field that is to be filtered |
$fieldValue |
string |
Value used for the filter |
Method addLikeFilter
Adds a like filter to an index field. The call is optional.
Parameter |
Type |
Description |
|---|---|---|
$fieldName |
string |
Name of the index field that is to be filtered |
$fieldValue |
string |
Value used for the filter |
Method addRangeFilter
Adds a range filter to an index field. The call is optional.
Parameter |
Type |
Description |
|---|---|---|
$fieldName |
string |
Name of the index field that is to be filtered |
$fromValue |
string |
Start value used for the filter |
$fromOperator |
string |
Operator (>, <=) |
$toValue |
string |
End value used for the filter |
$toOperator |
string |
Operator (>, >=) |
Method setDownloadAllowed
Activates or deactivates the possibility to download documents from the result list. The call is optional. The option to download is deactivated by default.
Parameter |
Type |
Description |
|---|---|---|
$downloadAllowed |
bool |
true = Allow download |
Methode setUseExactRevision
Enables or disabled the determination of the exact revision of a document. The default value here is false.
If this flag is activated, the getUrl method returns the link for the exact document revision, otherwise a link with the current document revision is generated.
Parameter |
Type |
Description |
|---|---|---|
$useExactRevision |
bool |
true = Exact revision for determining the document activated |
Method setViewer
Sets the viewer that is used to display documents from the result list. The call is optional. The global default viewer is used by default.
Parameter |
Type |
Description |
|---|---|---|
$viewer |
string |
default = Global default viewer download = Download file |
Method setViewMode:
Sets the mode that is used to display documents from the result list. The call is optional. The "auto" view mode is used by default.
Parameter |
Type |
Description |
|---|---|---|
$viewMode |
string |
auto = displays the result list for more than one hit, otherwise the document is opened in the viewer viewer = Open viewer |
Method getUrl
Returns the URL used for the direct access to the result list.
Example:
…
$urlBuilder->setUsername('jdoe');
$urlBuilder->setValidFrom(new DateTime('2013-10-01'));
$urlBuilder->setValidUntil(new DateTime('2013-12-31'));
$urlBuilder->addExactFilter('customernumber', '005983');
$urlBuilder->setUseExactRevision(true);
$urlBuilder->addCompareFilter('invoicedate', '2013-01-01', '>');
$urlBuilder->addRangeFilter('invoiceamount', 1000, '>=', 10000, '<=');
$url = $urlBuilder->getUrl();
…