com.ptc.wgmecad
Class ECADContentItem

java.lang.Object
  extended bycom.ptc.wgmecad.ECADContentItem

public class ECADContentItem
extends Object

Created by IntelliJ IDEA. User: barky Date: Mar 3, 2003 Time: 5:49:49 PM To change this template use Options | File Templates.


Field Summary
private  Boolean defaultState
           
private  ValueEPMDoc epmDescribes
           
private  String epmDescribesNumber
           
private  String epmDescribesRevision
           
private  String epmDescribesView
           
private  ValueEPMDoc epmDoc
           
private  String fileGroup
           
private  File fileName
           
static int ITEM_KIND_BOARD_ZIP
           
static int ITEM_KIND_BRD_VIEWABLE
           
static int ITEM_KIND_DESIGN_ZIP
           
static int ITEM_KIND_GENERIC
           
static int ITEM_KIND_SCH_VIEWABLE
           
static int ITEM_KIND_SCHEMATIC_ZIP
           
private  int itemKind
           
private  Boolean lockedState
           
(package private) static org.apache.log4j.Logger logger
           
 
Constructor Summary
ECADContentItem(Boolean lockedState, Boolean defaultState, File fileName, ValueEPMDoc epmDoc, String fileGroup, ValueEPMDoc epmDescribes)
           
 
Method Summary
static ECADContentItem createGeneratedItem(int itemKind, File file)
          Creates a content item for a generated file like board or schematic zip.
 String getContentString()
           
 Boolean getDefaultState()
           
 String getDirectory()
           
 ECADContentStatus getECADContentStatus()
           
 ValueEPMDoc getEpmDescribes()
           
 String getEpmDescribesNumber()
           
 String getEpmDescribesRevision()
           
 String getEpmDescribesView()
           
 ValueEPMDoc getEpmDoc()
           
 String getFileGroupName()
           
 File getFileName()
           
 int getItemKind()
           
 Boolean getLockedState()
           
 boolean isContentDirectlyOnDoc()
           
 void setEPMDescribes(DesignAll design)
          Sets number, revision for a describes link in a filegroup Case: the default describes are for the assembly, board or schematic that the file group is being checking in with.
 void setEPMDescribes(String number, String revision, String view, String describes)
          Sets number, revision and view (future) for a describes link in a filegroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITEM_KIND_GENERIC

public static final int ITEM_KIND_GENERIC
See Also:
Constant Field Values

ITEM_KIND_SCHEMATIC_ZIP

public static final int ITEM_KIND_SCHEMATIC_ZIP
See Also:
Constant Field Values

ITEM_KIND_BOARD_ZIP

public static final int ITEM_KIND_BOARD_ZIP
See Also:
Constant Field Values

ITEM_KIND_DESIGN_ZIP

public static final int ITEM_KIND_DESIGN_ZIP
See Also:
Constant Field Values

ITEM_KIND_BRD_VIEWABLE

public static final int ITEM_KIND_BRD_VIEWABLE
See Also:
Constant Field Values

ITEM_KIND_SCH_VIEWABLE

public static final int ITEM_KIND_SCH_VIEWABLE
See Also:
Constant Field Values

lockedState

private Boolean lockedState

defaultState

private Boolean defaultState

fileGroup

private String fileGroup

fileName

private File fileName

epmDoc

private ValueEPMDoc epmDoc

epmDescribes

private ValueEPMDoc epmDescribes

itemKind

private int itemKind

logger

static org.apache.log4j.Logger logger

epmDescribesNumber

private String epmDescribesNumber

epmDescribesRevision

private String epmDescribesRevision

epmDescribesView

private String epmDescribesView
Constructor Detail

ECADContentItem

public ECADContentItem(Boolean lockedState,
                       Boolean defaultState,
                       File fileName,
                       ValueEPMDoc epmDoc,
                       String fileGroup,
                       ValueEPMDoc epmDescribes)
Method Detail

getLockedState

public Boolean getLockedState()

getDefaultState

public Boolean getDefaultState()

getFileName

public File getFileName()

getEpmDoc

public ValueEPMDoc getEpmDoc()

getFileGroupName

public String getFileGroupName()

getEpmDescribes

public ValueEPMDoc getEpmDescribes()

getEpmDescribesNumber

public String getEpmDescribesNumber()

getEpmDescribesView

public String getEpmDescribesView()

getEpmDescribesRevision

public String getEpmDescribesRevision()

setEPMDescribes

public void setEPMDescribes(DesignAll design)
Sets number, revision for a describes link in a filegroup Case: the default describes are for the assembly, board or schematic that the file group is being checking in with.

Parameters:
design -
See Also:
setEPMDscribes(String,String,String,String)

setEPMDescribes

public void setEPMDescribes(String number,
                            String revision,
                            String view,
                            String describes)
Sets number, revision and view (future) for a describes link in a filegroup. This supports the future case where we might have a picker that allows the selection of any item.

Parameters:
number -
revision -
view -
describes -

isContentDirectlyOnDoc

public boolean isContentDirectlyOnDoc()

getDirectory

public String getDirectory()
                    throws BadEPMDocException
Throws:
BadEPMDocException

getContentString

public String getContentString()
                        throws BadEPMDocException
Throws:
BadEPMDocException

getECADContentStatus

public ECADContentStatus getECADContentStatus()

createGeneratedItem

public static ECADContentItem createGeneratedItem(int itemKind,
                                                  File file)
                                           throws InvalidArgumentException,
                                                  UnexpectedArgumentException
Creates a content item for a generated file like board or schematic zip.
Sets:
  • the item's type to corresponding itemKind
  • item's doc to board or schematic doc (depending on itemKind)
  • item's "describes" doc and filegroup to empty values.

    If itemKind is not within generated kinds range, an UnexpectedArgumentException is thrown

    Parameters:
    itemKind - Item's kind
    file - File to go with item
    Returns:
    ECADContentItem
    Throws:
    InvalidArgumentException
    UnexpectedArgumentException

  • getItemKind

    public int getItemKind()