Class BpSchemeUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.bp.scheme.services.BpSchemeUtil
-
public class BpSchemeUtil extends Object
Support class for bp scheme.
-
-
Field Summary
Fields Modifier and Type Field Description static long
UNKNOWN_BM_ID
Unknown bm id.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com._1c.g5.v8.dt.diagram.framework.IDiagramCore<BpEntity,BpRelation>
createDiagramCore(GraphicalScheme graphicalScheme)
Creates diagram core from given scheme.static com._1c.g5.v8.dt.diagram.framework.IDiagramCore<BpEntity,BpRelation>
createDiagramCore(Collection<GraphicalSchemeItem> items)
Creates diagram core from given items.static com._1c.g5.v8.dt.diagram.framework.IEntity
createDummyEntity()
Creates and returns dummy entity.static SchemeItemAddressingAttribute
createItemAddressingAttribute(AddressingAttribute addressingAttribute)
Creates scheme item addressing attribute with undefined value.static String
getAvailableName(String desiredName, com._1c.g5.v8.dt.diagram.framework.IDiagramCore<? extends com._1c.g5.v8.dt.diagram.framework.IEntity,? extends BpRelation> diagramCore)
Returns available name.static String
getAvailableName(String desiredName, Collection<String> takenNames)
Returns available name.static IBmObject
getItemById(long bmId)
Returns item with given bm id.static String
getLanguage()
Returns current JVM language.static boolean
isRussianLocale()
Returnstrue
if current JVM language is russian.static void
setBmModel(IBmModel bmModel)
Set's bm model.
-
-
-
Field Detail
-
UNKNOWN_BM_ID
public static final long UNKNOWN_BM_ID
Unknown bm id. If item returns this id, it means that item does not have attached to bm model object.- See Also:
- Constant Field Values
-
-
Method Detail
-
createDummyEntity
public static com._1c.g5.v8.dt.diagram.framework.IEntity createDummyEntity()
Creates and returns dummy entity.- Returns:
- dummy entity. Can't return
null
-
getLanguage
public static String getLanguage()
Returns current JVM language.- Returns:
- current JVM language. Can't return
null
.
-
isRussianLocale
public static boolean isRussianLocale()
Returnstrue
if current JVM language is russian.- Returns:
true
if current JVM language is russian.
-
getAvailableName
public static String getAvailableName(String desiredName, com._1c.g5.v8.dt.diagram.framework.IDiagramCore<? extends com._1c.g5.v8.dt.diagram.framework.IEntity,? extends BpRelation> diagramCore)
Returns available name. If item with given name already on diagram, adds number to given name.- Parameters:
desiredName
- - desired name. Can't benull
.diagramCore
- - diagram core. Can't benull
.- Returns:
- available name. Can't return
null
.
-
getAvailableName
public static String getAvailableName(String desiredName, Collection<String> takenNames)
Returns available name. If item with given name already on diagram, adds number to given name.- Parameters:
desiredName
- - desired name. Can't benull
.takenNames
- - already taken names. Can't benull
.- Returns:
- available name. Can't return
null
.
-
setBmModel
public static void setBmModel(IBmModel bmModel)
Set's bm model. Bm model should be set before usinggetItemById(long)
mehtod.- Parameters:
bmModel
- - bm model containing graphical scheme. Can't benull
.
-
getItemById
public static IBmObject getItemById(long bmId)
Returns item with given bm id.- Parameters:
bmId
- - item's bm id.- Returns:
- item with given bm id. If there is no item with given id, returns
null
.
-
createDiagramCore
public static com._1c.g5.v8.dt.diagram.framework.IDiagramCore<BpEntity,BpRelation> createDiagramCore(Collection<GraphicalSchemeItem> items)
Creates diagram core from given items.- Parameters:
items
- - items to create diagram core. Can't benull
.- Returns:
- created diagram core. Can't return
null
.
-
createDiagramCore
public static com._1c.g5.v8.dt.diagram.framework.IDiagramCore<BpEntity,BpRelation> createDiagramCore(GraphicalScheme graphicalScheme)
Creates diagram core from given scheme.- Parameters:
graphicalScheme
- - scheme to create diagram core. Can't benull
.- Returns:
- created diagram core. Can't return
null
.
-
createItemAddressingAttribute
public static SchemeItemAddressingAttribute createItemAddressingAttribute(AddressingAttribute addressingAttribute)
Creates scheme item addressing attribute with undefined value.- Parameters:
addressingAttribute
- - addressing attribute to create scheme item addressing attribute. Can't benull
.- Returns:
- created scheme item addressing attribute. Can't return
null
.
-
-