wt.part
Class StandardLineNumberService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.part.StandardLineNumberService
All Implemented Interfaces:
LineNumberService, Manager, NetFactor, Serializable

public class StandardLineNumberService
extends StandardManager
implements LineNumberService, Serializable

Use the newStandardLineNumberService static factory method(s), not the StandardLineNumberService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardLineNumberService()
           
 
Method Summary
 Hashtable findAllPublishedLineNumbers(WTPartMaster partMaster, View view)
          Returns a hash table of PublishedLineNumber objects associated with the given part number (i.e., WTPartMaster) in the given view.
private  QueryResult findPublishedLineNumber(LineNumber number, WTPartMaster part, View view)
           
 QueryResult[] getBomDifferences(WTPart currentPart, WTPart previousPart)
          Deprecated.  
 String getConceptualClassname()
          Deprecated.  
 LineNumber getLatestLineNumber(WTPart part)
          Returns the largest line number assigned to the part.
 boolean hasLinksWithoutLineNumbers(WTPart assembly)
          Returns true if any of the usage links for the given assembly do not have line numbers..
 boolean isLineNumberPublished(LineNumber number, WTPartMaster part, View view)
          Returns true if the line number associated with the given part number (i.e., WTPartMaster) in the given view is published.
 boolean isLineNumberPublished(WTPartUsageLink usageLink)
          Returns true if the line number associated with the given part usage link has been published.
static StandardLineNumberService newStandardLineNumberService()
          Default factory for the class.
 void publishAllLineNumbers(WTPart part)
          Publish all the line numbers associated with each of the usage links for the given part assembly.
 void publishLineNumber(LineNumber number, WTPartMaster part, View view)
          Publishes the line number associated with the given part number (i.e., WTPartMaster) in the given view.
 void publishLineNumber(WTPartUsageLink usageLink)
          Publishes the line number associated with the given part usage link.
 void unpublishLineNumber(LineNumber number, WTPartMaster part, View view)
          Unpublishes the line number associated with the given part number (i.e., WTPartMaster) in the given view.
 void unpublishLineNumber(WTPartUsageLink usageLink)
          Unpublishes the line number associated with the given part usage link and its view.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, performStartupProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

StandardLineNumberService

public StandardLineNumberService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

newStandardLineNumberService

public static StandardLineNumberService newStandardLineNumberService()
                                                              throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardLineNumberService
Throws:
WTException

getLatestLineNumber

public LineNumber getLatestLineNumber(WTPart part)
                               throws WTException
Returns the largest line number assigned to the part. The method takes at the largest line number assigned to the given part plus the largest line number published for the given part and returns the larger one to the caller.

Supported API: true

Specified by:
getLatestLineNumber in interface LineNumberService
Parameters:
part -
Returns:
LineNumber
Throws:
WTException

getBomDifferences

public QueryResult[] getBomDifferences(WTPart currentPart,
                                       WTPart previousPart)
                                throws WTException
Deprecated.  

This method has been deprecated. The proper method to call is retrieveBOMDifference of the WTPartService.

Compares the bill of material of the current WTPart with a previous WTPart. This method only considers the usages links with assigned line numbers.

The element 0 of the returned array is a QueryResult that includes includes the WTPartUsageLinks to identify the line numbered parts that are used by the current WTPart but not by the previous WTPart.

The element 1 of the returned array is a QueryResult that includes includes the WTPartUsageLinks to identify the line numbered parts that are used by the previous WTPart but not by the current WTPart.

The element 2 of the returned array is a QueryResult that includes includes the WTPartUsageLinks to identify the line numbered items that were used in both the current and the previous WTParts but have different usage information (e.g., quantity.)

If one considers that previous WTPart and current WTPart are two versions of the same master in chronological order, the interpretation is that the first QueryResult identifies the parts (with their line numbers) that have been added; the second QueryResult identifies the parts (with their line numbers) that have been deleted; and the third QueryResult identifies the parts (with their line numbers) that have had quantity changes. A replace of one child part for another (at the same line number) results having entries in both the first and second QueryResults returned by the method (replace = delete + add).

