Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.sci.pattern
Interface SciPatternManager

public interface SciPatternManager

Creates new classes/interfaces, members and links using specified patterns and returns the default patterns for the classes/interfaces, members and links.

Default patterns are patterns which make some default actions for classes/interfaces, members and links.

An instance of `SciPatternManger` can be obtained using `SciModel.getPatternManager()` method.

Author:
  TogetherSoft
See Also: com.togethersoft.openapi.sci.SciModel.getPatternManager()

Method Summary
`SciClass` | `applyPatternToClass(SciPattern pattern, SciClass sciClass)`
`SciElement` | `applyPatternToLink(SciPattern pattern, SciElement sciElement, SciClass sciSource, SciClass sciDestination)`
`SciMember` | `applyPatternToMember(SciPattern pattern, SciMember sciMember)`
`boolean` | `canApplyPatternToClass(SciPattern pattern, SciClass sciClass)`
`boolean` | `canApplyPatternToLink(SciPattern pattern, SciElement sciElement, SciClass sciSource, SciClass sciDestination)`
`boolean` | `canApplyPatternToMember(SciPattern pattern, SciMember sciMember)`
`boolean` | `canCreateClassByPattern(SciPattern pattern, SciContainer container)`
`boolean` | `canCreateLinkByPattern(SciPattern pattern, SciClass sourceClass, SciClass destinationClass)`
`boolean` | `canCreateMemberByPattern(SciPattern pattern, SciClass container)`
`SciClass` | `createClassByPattern(SciPattern pattern, SciContainer container)` Creates a new class/interface in the specified container using the specified pattern.
`SciElement` | `createLinkByPattern(SciPattern pattern, SciClass sourceClass, SciClass destinationClass)`
`SciMember` | `createMemberByPattern(SciPattern pattern, SciClass container)`
`SciPattern` | `findPattern(String language, String category, String patternName)` Finds a pattern by using additional information about it.
`SciPattern` | `getDefaultClassPattern(SciContainer container, String language, String key)` Returns a default pattern for the classes/interfaces.
`SciPattern` | `getDefaultLinkPattern(SciClass sourceClass, SciClass destinationClass, String key)`
`SciPattern` | `getDefaultMemberPattern(SciClass container, String key)`

Method Detail

### applyPatternToClass

    public SciClass applyPatternToClass(SciPattern pattern, SciClass sciClass)

### applyPatternToLink

    public SciElement applyPatternToLink(SciPattern pattern, SciElement sciElement, SciClass sciSource, SciClass sciDestination)

### applyPatternToMember

    public SciMember applyPatternToMember(SciPattern pattern, SciMember sciMember)

### canApplyPatternToClass

    public boolean canApplyPatternToClass(SciPattern pattern, SciClass sciClass)

### canApplyPatternToLink

    public boolean canApplyPatternToLink(SciPattern pattern, SciElement sciElement, SciClass sciSource, SciClass sciDestination)

### canApplyPatternToMember

    public boolean canApplyPatternToMember(SciPattern pattern, SciMember sciMember)

### canCreateClassByPattern

    public boolean canCreateClassByPattern(SciPattern pattern, SciContainer container)

### canCreateLinkByPattern

    public boolean canCreateLinkByPattern(SciPattern pattern, SciClass sourceClass, SciClass destinationClass)

### canCreateMemberByPattern

    public boolean canCreateMemberByPattern(SciPattern pattern, SciClass container)

### createClassByPattern

    public SciClass createClassByPattern(SciPattern pattern, SciContainer container)

  Creates a new class/interface in the specified container using the specified pattern.
  Parameters:
    pattern - the `SciPattern`
    container - the `SciContainer` for the newly created class/interface
  Returns: a new just created `SciClass`

### createLinkByPattern

    public SciElement createLinkByPattern(SciPattern pattern, SciClass sourceClass, SciClass destinationClass)

### createMemberByPattern

    public SciMember createMemberByPattern(SciPattern pattern, SciClass container)

### findPattern

    public SciPattern findPattern(String language, String category, String patternName)

  Finds a pattern by using additional information about it.
  Parameters:
    language - The string with the name of the source code language. The predefined language names are in `SciLanguage` interface.
    category - The string which indicates a kind of an object the pattern is applicable to. The predefined values in `SciPatternCategory` interface.
    patternName - the string with the name of the pattern
  Returns: `SciPattern` matching specified information, `null` if there is no such pattern
  See Also:
    SciLanguage, SciPatternCategory

### getDefaultClassPattern

    public SciPattern getDefaultClassPattern(SciContainer container, String language, String key)

  Returns a default pattern for the classes/interfaces.
  Parameters:
    container - The `SciContainer` this pattern is intended to be used within. For different kinds of containers there can be different default patterns for classes/interfaces.
    key - The string with additional information about the kind of a class/interface this pattern is intended to work with. There are two predefined kinds "Interface" and "Class" in `SciDefaultPattern` interface.
  Returns: default `SciPattern` for the classes/interfaces
  See Also:
    SciDefaultPattern.INTERFACE, SciDefaultPattern.CLASS

### getDefaultLinkPattern

    public SciPattern getDefaultLinkPattern(SciClass sourceClass, SciClass destinationClass, String key)

### getDefaultMemberPattern

    public SciPattern getDefaultMemberPattern(SciClass container, String key)

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD