Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 7.5.0
Div
Classe2e-refDiv

Otp
Floatingfalse
maxHLevel1

Rp

The figure below shows the attribute specification dialog to edit the properties of an attribute.

...

Frequently, it is necessary to store literals global to an xUML service. In Bridgecontext, it is possible to define name value pairs that are configurable on the E2E Bridge. This can be achieved by applying the stereotype <<E2EAttribute>> to the corresponding attribute.
As soon as <<E2EAttribute>> is applied, additional specifications can be made in the Settings section of the specification dialog of the attribute.

Tagged ValueDescriptionValues
SettingSpecify whether this attribute is a service setting. Service setting values can be configured via the
E2E
Bridge, so that the default value of the attribute can be overridden.trueValue is a setting and can be configured via the
E2E
Bridge.
falseValue is not a setting (default).
Setting NameSpecify an optional name of the setting to be displayed on the
E2E
Bridge. If no name is specified, the Bridge uses <<class name>>::<<attribute name>>.any valid string
Is Password SettingSpecify whether the setting value contains a password that should not be displayed in the Bridge UI.trueValue is a password and should be masked.
falseValue is no password (default).

Figure: Specification Dialog with Settings Section

...

For more information on how to change the settings of an xUML service on the E2E Bridge refer to xUML Service Settings.

...

The visibility describes whether an attribute is accessible from a given context. The context is dependent on the owner of the activity diagram. For instance, if a class has an operation, which is implemented by an activity diagram, then the context is the class.
There are four attribute visibility types:

Visibility TypeSymbolDescription
public+The attribute is inherited and accessible by any outside object.
protected-The attribute is inherited and accessible from inside the current class (class operations) or classes derived from that class.
private#The attribute is not inherited and accessible only from inside the current class (class operations).
package~Not supported yet. The attribute's visibility will be handled like public.

For example, assume an activity diagram Act1 is assigned to the operation Op1 of class Class1. In this case, each attribute of class Class1 can be used as input or output of adapters, functions, and EAL (E2E Bridge Action Language) expressions in this activity diagram. This works independently of the attributes' visibility, because the attributes of class Class1 and the activity diagram Act1 are in the same context.
However, assume the class Class1 is used in an activity diagram Act2, which is assigned to an operation Op2, which is a member of class Class2. All actions taking place in activity diagram Act2 are in the context of class Class2. This has the following consequences:

...

If an attribute is public, it is accessible from each context.

...

iconfalse

...

.
Using the visibility makes sense especially with stateful objects (persistent state objects) where the state variables should not be accessible from another class. If the class is used to model data structures, it is recommended to set the visibility of all attributes to public.
Classes can be modeled in a classical sense having properties (attributes) and behavior (operations). They are candidates for introducing getter and setter operations. For more details see Class Design.

...

You can change this behavior on a project basis. In MagicDraw, go to Options > Project > Default Model Properties > Property. Set the value of Visibility to public.

Hiding Attributes From Interfaces

Independent of the visibility specified, all attributes are exposed if a class is used in an interface.

Builder 7.5.0 You can hide selected attributes from interfaces. To do so, apply stereotype <<E2EPrivate>> on such attributes.

Attributes marked with<<E2EPrivate>> will

  • not be exposed to WSDL, XSD, OpenAPI interfaces
  • not be serialized to service responses for REST and SOAP
  • not be serialized to requests of REST and SOAP adapters
  • not be serialized when using classToXML and classToJSON.
  • not be serialized and thus not saved between transitions and states, if applied to attributes of persistent state classes.

Changeability

An accessible attribute can be read or modified in the action script of an activity diagram depending on its attribute changeability settings.
There are three attribute changeability types:

...

If the scope of an attribute is classifier, the attribute will have the same value in all instances of the class. If the scope of an attribute is instance, the attribute values depend on the instances of the class.

Noteinfo
iconfalse

The E2E Bridge does not support classifier scopes.

...

The following multiplicities exist:

MultiplicityDescription
0zero and only zero
1one and only one
0..1zero or one
0..*from zero to any positive integer
1..*from one to any positive integer
*any positive integer
Noteinfo
iconfalse

Above rules apply to associations as well.