1 | <?php |
||
40 | class Operation implements OperationConfigurationInterface, ListenerAwareConfigurationInterface |
||
41 | { |
||
42 | |||
43 | /** |
||
44 | * Trait that provides CSV configuration functionality. |
||
45 | * |
||
46 | * @var \TechDivision\Import\Configuration\Jms\Configuration\ListenersTrait |
||
47 | */ |
||
48 | use ListenersTrait; |
||
49 | |||
50 | /** |
||
51 | * The execution context. |
||
52 | * |
||
53 | * @var \TechDivision\Import\ExecutionContextInterface |
||
54 | */ |
||
55 | protected $executionContext; |
||
56 | |||
57 | /** |
||
58 | * The operation's name. |
||
59 | * |
||
60 | * @var string |
||
61 | * @Exclude() |
||
62 | */ |
||
63 | protected $name; |
||
64 | |||
65 | /** |
||
66 | * ArrayCollection with the information of the configured plugins. |
||
67 | * |
||
68 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
69 | * @Type("ArrayCollection<TechDivision\Import\Configuration\Jms\Configuration\Plugin>") |
||
70 | */ |
||
71 | protected $plugins; |
||
72 | |||
73 | /** |
||
74 | * Initialize the operation with the passed name. |
||
75 | * |
||
76 | * @param string|null $name The operation name |
||
77 | */ |
||
78 | public function __construct($name = null) |
||
84 | |||
85 | /** |
||
86 | * Lifecycle callback that will be invoked after deserialization. |
||
87 | * |
||
88 | * @return void |
||
89 | * @PostDeserialize |
||
90 | */ |
||
91 | public function postDeserialize() |
||
99 | |||
100 | /** |
||
101 | * Query's whether or not the passed operation equals this instance. |
||
102 | * |
||
103 | * @param \TechDivision\Import\Configuration\OperationConfigurationInterface $operation The operation to query |
||
104 | * |
||
105 | * @return boolean TRUE if the operations are equal, else FALSE |
||
106 | */ |
||
107 | public function equals(OperationConfigurationInterface $operation) |
||
111 | |||
112 | /** |
||
113 | * Set's the operation's name. |
||
114 | * |
||
115 | * @param string $name The operation's name |
||
116 | * |
||
117 | * @return void |
||
118 | */ |
||
119 | public function setName($name) |
||
123 | |||
124 | /** |
||
125 | * Return's the operation's name. |
||
126 | * |
||
127 | * @return string The operation's name |
||
128 | */ |
||
129 | public function getName() |
||
133 | |||
134 | /** |
||
135 | * Return's the ArrayCollection with the operation's plugins. |
||
136 | * |
||
137 | * @return \Doctrine\Common\Collections\ArrayCollection The ArrayCollection with the operation's plugins |
||
138 | */ |
||
139 | public function getPlugins() |
||
143 | |||
144 | /** |
||
145 | * Set's the execution context configuration for the actualy plugin configuration. |
||
146 | * |
||
147 | * @param \TechDivision\Import\ExecutionContextInterface $executionContext The execution context to use |
||
148 | * |
||
149 | * @return void |
||
150 | */ |
||
151 | public function setExecutionContext(ExecutionContextInterface $executionContext) |
||
155 | |||
156 | /** |
||
157 | * Return's the execution context configuration for the actualy plugin configuration. |
||
158 | * |
||
159 | * @return \TechDivision\Import\ExecutionContextInterface The execution context to use |
||
160 | */ |
||
161 | public function getExecutionContext() |
||
165 | |||
166 | /** |
||
167 | * String representation of the operation (the name). |
||
168 | * |
||
169 | * @return string The operation name |
||
170 | */ |
||
171 | public function __toString() |
||
175 | |||
176 | /** |
||
177 | * Return's the full opration name, which consists of the Magento edition, the entity type code and the operation name. |
||
178 | * |
||
179 | * @param string $separator The separator used to seperate the elements |
||
180 | * |
||
181 | * @return string The full operation name |
||
182 | */ |
||
183 | public function getFullName($separator = '/') |
||
194 | } |
||
195 |