Skip to content

Commit

Permalink
try to javadoc more unsupported methods
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914785 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pjfanning committed Dec 19, 2023
1 parent 53cfc2c commit c732418
Show file tree
Hide file tree
Showing 18 changed files with 106 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
import org.apache.poi.poifs.crypt.HashAlgorithm;
import org.apache.poi.poifs.crypt.dsig.facets.SignatureFacet;
import org.apache.poi.poifs.crypt.dsig.services.RelationshipTransformService;
import org.apache.poi.util.NotImplemented;
import org.apache.xml.security.Init;
import org.apache.xml.security.utils.XMLUtils;
import org.apache.xmlbeans.XmlOptions;
Expand Down Expand Up @@ -341,14 +342,19 @@ public SignaturePart next() {
return new SignaturePart(sigRelPart, SignatureInfo.this);
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@NotImplemented
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}



/**
* Helper method for adding informations before the signing.
* Normally {@link #confirmSignature()} is sufficient to be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ public boolean isNumeric() {
return (Number.class.isAssignableFrom(arrayComponentType));
}

/**
* @return the dataRange
* @throws UnsupportedOperationException if there is no Data Range Reference
*/
@Override
public String getDataRangeReference() {
if (dataRange == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
import org.apache.poi.util.Internal;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.LittleEndianConsts;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.Units;
import org.apache.xmlbeans.XmlException;
import org.openxmlformats.schemas.presentationml.x2006.main.CTNotesMasterIdList;
Expand Down Expand Up @@ -670,8 +671,14 @@ public XSLFTableStyles getTableStyles() {
return _tableStyles;
}

@SuppressWarnings("RedundantThrows")
/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
@NotImplemented
@SuppressWarnings("RedundantThrows")
public MasterSheet<XSLFShape, XSLFTextParagraph> createMasterSheet() throws IOException {
// TODO: implement!
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.poi.sl.usermodel.GraphicalFrame;
import org.apache.poi.sl.usermodel.ShapeType;
import org.apache.poi.util.Beta;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.Units;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlException;
Expand All @@ -60,6 +61,12 @@ public class XSLFGraphicFrame extends XSLFShape implements GraphicalFrame<XSLFSh
super(shape,sheet);
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@NotImplemented
public ShapeType getShapeType(){
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.poi.sl.usermodel.GroupShape;
import org.apache.poi.sl.usermodel.PictureData;
import org.apache.poi.util.Beta;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.Units;
import org.apache.xmlbeans.XmlObject;
import org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties;
Expand Down Expand Up @@ -415,7 +416,14 @@ public void clear() {
}
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@NotImplemented
@Override
@SuppressWarnings("RedundantThrows")
public void addShape(XSLFShape shape) {
throw new UnsupportedOperationException(
"Adding a shape from a different container is not supported -"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
import org.apache.poi.util.Beta;
import org.apache.poi.util.IOUtils;
import org.apache.poi.util.Internal;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.Units;
import org.apache.poi.xddf.usermodel.chart.XDDFChart;
import org.apache.xmlbeans.XmlCursor;
Expand Down Expand Up @@ -330,6 +331,12 @@ public Iterator<XSLFShape> iterator(){
return getShapes().iterator();
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@NotImplemented
@Override
public void addShape(XSLFShape shape) {
throw new UnsupportedOperationException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,19 @@ public XSLFSlide importContent(XSLFSheet src){
return this;
}

/**
* @return always returns false
*/
@Override
public boolean getFollowMasterBackground() {
return false;
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
@NotImplemented
public void setFollowMasterBackground(boolean follow) {
Expand All @@ -361,6 +369,11 @@ public boolean getFollowMasterColourScheme() {
return false;
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
@NotImplemented
public void setFollowMasterColourScheme(boolean follow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,12 @@ public Cell next() throws NoSuchElementException
{
return iter.next();
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
public void remove()
{
Expand Down Expand Up @@ -517,6 +523,13 @@ public Cell next() throws NoSuchElementException
throw new NoSuchElementException();
}
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@NotImplemented
@Override
public void remove()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2172,6 +2172,11 @@ public void setTabColor(int colorIndex){
pr.setTabColor(color);
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@NotImplemented
@Override
public void shiftColumns(int startColumn, int endColumn, int n){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,8 @@ public T next() throws NoSuchElementException {
* Unexpected behavior may occur if sheets are reordered after iterator
* has been created. Support for the remove method may be added in the future
* if someone can figure out a reliable implementation.
*
* @throws UnsupportedOperationException
*/
@Override
public void remove() throws IllegalStateException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,8 @@ public T next() throws NoSuchElementException {
* Unexpected behavior may occur if sheets are reordered after iterator
* has been created. Support for the remove method may be added in the future
* if someone can figure out a reliable implementation.
*
* @throws UnsupportedOperationException
*/
@Override
public void remove() throws IllegalStateException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ private EmfCommentData _next() {
}
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
public void remove() {
throw new UnsupportedOperationException("Remove not supported");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ private HemfRecord _next() {
return record;
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
public void remove() {
throw new UnsupportedOperationException("Remove not supported");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ private HemfPlusRecord _next() {
return record;
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
public void remove() {
throw new UnsupportedOperationException("Remove not supported");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ public Spliterator<HSLFShape> spliterator() {
return getShapes().spliterator();
}

/**
* This method is not yet supported.
*
* @throws UnsupportedOperationException this method is not yet supported
*/
@Override
public boolean removeShape(HSLFShape shape) {
// TODO: implement!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public Placeholder getPlaceholder() {
return placeholder;
}

/**
* @throws UnsupportedOperationException Only sub class(es) of HSLFPlaceholderDetails allow setting the placeholder
*/
@Override
public void setPlaceholder(Placeholder placeholder) {
throw new UnsupportedOperationException("Only sub class(es) of HSLFPlaceholderDetails allow setting the placeholder");
Expand All @@ -101,6 +104,9 @@ public PlaceholderSize getSize() {
return PlaceholderSize.full;
}

/**
* @throws UnsupportedOperationException Only sub class(es) of HSLFPlaceholderDetails allow setting the placeholder
*/
@Override
public void setSize(PlaceholderSize size) {
throw new UnsupportedOperationException("Only sub class(es) of HSLFPlaceholderDetails allow setting the size");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public byte[] getRawBytes() {
*
* @param start Local start position, in characters
* @param end Local end position, in characters
* @throws UnsupportedOperationException always throws UnsupportedOperationException
*/
@Override
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public boolean cantSplit()
return _tprops.getFCantSplit();
}

/**
* @throws UnsupportedOperationException not applicable for TableRow
*/
public BorderCode getBarBorder()
{
throw new UnsupportedOperationException( "not applicable for TableRow" );
Expand Down

0 comments on commit c732418

Please sign in to comment.