站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

StatusFormat (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.caching
Class StatusFormat

java.lang.Object
  extended byorg.netbeans.modules.vcscore.caching.StatusFormat

public final class StatusFormat
extends Object

Defines status format as communicated from REFRESH command and supports disk cache entries formatting. TODO move to more perspective package, probably commands or turbo


Field Summary
static String ANNOTATION_PATTERN_ATTR
          The annotation pattern of a file additional attribute.
static String ANNOTATION_PATTERN_DATE
          The annotation pattern of a file date.
static String ANNOTATION_PATTERN_FILE_NAME
          The annotation pattern of a file name.
static String ANNOTATION_PATTERN_LOCKER
          The annotation pattern of a file locker.
static String ANNOTATION_PATTERN_REVISION
          The annotation pattern of a file revision.
static String ANNOTATION_PATTERN_SIZE
          The annotation pattern of a file size.
static String ANNOTATION_PATTERN_STATUS
          The annotation pattern of a file status.
static String ANNOTATION_PATTERN_STICKY
          The annotation pattern of a file sticky info.
static String ANNOTATION_PATTERN_TIME
          The annotation pattern of a file time.
static String DEFAULT_ANNOTATION_PATTERN
           
static String DEFAULT_MULTI_FILES_ANNOTATION_DELIMETER
           
static int[] DEFAULT_MULTI_FILES_ANNOTATION_TYPES
           
static int ELEMENT_INDEX_ATTR
          The index of file additional attribute in the cache.
static int ELEMENT_INDEX_DATE
          The index of file date in the cache.
static int ELEMENT_INDEX_FILE_NAME
          The index of file name in the cache.
static int ELEMENT_INDEX_LOCKER
          The index of file locker in the cache.
static int ELEMENT_INDEX_REVISION
          The index of file revision in the cache.
static int ELEMENT_INDEX_SIZE
          The index of file size in the cache.
static int ELEMENT_INDEX_STATUS
          The index of file status in the cache.
static int ELEMENT_INDEX_STICKY
          The index of file sticky information in the cache (i.e.
static int ELEMENT_INDEX_TIME
          The index of file time in the cache.
static int MULTI_FILES_ANNOTATION_EMPTY
          When the attributes of the set of files differ, do not show them.
static int MULTI_FILES_ANNOTATION_LIST
          When the attributes of the set of files differ, show them as a list.
static int MULTI_FILES_ANNOTATION_NOT_SYNCH_ATTR
          When the attributes of the set of files differ, show a "Not In Synch" status instead.
static int NUM_ELEMENTS
          The number of file attributes in the cache.
 
Constructor Summary
StatusFormat()
           
 
Method Summary
static String[] getElementsFromLine(String line)
          Decodes raw data from string encoded by getLineFromElements(String[]).
static String getFileName(String[] elements)
          Extract the file name from the array of elements.
static String getHtmlStatusAnnotation(String name, Collection files, String pattern, int annotationStyle, Map possibleFileStatusInfoMap, int[] multiFilesAnnotationTypes)
          Get the annotation line in a HTML format for a file.
static String getHtmlStatusAnnotation(String name, FileObject fo, String annotationPattern, int annotationStyle, Map possibleFileStatusInfoMap)
          Get the annotation line in a HTML format for a file.
static String getHtmlStatusAnnotation(String name, String fullName, String annotationPattern, FileStatusProvider statusProvider, Hashtable additionalVars)
          Get the annotation line in a HTML format for a file.
static String getLineFromElements(String[] elements)
          Encodes raw data to string decodable by getElementsFromLine(String).
static String getStatusAnnotation(String name, Collection files, String pattern, int annotationStyle, Map possibleFileStatusInfoMap, int[] multiFilesAnnotationTypes)
          Get the annotation line for a list of files.
static String getStatusAnnotation(String name, FileObject fo, String annotationPattern, int annotationStyle, Map possibleFileStatusInfoMap)
          Get the annotation line for a file, it takes last known status from memory and if unknown it schedules background fetching (pretty complicated contract).
static String getStatusAnnotation(String name, FileObject fileObject, String pattern, int annotationStyle, Map extraVars, Map possibleFileStatusInfoMap)
          Get the annotation line for a file, it takes last known status from memory and if unknown it schedules background fetching (pretty complicated contract).
static boolean isValidAnnotationPattern(String pattern)
          Verifies user entered pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_INDEX_FILE_NAME

public static final int ELEMENT_INDEX_FILE_NAME
The index of file name in the cache.

See Also:
Constant Field Values

ELEMENT_INDEX_STATUS

public static final int ELEMENT_INDEX_STATUS
The index of file status in the cache.

See Also:
Constant Field Values

ELEMENT_INDEX_LOCKER

public static final int ELEMENT_INDEX_LOCKER
The index of file locker in the cache.

See Also:
Constant Field Values

ELEMENT_INDEX_REVISION

public static final int ELEMENT_INDEX_REVISION
The index of file revision in the cache.

See Also:
Constant Field Values

ELEMENT_INDEX_STICKY

public static final int ELEMENT_INDEX_STICKY
The index of file sticky information in the cache (i.e. the current branch)

See Also:
Constant Field Values

ELEMENT_INDEX_ATTR

public static final int ELEMENT_INDEX_ATTR
The index of file additional attribute in the cache.

See Also:
Constant Field Values

ELEMENT_INDEX_SIZE

public static final int ELEMENT_INDEX_SIZE
The index of file size in the cache.

See Also:
Constant Field Values

ELEMENT_INDEX_DATE

public static final int ELEMENT_INDEX_DATE
The index of file date in the cache.

See Also:
Constant Field Values

ELEMENT_INDEX_TIME

public static final int ELEMENT_INDEX_TIME
The index of file time in the cache.

See Also:
Constant Field Values

NUM_ELEMENTS

public static final int NUM_ELEMENTS
The number of file attributes in the cache.

See Also:
Constant Field Values

ANNOTATION_PATTERN_FILE_NAME

public static final String ANNOTATION_PATTERN_FILE_NAME
The annotation pattern of a file name.

See Also:
Constant Field Values

ANNOTATION_PATTERN_STATUS

public static final String ANNOTATION_PATTERN_STATUS
The annotation pattern of a file status.

See Also:
Constant Field Values

ANNOTATION_PATTERN_LOCKER

public static final String ANNOTATION_PATTERN_LOCKER
The annotation pattern of a file locker.

See Also:
Constant Field Values

ANNOTATION_PATTERN_REVISION

public static final String ANNOTATION_PATTERN_REVISION
The annotation pattern of a file revision.

See Also:
Constant Field Values

ANNOTATION_PATTERN_STICKY

public static final String ANNOTATION_PATTERN_STICKY
The annotation pattern of a file sticky info.

See Also:
Constant Field Values

ANNOTATION_PATTERN_ATTR

public static final String ANNOTATION_PATTERN_ATTR
The annotation pattern of a file additional attribute.

See Also:
Constant Field Values

ANNOTATION_PATTERN_SIZE

public static final String ANNOTATION_PATTERN_SIZE
The annotation pattern of a file size.

See Also:
Constant Field Values

ANNOTATION_PATTERN_DATE

public static final String ANNOTATION_PATTERN_DATE
The annotation pattern of a file date.

See Also:
Constant Field Values

ANNOTATION_PATTERN_TIME

public static final String ANNOTATION_PATTERN_TIME
The annotation pattern of a file time.

See Also:
Constant Field Values

MULTI_FILES_ANNOTATION_EMPTY

public static final int MULTI_FILES_ANNOTATION_EMPTY
When the attributes of the set of files differ, do not show them.

See Also:
Constant Field Values

MULTI_FILES_ANNOTATION_LIST

public static final int MULTI_FILES_ANNOTATION_LIST
When the attributes of the set of files differ, show them as a list.

See Also:
Constant Field Values

MULTI_FILES_ANNOTATION_NOT_SYNCH_ATTR

public static final int MULTI_FILES_ANNOTATION_NOT_SYNCH_ATTR
When the attributes of the set of files differ, show a "Not In Synch" status instead.

See Also:
Constant Field Values

DEFAULT_ANNOTATION_PATTERN

public static final String DEFAULT_ANNOTATION_PATTERN
See Also:
Constant Field Values

DEFAULT_MULTI_FILES_ANNOTATION_TYPES

public static final int[] DEFAULT_MULTI_FILES_ANNOTATION_TYPES

DEFAULT_MULTI_FILES_ANNOTATION_DELIMETER

public static final String DEFAULT_MULTI_FILES_ANNOTATION_DELIMETER
See Also:
Constant Field Values
Constructor Detail

StatusFormat

public StatusFormat()
Method Detail

getFileName

public static String getFileName(String[] elements)
Extract the file name from the array of elements.


getElementsFromLine

public static String[] getElementsFromLine(String line)
Decodes raw data from string encoded by getLineFromElements(String[]).


getLineFromElements

public static String getLineFromElements(String[] elements)
Encodes raw data to string decodable by getElementsFromLine(String).


getStatusAnnotation

public static String getStatusAnnotation(String name,
                                         FileObject fo,
                                         String annotationPattern,
                                         int annotationStyle,
                                         Map possibleFileStatusInfoMap)
Get the annotation line for a file, it takes last known status from memory and if unknown it schedules background fetching (pretty complicated contract).

Parameters:
name - the name of the node which is annotated
fo - fileobject to annotate
annotationPattern - the pattern how the annotation should be displayed
annotationStyle - defines what varibles values are provided into pattern input GeneralVcsSettings
Returns:
the annotation pattern filled up with proper attributes

getStatusAnnotation

public static String getStatusAnnotation(String name,
                                         FileObject fileObject,
                                         String pattern,
                                         int annotationStyle,
                                         Map extraVars,
                                         Map possibleFileStatusInfoMap)
Get the annotation line for a file, it takes last known status from memory and if unknown it schedules background fetching (pretty complicated contract).


getStatusAnnotation

public static String getStatusAnnotation(String name,
                                         Collection files,
                                         String pattern,
                                         int annotationStyle,
                                         Map possibleFileStatusInfoMap,
                                         int[] multiFilesAnnotationTypes)
Get the annotation line for a list of files.

Parameters:
name - the object file name
files - the FileObjects to annotate
multiFilesAnnotationTypes - the annotation types for individual attributes. Values of this files are MULTI_FILES_ANNOTATION_* constants.
Returns:
the annotation pattern filled up with proper attributes

getHtmlStatusAnnotation

public static String getHtmlStatusAnnotation(String name,
                                             FileObject fo,
                                             String annotationPattern,
                                             int annotationStyle,
                                             Map possibleFileStatusInfoMap)
Get the annotation line in a HTML format for a file. It takes last known status from memory and if unknown it schedules background fetching (pretty complicated contract).

Parameters:
name - the name of the node which is annotated
fo - fileobject to annotate
annotationPattern - the pattern how the annotation should be displayed
annotationStyle - defines what varibles values are provided into pattern input GeneralVcsSettings
Returns:
the annotation pattern filled up with proper attributes

getHtmlStatusAnnotation

public static String getHtmlStatusAnnotation(String name,
                                             Collection files,
                                             String pattern,
                                             int annotationStyle,
                                             Map possibleFileStatusInfoMap,
                                             int[] multiFilesAnnotationTypes)
Get the annotation line in a HTML format for a file. It takes last known status from memory and if unknown it schedules background fetching

Parameters:
name - the name of the node which is annotated
annotationStyle - defines what varibles values are provided into pattern input GeneralVcsSettings
Returns:
the annotation pattern filled up with proper attributes

isValidAnnotationPattern

public static boolean isValidAnnotationPattern(String pattern)
Verifies user entered pattern.


getHtmlStatusAnnotation

public static String getHtmlStatusAnnotation(String name,
                                             String fullName,
                                             String annotationPattern,
                                             FileStatusProvider statusProvider,
                                             Hashtable additionalVars)
Get the annotation line in a HTML format for a file.

Parameters:
name - the object file name
fullName - the full path of the file with respect to the filesystem root
annotationPattern - the pattern how the annotation should be displayed
statusProvider - the provider of the status attributes information
Returns:
the annotation pattern filled up with proper attributes

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.