This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-docs.git
The following commit(s) were added to refs/heads/master by this push:
new 919ca18 crux: added crux Interfaces page
919ca18 is described below
commit 919ca1873e357fcb2d92f3fceaaa429d6ff5f213
Author: Carlos Rovira <[email protected]>
AuthorDate: Tue Feb 18 20:57:41 2020 +0100
crux: added crux Interfaces page
---
_data/toc.json | 9 +++++++
libraries/crux.md | 6 ++---
libraries/crux/interfaces.md | 59 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+), 3 deletions(-)
diff --git a/_data/toc.json b/_data/toc.json
index a205b65..5feffa7 100644
--- a/_data/toc.json
+++ b/_data/toc.json
@@ -182,6 +182,15 @@
},
{
"path": "libraries/crux/event-handling.md"
+ },
+ {
+ "path": "libraries/crux/service-layer.md"
+ },
+ {
+ "path": "libraries/crux/client-persistence.md"
+ },
+ {
+ "path": "libraries/crux/interfaces.md"
}
]
},
diff --git a/libraries/crux.md b/libraries/crux.md
index 94de8ca..8fbfd0c 100644
--- a/libraries/crux.md
+++ b/libraries/crux.md
@@ -50,9 +50,9 @@ In contrast to other major frameworks for Royale, Crux:
- View Mediator and ViewNavigator (check if we support this on Royale)
- [Bean Life Cycle Management](libraries/crux/bean-life-cycle-management)
- [Event Handling](libraries/crux/event-handling)
- - Service Layer
- - Client Persistence
- - Interfaces
+ - [Service Layer](libraries/crux/service-layer)
+ - [Client Persistence](libraries/crux/client-persistence)
+ - [Interfaces](libraries/crux/interfaces)
- **Advanced Topics**
- AutowiredTestCase
- Chaining API
diff --git a/libraries/crux/interfaces.md b/libraries/crux/interfaces.md
new file mode 100644
index 0000000..bf2bcda
--- /dev/null
+++ b/libraries/crux/interfaces.md
@@ -0,0 +1,59 @@
+---
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+layout: docpage
+title: Interfaces
+description: Learn more about the available interfaces in Crux
+permalink: /libraries/crux/interfaces
+---
+
+# Interfaces
+
+Learn more about the available interfaces in Crux
+
+Crux provides several interfaces to enable manual control over certain
features, or as an alternative to using certain metadata tags.
+
+## ISetUpValidator
+
+Implementing this interface will instruct Crux to invoke the `allowSetUp()`
method of the bean before the bean is set up. If this method returns `true`,
set up will proceed. If it returns `false`, Crux will not set up the bean.
+
+## ITearDownValidator
+
+Implementing this interface will instruct Crux to invoke the `allowTearDown()`
method of the bean before the bean is torn down. If this method returns `true`,
tear down will proceed. If it returns `false`, Crux will not tear down the bean.
+
+> `ISetUpValidator` and `ITearDownValidator` are primarily meant for use in
**view components**, to allow specific views to opt out of set up or tear down.
In these cases, the developer can manually control set up or tear down of the
views.
+
+## IInitializing
+
+Implementing this interface will instruct Crux to invoke the
`afterPropertiesSet()` method of the bean after the bean is set up.
+
+## IDisposable
+
+Implementing this interface will instruct Crux to invoke the `destroy()`
method of the bean when the bean is destroyed
+
+## IDispatcherAware
+
+Implementing this interface will instruct Crux to inject an `IEventDispatcher`
into the bean's dispatcher property when it is set up.
+
+> **Best Practice**. In order to minimize coupling to the Crux framework,
using the [PostConstruct], [PreDestroy] and [Dispatcher] metadata tags should
be favored over use of IInitializing, IDisposable and IDispatcherAware.
+
+## IBeanFactoryAware
+
+Implementing this interface will instruct Crux to inject the Crux
`IBeanFactory` into the bean's `beanFactory` property when it is set up.
+
+## ICruxAware
+
+Implementing this interface will instruct Crux to inject itself into the
bean's `crux` property when it is set up.
\ No newline at end of file