Class Stream.StreamViewMapping
- java.lang.Object
-
- com.perforce.p4java.impl.generic.core.MapEntry
-
- com.perforce.p4java.impl.generic.core.Stream.StreamViewMapping
-
- All Implemented Interfaces:
IMapEntry,IStreamViewMapping
- Enclosing class:
- Stream
public static class Stream.StreamViewMapping extends MapEntry implements IStreamViewMapping
Simple default implementation of the IStreamViewMapping interface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.perforce.p4java.core.IMapEntry
IMapEntry.EntryType
-
Nested classes/interfaces inherited from interface com.perforce.p4java.core.IStreamViewMapping
IStreamViewMapping.PathType
-
-
Field Summary
Fields Modifier and Type Field Description protected IStreamViewMapping.PathTypepathType-
Fields inherited from class com.perforce.p4java.impl.generic.core.MapEntry
comment, elementPattern, elementPatternStr, left, order, right, type
-
Fields inherited from interface com.perforce.p4java.core.IMapEntry
ORDER_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description StreamViewMapping()Default constructor -- calls super() only.StreamViewMapping(int order, IStreamViewMapping.PathType pathType, java.lang.String viewPath, java.lang.String depotPath)Explicit value constructor -- calls super(order, target, targetSpec).StreamViewMapping(int order, java.lang.String rawViewString)Construct a mapping from the passed-in string, which is assumed to be in the format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDepotPath()Get a stream view entry's optional depot path; this corresponds to the right entry of the associated mapping.IStreamViewMapping.PathTypegetPathType()Get the stream view path typejava.lang.StringgetViewPath()Get a stream view entry's view path; this corresponds to the left entry of the associated mapping.voidsetDepotPath(java.lang.String depotPath)Set a stream view entry's optional depot path; this corresponds to the right entry of the associated mapping.voidsetPathType(IStreamViewMapping.PathType pathType)Set a stream view path typevoidsetViewPath(java.lang.String viewPath)Set a stream view entry's view path; this corresponds to the left entry of the associated mapping.java.lang.StringtoString(java.lang.String sepString, boolean quoteBlanks)Return a canonical String representation of this entry.-
Methods inherited from class com.perforce.p4java.impl.generic.core.MapEntry
getComment, getComment, getLeft, getLeft, getOrder, getRight, getRight, getType, parseComments, parseViewMappingString, quoteWhitespaceString, setComment, setLeft, setOrder, setRight, setType, stripComments, stripTypePrefix, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.perforce.p4java.core.IMapEntry
getComment, getComment, getLeft, getLeft, getOrder, getRight, getRight, getType, setComment, setLeft, setOrder, setRight, setType, toString
-
-
-
-
Field Detail
-
pathType
protected IStreamViewMapping.PathType pathType
-
-
Constructor Detail
-
StreamViewMapping
public StreamViewMapping()
Default constructor -- calls super() only.
-
StreamViewMapping
public StreamViewMapping(int order, IStreamViewMapping.PathType pathType, java.lang.String viewPath, java.lang.String depotPath)Explicit value constructor -- calls super(order, target, targetSpec).- Parameters:
order- orderpathType- path typeviewPath- view pathdepotPath- depot path
-
StreamViewMapping
public StreamViewMapping(int order, java.lang.String rawViewString)Construct a mapping from the passed-in string, which is assumed to be in the format.- Parameters:
order- orderrawViewString- raw view string
-
-
Method Detail
-
getPathType
public IStreamViewMapping.PathType getPathType()
Description copied from interface:IStreamViewMappingGet the stream view path type- Specified by:
getPathTypein interfaceIStreamViewMapping- Returns:
- path type
- See Also:
IStreamViewMapping.getPathType()
-
setPathType
public void setPathType(IStreamViewMapping.PathType pathType)
Description copied from interface:IStreamViewMappingSet a stream view path type- Specified by:
setPathTypein interfaceIStreamViewMapping- Parameters:
pathType- path type- See Also:
IStreamViewMapping.setPathType(com.perforce.p4java.core.IStreamViewMapping.PathType)
-
getViewPath
public java.lang.String getViewPath()
Description copied from interface:IStreamViewMappingGet a stream view entry's view path; this corresponds to the left entry of the associated mapping.- Specified by:
getViewPathin interfaceIStreamViewMapping- Returns:
- view path
- See Also:
IStreamViewMapping.getViewPath()
-
setViewPath
public void setViewPath(java.lang.String viewPath)
Description copied from interface:IStreamViewMappingSet a stream view entry's view path; this corresponds to the left entry of the associated mapping.- Specified by:
setViewPathin interfaceIStreamViewMapping- Parameters:
viewPath- view path- See Also:
IStreamViewMapping.setViewPath(java.lang.String)
-
getDepotPath
public java.lang.String getDepotPath()
Description copied from interface:IStreamViewMappingGet a stream view entry's optional depot path; this corresponds to the right entry of the associated mapping.- Specified by:
getDepotPathin interfaceIStreamViewMapping- Returns:
- depot path
- See Also:
IStreamViewMapping.getDepotPath()
-
setDepotPath
public void setDepotPath(java.lang.String depotPath)
Description copied from interface:IStreamViewMappingSet a stream view entry's optional depot path; this corresponds to the right entry of the associated mapping.- Specified by:
setDepotPathin interfaceIStreamViewMapping- Parameters:
depotPath- depot path- See Also:
IStreamViewMapping.setDepotPath(java.lang.String)
-
toString
public java.lang.String toString(java.lang.String sepString, boolean quoteBlanks)Description copied from interface:IMapEntryReturn a canonical String representation of this entry. This is in the form [type prefix]leftpath[specstring]rightpath, e.g. "-//depot/dev/test/... //clientname/newpath/..."If the passed-in string is null, the left and right strings (if they exist) will be concatenated into one long separator-less string.
If the quoteBlanks parameter is true, if either or both the left or right entries contain spaces, the entries are quoted in full, i.e. the mapping //depot/test/space test 01/... //depot/test/space test 02/... becomes "//depot/test/space test 01/..." "//depot/test/space test 02/...".
- Specified by:
toStringin interfaceIMapEntry- Specified by:
toStringin interfaceIStreamViewMapping- Overrides:
toStringin classMapEntry- Parameters:
sepString- separator stringquoteBlanks- quotes if spaces are used- Returns:
- formatted string
- See Also:
IMapEntry.toString(String, boolean)
-
-