LowCodeSaveOptionsProviderOfAssembling
LowCodeSaveOptionsProviderOfAssembling class
Implementation to provide save options which save split parts to files and the path of resultant file are named as(it may contains directories): PathHeader+SheetPrefix+SheetIndex(or SheetName) +SplitPartPrefix+SplitPartIndex+PathTail.
class LowCodeSaveOptionsProviderOfAssembling extends AbstractLowCodeSaveOptionsProvider;
Constructors
Name | Description |
---|---|
constructor(AbstractLowCodeSaveOptionsProvider) | Constructs from a parent object convertible to this. |
constructor() | Default Constructor. |
Methods
Method | Description |
---|---|
getPathHeader() | Header part(before added content of sheet and split part) of file path. |
setPathHeader(string) | Header part(before added content of sheet and split part) of file path. |
getPathTail() | Tailing part(after sequence numbers) of file path. It should include extension of file name. |
setPathTail(string) | Tailing part(after sequence numbers) of file path. It should include extension of file name. |
getUseSheetName() | Whether builds the file path with sheet name instead of sheet index. Default value is false. |
setUseSheetName(boolean) | Whether builds the file path with sheet name instead of sheet index. Default value is false. |
getSheetPrefix() | Prefix for the index of worksheet. |
setSheetPrefix(string) | Prefix for the index of worksheet. |
getSplitPartPrefix() | Prefix for the index of split part. |
setSplitPartPrefix(string) | Prefix for the index of split part. |
getSheetIndexOffset() | Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex). |
setSheetIndexOffset(number) | Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex). |
getSplitPartIndexOffset() | Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex). |
setSplitPartIndexOffset(number) | Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex). |
getBuildPathWithSheetAlways() | Whether add sheet index or name to file path always. Default value is false, that is, when there is only one sheet, the sheet index(or name) and corresponding prefix will not be added to the file path. |
setBuildPathWithSheetAlways(boolean) | Whether add sheet index or name to file path always. Default value is false, that is, when there is only one sheet, the sheet index(or name) and corresponding prefix will not be added to the file path. |
getBuildPathWithSplitPartAlways() | Whether add split part index to file path always. Default value is false, that is, when there is only one split part, the split part index and corresponding prefix will not be added to the file path. |
setBuildPathWithSplitPartAlways(boolean) | Whether add split part index to file path always. Default value is false, that is, when there is only one split part, the split part index and corresponding prefix will not be added to the file path. |
getSaveOptionsTemplate() | The template for creating instance of save options in GetSaveOptions(SplitPartInfo). |
setSaveOptionsTemplate(LowCodeSaveOptions) | The template for creating instance of save options in GetSaveOptions(SplitPartInfo). |
getSaveOptions(SplitPartInfo) | Gets the save options from which to get the output settings for currently split part. |
isNull() | Checks whether the implementation object is null. |
finish(LowCodeSaveOptions) | Releases resources after processing currently split part. |
constructor(AbstractLowCodeSaveOptionsProvider)
Constructs from a parent object convertible to this.
constructor(obj: AbstractLowCodeSaveOptionsProvider);
Parameters:
Parameter | Type | Description |
---|---|---|
obj | AbstractLowCodeSaveOptionsProvider | The parent object. |
constructor()
Default Constructor.
constructor();
getPathHeader()
Header part(before added content of sheet and split part) of file path.
getPathHeader() : string;
setPathHeader(string)
Header part(before added content of sheet and split part) of file path.
setPathHeader(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getPathTail()
Tailing part(after sequence numbers) of file path. It should include extension of file name.
getPathTail() : string;
setPathTail(string)
Tailing part(after sequence numbers) of file path. It should include extension of file name.
setPathTail(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getUseSheetName()
Whether builds the file path with sheet name instead of sheet index. Default value is false.
getUseSheetName() : boolean;
Remarks
The sheet name will never be rebuilt automatically. So when set it to true, please make sure there is no special sheet name that can cause invalid file path or name.
setUseSheetName(boolean)
Whether builds the file path with sheet name instead of sheet index. Default value is false.
setUseSheetName(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
Remarks
The sheet name will never be rebuilt automatically. So when set it to true, please make sure there is no special sheet name that can cause invalid file path or name.
getSheetPrefix()
Prefix for the index of worksheet.
getSheetPrefix() : string;
Remarks
If there is only one worksheet and BuildPathWithSheetAlways is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.
setSheetPrefix(string)
Prefix for the index of worksheet.
setSheetPrefix(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
Remarks
If there is only one worksheet and BuildPathWithSheetAlways is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.
getSplitPartPrefix()
Prefix for the index of split part.
getSplitPartPrefix() : string;
Remarks
If there is only one split part and BuildPathWithSplitPartAlways is false, then this prefix and the split part index(0) will not be added to the resultant file path.
setSplitPartPrefix(string)
Prefix for the index of split part.
setSplitPartPrefix(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
Remarks
If there is only one split part and BuildPathWithSplitPartAlways is false, then this prefix and the split part index(0) will not be added to the resultant file path.
getSheetIndexOffset()
Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex).
getSheetIndexOffset() : number;
Remarks
Only takes effect when UseSheetName is false.
setSheetIndexOffset(number)
Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex).
setSheetIndexOffset(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
Remarks
Only takes effect when UseSheetName is false.
getSplitPartIndexOffset()
Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex).
getSplitPartIndexOffset() : number;
setSplitPartIndexOffset(number)
Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex).
setSplitPartIndexOffset(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getBuildPathWithSheetAlways()
Whether add sheet index or name to file path always. Default value is false, that is, when there is only one sheet, the sheet index(or name) and corresponding prefix will not be added to the file path.
getBuildPathWithSheetAlways() : boolean;
setBuildPathWithSheetAlways(boolean)
Whether add sheet index or name to file path always. Default value is false, that is, when there is only one sheet, the sheet index(or name) and corresponding prefix will not be added to the file path.
setBuildPathWithSheetAlways(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getBuildPathWithSplitPartAlways()
Whether add split part index to file path always. Default value is false, that is, when there is only one split part, the split part index and corresponding prefix will not be added to the file path.
getBuildPathWithSplitPartAlways() : boolean;
setBuildPathWithSplitPartAlways(boolean)
Whether add split part index to file path always. Default value is false, that is, when there is only one split part, the split part index and corresponding prefix will not be added to the file path.
setBuildPathWithSplitPartAlways(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getSaveOptionsTemplate()
The template for creating instance of save options in GetSaveOptions(SplitPartInfo).
getSaveOptionsTemplate() : LowCodeSaveOptions;
Returns
Remarks
If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.
setSaveOptionsTemplate(LowCodeSaveOptions)
The template for creating instance of save options in GetSaveOptions(SplitPartInfo).
setSaveOptionsTemplate(value: LowCodeSaveOptions) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | LowCodeSaveOptions | The value to set. |
Remarks
If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.
getSaveOptions(SplitPartInfo)
Gets the save options from which to get the output settings for currently split part.
getSaveOptions(part: SplitPartInfo) : LowCodeSaveOptions;
Parameters:
Parameter | Type | Description |
---|---|---|
part | SplitPartInfo |
Returns
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
finish(LowCodeSaveOptions)
Releases resources after processing currently split part.
finish(part: LowCodeSaveOptions) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
part | LowCodeSaveOptions | the save options used for currently split part. |
Remarks
By default this method just closes the stream specified by the LowCodeSaveOptions.OutputStream directly(if the save options specified a Stream as destination). User may overwrite this method to control how to release resources according to their requirement and the implementation of GetSaveOptions(SplitPartInfo).