public class CommentsTable extends POIXMLDocumentPart
DEFAULT_XML_OPTIONS
Constructor and Description |
---|
CommentsTable() |
CommentsTable(PackagePart part,
PackageRelationship rel) |
Modifier and Type | Method and Description |
---|---|
protected void |
commit()
Save the content in the underlying package part.
|
int |
findAuthor(String author) |
XSSFComment |
findCellComment(String cellRef) |
String |
getAuthor(long authorId) |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment |
getCTComment(String cellRef) |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComments |
getCTComments() |
int |
getNumberOfAuthors() |
int |
getNumberOfComments() |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment |
newComment() |
void |
readFrom(InputStream is) |
void |
referenceUpdated(String oldReference,
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment comment)
Called after the reference is updated, so that
we can reflect that in our cache
|
boolean |
removeComment(String cellRef) |
void |
writeTo(OutputStream out) |
addRelation, clearMemoryPackagePart, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationCounter, getRelationId, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, read, rebase, removeRelation, removeRelation, toString
public CommentsTable()
public CommentsTable(PackagePart part, PackageRelationship rel) throws IOException
IOException
public void readFrom(InputStream is) throws IOException
IOException
public void writeTo(OutputStream out) throws IOException
IOException
protected void commit() throws IOException
POIXMLDocumentPart
protected void commit() throws IOException {
PackagePart part = getPackagePart();
OutputStream out = part.getOutputStream();
XmlObject bean = getXmlBean(); //the "model" which holds changes in memory
bean.save(out, DEFAULT_XML_OPTIONS);
out.close();
}
commit
in class POIXMLDocumentPart
IOException
public void referenceUpdated(String oldReference, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment comment)
public int getNumberOfComments()
public int getNumberOfAuthors()
public String getAuthor(long authorId)
public int findAuthor(String author)
public XSSFComment findCellComment(String cellRef)
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment getCTComment(String cellRef)
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment newComment()
public boolean removeComment(String cellRef)
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComments getCTComments()
Copyright © 2020. All rights reserved.