How to draw the lollipop socket symbol in a class diagram - (consumes)?

+1 vote
asked Jul 29, 2014 in To be sorted by alberto (140 points)

I've found how to draw lollipops in class diagrams: http://plantuml.sourceforge.net/classes.html#Lollipop. I've also found that the lollipop support for component diagrams is pretty good: http://plantuml.sourceforge.net/qa/?qa=1736/are-partial-lollipop-for-component-diagrams-supported#a1737 . But I have tried to define a "consumes" relationship in the classdiagram, and I only get syntax errors.

This is what I want to do:

lollipop socket

I have tried many parenthesis-dashes combinations to no avail. Is this possible? (I'm using plantuml v.7999)

1 Answer

+1 vote
answered Jul 29, 2014 by plantuml (294,960 points)
 
Best answer
Hello,

No this is not possible yet.

But somehow we are working on improving lollipops support in PlantUML, so thanks for your request, we will integrate this in some future (but not before september 2014, sorry about that).

If you have suggestions about the syntax you would expect, feel free to post it here.

Regards,
commented Jul 30, 2014 by anonymous
Thanks for your answer. About the syntax, I'm sure I'll be confortable with whatever  you come up with. In my opinion though, it would make sense if you keep the notation in line with the already proposed for components. Something like:

class foo1
class foo2
foo1 -0)- foo2
foo1 -(
)- foo2
commented Sep 21, 2015 by anonymous
Hi,

Just wanted to know if the lollipop and socket notation has been integrated in the latest release. If yes, how do we go about using it?

Thanks
commented Sep 21, 2015 by plantuml (294,960 points)
Right now, you can have :

class foo1
class foo2
foo1 -0)- foo2

http://plantuml.com/plantuml/png/Iyv9B2vMIClFD-HAXZ6Dk41y1Lq3JLqm5m00
commented Oct 3, 2015 by anonymous
Thanks for your reply. I appreciate your efforts :)
I am not able to add additional Consume relations.. I need something like
that is present in this link
http://manual.altova.com/umodel/umodelbasic/index.html?umball_and_socket_notation.htm
Help me if this functionality is available, with code snippet..
I tried many combinations and ended up in vain..
commented Mar 17, 2017 by anonymous
Hi.. I also need the same functionality. Is it available yet?
commented Mar 17, 2017 by plantuml (294,960 points)
You can do something like:
@startuml
component Something {
  component Provider
  interface " " as Interface
  Provider -() Interface
}

component SomethingElse {
  component User
  Interface )-- User
}
@enduml

http://www.plantuml.com/plantuml/uml/IyxFBSZFIyqhKGZEpqqjoSZCIrUevb9GI8QB1nJbbsMcf1O11JFpIbABqXAJKnMKW32nMC4J9W2KXAbJqDNGH9AevU9AnhJ3DQSu5SsUq6Am7N2T2fgwkX31MW00
commented Mar 19, 2017 by anonymous
Hello,

Somehow this doesnt work for my uml.. Check this out:

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuShCAqajIajCJbLmD4Jc674bvoGM5oiu6IgaLfIavgKKAmGePEOMvAJcfkQL50DLArHprS8K6U5IfEDeXAJE6QH9koIrk4J1Ig4iFpD5GnCXPuHRBW1i1j0fkXgQ87S2xKDZ6N417QIfgmkqWWje9OW557C0EWdaIG00

Could you please suggest why it is giving that weird error - its not recognising this notation :- ")--"
commented Mar 20, 2017 by plantuml (294,960 points)
This has been implemented in last beta:

https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0
Tel us if it's not working for you.
Thanks!
commented Mar 22, 2017 by plantuml (294,960 points)
With last beta https://www.dropbox.com/s/koo42q3d9gxw288/plantuml.jar?dl=0
We have added the "circle" keyword.

So you can have now:
@startuml
left to right direction
class P
class C1
class C2
interface A1
circle A2
C1 ..> A1
C2 --( A2
A1 <|.. B1
A1 <|.. B2
B1 --|> P
B2 --|> P
A2 -- B2
@enduml
commented Oct 15, 2019 by rd27 (460 points)
Just wondering, when joining component with its interface how is "Provider -() Interface" different from just "Provider - Interface"?
...