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
Constructor | Description |
---|---|
constructor(AbstractLowCodeSaveOptionsProvider) | Constructs from a parent object convertible to this. |
constructor() | Default Constructor. |
Properties
Property | Type | Description |
---|---|---|
pathHeader | string | Header part(before added content of sheet and split part) of file path. |
pathTail | string | Tailing part(after sequence numbers) of file path. It should include extension of file name. |
useSheetName | boolean | Whether builds the file path with sheet name instead of sheet index. Default value is false. |
sheetPrefix | string | Prefix for the index of worksheet. |
splitPartPrefix | string | Prefix for the index of split part. |
sheetIndexOffset | number | Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex). |
splitPartIndexOffset | number | Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex). |
buildPathWithSheetAlways | 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. |
buildPathWithSplitPartAlways | 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. |
saveOptionsTemplate | LowCodeSaveOptions | The template for creating instance of save options in GetSaveOptions(SplitPartInfo). |
Methods
Method | Description |
---|---|
getPathHeader() | @deprecated. Please use the ‘pathHeader’ property instead. Header part(before added content of sheet and split part) of file path. |
setPathHeader(string) | @deprecated. Please use the ‘pathHeader’ property instead. Header part(before added content of sheet and split part) of file path. |
getPathTail() | @deprecated. Please use the ‘pathTail’ property instead. Tailing part(after sequence numbers) of file path. It should include extension of file name. |
setPathTail(string) | @deprecated. Please use the ‘pathTail’ property instead. Tailing part(after sequence numbers) of file path. It should include extension of file name. |
getUseSheetName() | @deprecated. Please use the ‘useSheetName’ property instead. Whether builds the file path with sheet name instead of sheet index. Default value is false. |
setUseSheetName(boolean) | @deprecated. Please use the ‘useSheetName’ property instead. Whether builds the file path with sheet name instead of sheet index. Default value is false. |
getSheetPrefix() | @deprecated. Please use the ‘sheetPrefix’ property instead. Prefix for the index of worksheet. |
setSheetPrefix(string) | @deprecated. Please use the ‘sheetPrefix’ property instead. Prefix for the index of worksheet. |
getSplitPartPrefix() | @deprecated. Please use the ‘splitPartPrefix’ property instead. Prefix for the index of split part. |
setSplitPartPrefix(string) | @deprecated. Please use the ‘splitPartPrefix’ property instead. Prefix for the index of split part. |
getSheetIndexOffset() | @deprecated. Please use the ‘sheetIndexOffset’ property instead. Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex). |
setSheetIndexOffset(number) | @deprecated. Please use the ‘sheetIndexOffset’ property instead. Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex). |
getSplitPartIndexOffset() | @deprecated. Please use the ‘splitPartIndexOffset’ property instead. Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex). |
setSplitPartIndexOffset(number) | @deprecated. Please use the ‘splitPartIndexOffset’ property instead. Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex). |
getBuildPathWithSheetAlways() | @deprecated. Please use the ‘buildPathWithSheetAlways’ property instead. 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) | @deprecated. Please use the ‘buildPathWithSheetAlways’ property instead. 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() | @deprecated. Please use the ‘buildPathWithSplitPartAlways’ property instead. 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) | @deprecated. Please use the ‘buildPathWithSplitPartAlways’ property instead. 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() | @deprecated. Please use the ‘saveOptionsTemplate’ property instead. The template for creating instance of save options in GetSaveOptions(SplitPartInfo). |
setSaveOptionsTemplate(LowCodeSaveOptions) | @deprecated. Please use the ‘saveOptionsTemplate’ property instead. The template for creating instance of save options in GetSaveOptions(SplitPartInfo). |
isNull() | Checks whether the implementation object is null. |
getSaveOptions(SplitPartInfo) | Gets the save options from which to get the output settings for currently split part. |
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();
pathHeader
Header part(before added content of sheet and split part) of file path.
pathHeader : string;
pathTail
Tailing part(after sequence numbers) of file path. It should include extension of file name.
pathTail : string;
useSheetName
Whether builds the file path with sheet name instead of sheet index. Default value is false.
useSheetName : 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.
sheetPrefix
Prefix for the index of worksheet.
sheetPrefix : 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.
splitPartPrefix
Prefix for the index of split part.
splitPartPrefix : 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.
sheetIndexOffset
Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.SheetIndex).
sheetIndexOffset : number;
Remarks
Only takes effect when UseSheetName is false.
splitPartIndexOffset
Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex).
splitPartIndexOffset : number;
buildPathWithSheetAlways
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.
buildPathWithSheetAlways : boolean;
buildPathWithSplitPartAlways
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.
buildPathWithSplitPartAlways : boolean;
saveOptionsTemplate
The template for creating instance of save options in GetSaveOptions(SplitPartInfo).
saveOptionsTemplate : LowCodeSaveOptions;
Remarks
If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.
getPathHeader()
@deprecated. Please use the ‘pathHeader’ property instead. Header part(before added content of sheet and split part) of file path.
getPathHeader() : string;
setPathHeader(string)
@deprecated. Please use the ‘pathHeader’ property instead. 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()
@deprecated. Please use the ‘pathTail’ property instead. Tailing part(after sequence numbers) of file path. It should include extension of file name.
getPathTail() : string;
setPathTail(string)
@deprecated. Please use the ‘pathTail’ property instead. 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()
@deprecated. Please use the ‘useSheetName’ property instead. 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)
@deprecated. Please use the ‘useSheetName’ property instead. 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()
@deprecated. Please use the ‘sheetPrefix’ property instead. 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)
@deprecated. Please use the ‘sheetPrefix’ property instead. 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()
@deprecated. Please use the ‘splitPartPrefix’ property instead. 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)
@deprecated. Please use the ‘splitPartPrefix’ property instead. 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()
@deprecated. Please use the ‘sheetIndexOffset’ property instead. 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)
@deprecated. Please use the ‘sheetIndexOffset’ property instead. 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()
@deprecated. Please use the ‘splitPartIndexOffset’ property instead. Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.PartIndex).
getSplitPartIndexOffset() : number;
setSplitPartIndexOffset(number)
@deprecated. Please use the ‘splitPartIndexOffset’ property instead. 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()
@deprecated. Please use the ‘buildPathWithSheetAlways’ property instead. 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)
@deprecated. Please use the ‘buildPathWithSheetAlways’ property instead. 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()
@deprecated. Please use the ‘buildPathWithSplitPartAlways’ property instead. 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)
@deprecated. Please use the ‘buildPathWithSplitPartAlways’ property instead. 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()
@deprecated. Please use the ‘saveOptionsTemplate’ property instead. 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)
@deprecated. Please use the ‘saveOptionsTemplate’ property instead. 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.
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
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
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).