open:plantuml

PlantUML

홈페이지에 있는 내용입니다.

<uml>
A -> B
note right : 기본으로 시퀀스가 그려집니다.
</uml>

<uml>
A → B
note right : 기본으로 시퀀스가 그려집니다.
</uml>

<uml>
:A: -> (B) 
note left of A : :: 을 사용하여 액터로 표시.
note right of B : () 을 사용하여 유즈케이스로 표시.
</uml>

<uml>
:A: → (B)
note left of A : :: 을 사용하여 액터로 표시.
note right of B : () 을 사용하여 유즈케이스로 표시.
</uml>

<uml>
A -> B
B : B클래스
note right of B : : 를 사용하여 클래스로 표시
</uml>

<uml>
A → B
B : B클래스
note right of B : : 를 사용하여 클래스로 표시
</uml>

<uml>
:A;
:B;
note right : :; 를 사용하여 액티비티로 표시
</uml>

<uml>
:A;
:B;
note right : :; 를 사용하여 액티비티로 표시
</uml>

<uml>
()A -> [B]
note left of A : () 을 사용하여 인터페이스로 표시.
note right of B : [] 을 사용하여 컴포넌트로 표시.
</uml>

<uml>
()A → [B]
note left of A : () 을 사용하여 인터페이스로 표시.
note right of B : [] 을 사용하여 컴포넌트로 표시.
</uml>

<uml>
[*] -> A 
A : A State
note right of A : [*] 을 사용하여 스테이트로 표시.
</uml>

<uml>
[] → A
A : A State
note right of A : [
] 을 사용하여 스테이트로 표시.
</uml>

  • 화살표 ->
  • 점선 -->

<uml>
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
</uml>

<uml>
Alice → Bob: Authentication Request
Bob –

> Alice: Authentication Response


A

lice → Bob: Another authentication Request
Alice ←- Bob: another authentication Response
</uml>

  • 한줄 주석 : ' 로 시작
  • 문단 주석 : /' ……….. '/

actor Foo1
boundary Foo2
control Foo3
entity Foo4
database Foo5
Foo1 -> Foo2 : To boundary
Foo1 -> Foo3 : To control
Foo1 -> Foo4 : To entity
Foo1 -> Foo5 : To database

<uml>
actor Foo1
boundary Foo2
control Foo3
entity Foo4
database Foo5
Foo1 → Foo2 : To boundary
Foo1 → Foo3 : To control
Foo1 → Foo4 : To entity
Foo1 → Foo5 : To database
</uml>

색 지정

<uml>
actor Bob #red
' The only difference between actor
'and participant is the drawing
participant Alice
participant "I have a really\nlong name" as L #99FF99
/' You can also declare:
   participant L as "I have a really\nlong name"  #99FF99
  '/

Alice->Bob: Authentication Request
Bob->Alice: Authentication Response
Bob->L: Log transaction
</uml>

<uml>
actor Bob #red
' The only difference between actor
'and participant is the drawing
participant Alice
participant “I have a really\nlong name” as L #99FF99
/' You can also declare:

 participant L as "I have a really\nlong name"  #99FF99
'/

Alice→Bob: Authentication Request
Bob→Alice: Authentication Response
Bob→L: Log transaction
</uml>

<uml>
Bob -> Alice : hello

create Other
Alice -> Other : new

create control String
Alice -> String
note right : You can also put notes!

Alice --> Bob : ok
</uml>

<uml>
Bob → Alice : hello

create Other
Alice → Other : new

create control String
Alice → String
note right : You can also put notes!

Alice –

> Bob : ok


<

/uml>

  • 괄호를 사용해서 표현 ( )
  • usecase 키워드 사용

<uml>
(First usecase)
(Another usecase) as (UC2)  
usecase UC3
usecase (Last\nusecase) as UC4
</uml>

<uml>
(First usecase)
(Another usecase) as (UC2)
usecase UC3
usecase (Last\nusecase) as UC4
</uml>

  • 콜론을 사용해서 표현 : :
  • actor 키워드 사용

<uml>
:First Actor:
:Another\nactor: as Men2  
actor Men3
actor :Last actor: as Men4
</uml>

<uml>
:First Actor:
:Another\nactor: as Men2
actor Men3
actor :Last actor: as Men4
</uml>

  • <|– 심볼 사용

<uml>
:Main Admin: as Admin
(Use the application) as (Use)

User <|-- Admin
(Start) <|-- (Use)
</uml>

<uml>
:Main Admin: as Admin
(Use the application) as (Use)

User <|– Admin
(Start) <|– (Use)
</uml>

  • note left of
    • note right of
    • note top of
    • note bottom
    • .. : 점선연결

<uml>
:Main Admin: as Admin
(Use the application) as (Use)

User -> (Start)
User --> (Use)

Admin ---> (Use)

note right of Admin : This is an example.

note right of (Use)
  A note can also
  be on several lines
end note

note "This note is connected\nto several objects." as N2
(Start) .. N2
N2 .. (Use)
</uml>

<uml>
:Main Admin: as Admin
(Use the application) as (Use)

User → (Start)
User –

> (Use)

Admin —

> (Use)

note right of Admin : This is an example.

note right of (Use)

A note can also
be on several lines

end note

note “This note is connected\nto several objects.” as N2
(Start) .. N2
N2 .. (Use)
</uml>

  • -- : 수직 연결
  • - : 수평 연결
  • .. : 점선 연결
  • left, right, up or down

<uml>
:user: -left-> (dummyLeft) 
:user: -right-> (dummyRight) 
:user: -up-> (dummyUp)
:user: -down-> (dummyDown)
</uml>

<uml>
:user: -left→ (dummyLeft)
:user: -right→ (dummyRight)
:user: -up→ (dummyUp)
:user: -down→ (dummyDown)
</uml>

  • 기본 : top to bottom
  • 변경 : top to bottom

<uml>
left to right direction
user1 --> (Usecase 1)
user2 --> (Usecase 2)
</uml>

<uml>
left to right direction
user1 –

> (Usecase 1)


u

ser2 –

> (Usecase 2)


<

/uml>