LowCodeSaveOptionsProviderOfPlaceHolders

Inheritance: java.lang.Object, com.aspose.cells.AbstractLowCodeSaveOptionsProvider

public class LowCodeSaveOptionsProviderOfPlaceHolders extends AbstractLowCodeSaveOptionsProvider

Implementation to provide save options which save split parts to files and the path of resultant file are defined with placeholders.

Constructors

ConstructorDescription
LowCodeSaveOptionsProviderOfPlaceHolders(String pathTemplate)Instantiates an instance to provide save options according to specified templates.

Methods

MethodDescription
equals(Object arg0)
finish(LowCodeSaveOptions part)Releases resources after processing currently split part.
getBuildPathWithSheetAlways()Whether add sheet index or name to file path always.
getBuildPathWithSplitPartAlways()Whether add split part index to file path always.
getClass()
getSaveOptions(SplitPartInfo part)Gets the save options from which to get the output settings for currently split part.
getSaveOptionsTemplate()The template for creating instance of save options in AbstractLowCodeSaveOptionsProvider.getSaveOptions(SplitPartInfo).
getSheetIndexOffset()Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.getSheetIndex()).
getSheetIndexPrefix()Prefix for the index of worksheet.
getSheetNamePrefix()Prefix for the index of worksheet.
getSplitPartIndexOffset()Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.getPartIndex()).
getSplitPartPrefix()Prefix for the index of split part.
hashCode()
notify()
notifyAll()
setBuildPathWithSheetAlways(boolean value)Whether add sheet index or name to file path always.
setBuildPathWithSplitPartAlways(boolean value)Whether add split part index to file path always.
setSaveOptionsTemplate(LowCodeSaveOptions value)The template for creating instance of save options in AbstractLowCodeSaveOptionsProvider.getSaveOptions(SplitPartInfo).
setSheetIndexOffset(int value)Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.getSheetIndex()).
setSheetIndexPrefix(String value)Prefix for the index of worksheet.
setSheetNamePrefix(String value)Prefix for the index of worksheet.
setSplitPartIndexOffset(int value)Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.getPartIndex()).
setSplitPartPrefix(String value)Prefix for the index of split part.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

LowCodeSaveOptionsProviderOfPlaceHolders(String pathTemplate)

public LowCodeSaveOptionsProviderOfPlaceHolders(String pathTemplate)

Instantiates an instance to provide save options according to specified templates.

Remarks

The supported placeholders in file path template:

  • ${SheetIndex}: will be replaced by the sheet index of the split part
  • ${SheetName}: will be replaced by the sheet name of the split part
  • ${SplitPartIndex}: will be replaced by the index of the split part
  • ${SheetIndexPrefix}: will be replaced by
  • ${SheetNamePrefix}: will be replaced by
  • ${SplitPartPrefix}: will be replaced by

Parameters:

ParameterTypeDescription
pathTemplatejava.lang.StringThe template of the resultant file path.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

finish(LowCodeSaveOptions part)

public void finish(LowCodeSaveOptions part)

Releases resources after processing currently split part.

Remarks

By default this method just closes the stream specified by the LowCodeSaveOptions.getOutputStream() 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).

Parameters:

ParameterTypeDescription
partLowCodeSaveOptionsthe save options used for currently split part.

getBuildPathWithSheetAlways()

public boolean 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 and name and corresponding prefix(getSheetNamePrefix()) will not be added to the file path.

Returns: boolean

getBuildPathWithSplitPartAlways()

public boolean 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(LowCodeSaveOptionsProviderOfAssembling.getSplitPartPrefix()) will not be added to the file path.

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getSaveOptions(SplitPartInfo part)

public LowCodeSaveOptions getSaveOptions(SplitPartInfo part)

Gets the save options from which to get the output settings for currently split part.

Parameters:

ParameterTypeDescription
partSplitPartInfo

Returns: LowCodeSaveOptions

getSaveOptionsTemplate()

public LowCodeSaveOptions getSaveOptionsTemplate()

The template for creating instance of save options in AbstractLowCodeSaveOptionsProvider.getSaveOptions(SplitPartInfo).

Remarks

If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.

Returns: LowCodeSaveOptions

getSheetIndexOffset()

public int getSheetIndexOffset()

Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.getSheetIndex()).

Returns: int

getSheetIndexPrefix()

public String getSheetIndexPrefix()

Prefix for the index of worksheet.

Remarks

If there is only one worksheet and LowCodeSaveOptionsProviderOfAssembling.getBuildPathWithSheetAlways() is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

Returns: java.lang.String

getSheetNamePrefix()

public String getSheetNamePrefix()

Prefix for the index of worksheet.

Remarks

If there is only one worksheet and LowCodeSaveOptionsProviderOfAssembling.getBuildPathWithSheetAlways() is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

Returns: java.lang.String

getSplitPartIndexOffset()

public int getSplitPartIndexOffset()

Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.getPartIndex()).

Returns: int

getSplitPartPrefix()

public String getSplitPartPrefix()

Prefix for the index of split part.

Remarks

If there is only one split part and LowCodeSaveOptionsProviderOfAssembling.getBuildPathWithSplitPartAlways() is false, then this prefix and the split part index(0) will not be added to the resultant file path.

Returns: java.lang.String

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setBuildPathWithSheetAlways(boolean value)

public void setBuildPathWithSheetAlways(boolean value)

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 and name and corresponding prefix(getSheetNamePrefix()) will not be added to the file path.

Parameters:

ParameterTypeDescription
valueboolean

setBuildPathWithSplitPartAlways(boolean value)

public void setBuildPathWithSplitPartAlways(boolean value)

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(LowCodeSaveOptionsProviderOfAssembling.getSplitPartPrefix()) will not be added to the file path.

Parameters:

ParameterTypeDescription
valueboolean

setSaveOptionsTemplate(LowCodeSaveOptions value)

public void setSaveOptionsTemplate(LowCodeSaveOptions value)

The template for creating instance of save options in AbstractLowCodeSaveOptionsProvider.getSaveOptions(SplitPartInfo).

Remarks

If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.

Parameters:

ParameterTypeDescription
valueLowCodeSaveOptions

setSheetIndexOffset(int value)

public void setSheetIndexOffset(int value)

Offset of sheet’s index between what used in file path and its actual value(SplitPartInfo.getSheetIndex()).

Parameters:

ParameterTypeDescription
valueint

setSheetIndexPrefix(String value)

public void setSheetIndexPrefix(String value)

Prefix for the index of worksheet.

Remarks

If there is only one worksheet and LowCodeSaveOptionsProviderOfAssembling.getBuildPathWithSheetAlways() is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setSheetNamePrefix(String value)

public void setSheetNamePrefix(String value)

Prefix for the index of worksheet.

Remarks

If there is only one worksheet and LowCodeSaveOptionsProviderOfAssembling.getBuildPathWithSheetAlways() is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setSplitPartIndexOffset(int value)

public void setSplitPartIndexOffset(int value)

Offset of split part’s index between what used in file path and its actual value(SplitPartInfo.getPartIndex()).

Parameters:

ParameterTypeDescription
valueint

setSplitPartPrefix(String value)

public void setSplitPartPrefix(String value)

Prefix for the index of split part.

Remarks

If there is only one split part and LowCodeSaveOptionsProviderOfAssembling.getBuildPathWithSplitPartAlways() is false, then this prefix and the split part index(0) will not be added to the resultant file path.

Parameters:

ParameterTypeDescription
valuejava.lang.String

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int