Package org.openntf.domino.nsfdata.structs.cd

Source Code of org.openntf.domino.nsfdata.structs.cd.CDPABHIDE

package org.openntf.domino.nsfdata.structs.cd;

import java.nio.ByteBuffer;

import org.openntf.domino.nsfdata.NSFCompiledFormula;
import org.openntf.domino.nsfdata.structs.SIG;
import org.openntf.domino.nsfdata.structs.WSIG;

/**
* This record contains the "Hide When" formula for a paragraph attributes block. (editods.h)
*
* @since Lotus Notes 4.0
*
*/
public class CDPABHIDE extends CDRecord {

  static {
    addFixed("PABID", Short.class);
    addFixedArray("Reserved", Byte.class, 8);

    addVariableData("Formula", "getFormulaLength");
  }

  public static final int SIZE = getFixedStructSize();

  public CDPABHIDE(final CDSignature cdSig) {
    super(new WSIG(cdSig, cdSig.getSize() + SIZE), ByteBuffer.wrap(new byte[SIZE]));
  }

  public CDPABHIDE(final SIG signature, final ByteBuffer data) {
    super(signature, data);
  }

  public short getPabId() {
    return (Short) getStructElement("PABID");
  }

  public byte[] getReserved() {
    return (byte[]) getStructElement("Reserved");
  }

  public int getFormulaLength() {
    return (int) (getDataLength() - 10);
  }

  public NSFCompiledFormula getFormula() {
    return new NSFCompiledFormula((byte[]) getStructElement("Formula"));
  }
}
TOP

Related Classes of org.openntf.domino.nsfdata.structs.cd.CDPABHIDE

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.