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(java.lang.String author) |
XSSFComment |
findCellComment(java.lang.String cellRef) |
java.lang.String |
getAuthor(long authorId) |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment |
getCTComment(java.lang.String cellRef) |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComments |
getCTComments() |
int |
getNumberOfAuthors() |
int |
getNumberOfComments() |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment |
newComment()
Deprecated.
Use
newComment(String) instead to explicitly set the cell reference to create for |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment |
newComment(java.lang.String ref) |
void |
readFrom(java.io.InputStream is) |
void |
referenceUpdated(java.lang.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(java.lang.String cellRef) |
void |
writeTo(java.io.OutputStream out) |
addRelation, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelationById, getRelationId, getRelations, getTargetPart, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, toString
public CommentsTable()
public CommentsTable(PackagePart part, PackageRelationship rel) throws java.io.IOException
java.io.IOException
public void readFrom(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void writeTo(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
protected void commit() throws java.io.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
java.io.IOException
public void referenceUpdated(java.lang.String oldReference, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment comment)
public int getNumberOfComments()
public int getNumberOfAuthors()
public java.lang.String getAuthor(long authorId)
public int findAuthor(java.lang.String author)
public XSSFComment findCellComment(java.lang.String cellRef)
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment getCTComment(java.lang.String cellRef)
@Deprecated public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment newComment()
newComment(String)
instead to explicitly set the cell reference to create forpublic org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment newComment(java.lang.String ref)
public boolean removeComment(java.lang.String cellRef)
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComments getCTComments()
Copyright 2015 The Apache Software Foundation or its licensors, as applicable.