Supported API: false

Specified by:
getBomDifferences in interface LineNumberService
Parameters:
currentPart -
previousPart -
Returns:
QueryResult []
Throws:
WTException

publishLineNumber

public void publishLineNumber(WTPartUsageLink usageLink)
                       throws WTException
Publishes the line number associated with the given part usage link. The line number must be unique given the parent part of the usage link and the view that it is in. This method throws a WTException if the uniqueness constraint is violated.

Supported API: true

Specified by:
publishLineNumber in interface LineNumberService
Parameters:
usageLink -
Throws:
WTException

publishLineNumber

public void publishLineNumber(LineNumber number,
                              WTPartMaster part,
                              View view)
                       throws WTException
Publishes the line number associated with the given part number (i.e., WTPartMaster) in the given view. The line number must be unique for the given part and view. This method throws a WTException if the uniqueness constraint is violated.

Supported API: true

Specified by:
publishLineNumber in interface LineNumberService
Parameters:
number -
part -
view -
Throws:
WTException

publishAllLineNumbers

public void publishAllLineNumbers(WTPart part)
                           throws WTException
Publish all the line numbers associated with each of the usage links for the given part assembly. A WTException is thrown if a uniqueness constraint is violated.

Supported API: true

Specified by:
publishAllLineNumbers in interface LineNumberService
Parameters:
part -
Throws:
WTException

isLineNumberPublished

public boolean isLineNumberPublished(WTPartUsageLink usageLink)
                              throws WTException
Returns true if the line number associated with the given part usage link has been published.

Supported API: true

Specified by:
isLineNumberPublished in interface LineNumberService
Parameters:
usageLink -
Returns:
boolean
Throws:
WTException

isLineNumberPublished

public boolean isLineNumberPublished(LineNumber number,
                                     WTPartMaster part,
                                     View view)
                              throws WTException
Returns true if the line number associated with the given part number (i.e., WTPartMaster) in the given view is published.

Supported API: true

Specified by:
isLineNumberPublished in interface LineNumberService
Parameters:
number -
part -
view -
Returns:
boolean
Throws:
WTException

unpublishLineNumber

public void unpublishLineNumber(WTPartUsageLink usageLink)
                         throws WTException
Unpublishes the line number associated with the given part usage link and its view.

Supported API: true

Specified by:
unpublishLineNumber in interface LineNumberService
Parameters:
usageLink -
Throws:
WTException

unpublishLineNumber

public void unpublishLineNumber(LineNumber number,
                                WTPartMaster part,
                                View view)
                         throws WTException
Unpublishes the line number associated with the given part number (i.e., WTPartMaster) in the given view. The line number must be unique for the given part and view. This method throws a WTException if the uniqueness constraint is violated.

Supported API: true

Specified by:
unpublishLineNumber in interface LineNumberService
Parameters:
number -
part -
view -
Throws:
WTException

hasLinksWithoutLineNumbers

public boolean hasLinksWithoutLineNumbers(WTPart assembly)
                                   throws WTException
Returns true if any of the usage links for the given assembly do not have line numbers..

Supported API: true

Specified by:
hasLinksWithoutLineNumbers in interface LineNumberService
Parameters:
assembly -
Returns:
boolean
Throws:
WTException

findAllPublishedLineNumbers

public Hashtable findAllPublishedLineNumbers(WTPartMaster partMaster,
                                             View view)
                                      throws WTException
Returns a hash table of PublishedLineNumber objects associated with the given part number (i.e., WTPartMaster) in the given view.

If ht is the hash table returned by this method, then the calling code can determine whether a given line number has been published by invoking the following method: ht.get(a_LineNumber). If the method returns a null, the specified line number is not published.

Supported API: true

Specified by:
findAllPublishedLineNumbers in interface LineNumberService
Parameters:
partMaster -
view -
Returns:
Hashtable
Throws:
WTException

findPublishedLineNumber

private QueryResult findPublishedLineNumber(LineNumber number,
                                            WTPartMaster part,
                                            View view)
                                     throws WTException
Throws:
WTException