Moved repository master into its own directory

This commit is contained in:
Chris Shields
2020-07-21 10:43:33 +01:00
parent a7afb73e58
commit cbd58ea958
6316 changed files with 0 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -0,0 +1,175 @@
@startuml
title Policies: Policy Component (V4.2 onwards)
' Split into 2 pages
page 2x1
interface PolicyEndpointService #DDDDDD
class PolicyEndpointServiceImpl #DDDDDD implements PolicyEndpointService{
- policyComponent : PolicyComponent
- policyEndpointRegistry : registry
+ registerPolicyEndpoint(QName policy, String endpoint) : void
+ registerPolicyEndpoint(QName policy, QName typeOrAspect, String endpoint) : void
+ unregisterPolicyEndpoint(QName policy, String endpoint) : void
+ unregisterPolicyEndpoint(QName policy, QName typeOrAspect, String endpoint) : void
}
PolicyEndpointServiceImpl -> PolicyComponent
class PolicyEndpointRegistry #DDDDDD {
- QueuedBehaviour dynamicBehaviour
- Set<PolicyEndPointPolicyEndpoint> registrations
+ {static} PolicyEndpointRegistry getInstance()
+ reload(long fromTime)
+ slip(String body, @Properties Map<String, Object> properties)
}
PolicyEndpointRegistry *- "1" QueuedBehaviour
PolicyEndpointServiceImpl -> PolicyEndpointRegistry
class PolicyEndpoint <<immutable>> #DDDDDD {
- QName policy
- QName typeOrAspect
- String endpoint
- long modified
- boolean active
+ getKey()
}
PolicyEndpointRegistry *- PolicyEndpoint
interface Policy
interface ClassPolicy extends Policy
interface OnCreateNodePolicy extends ClassPolicy {
+QNAME: http://www.alfresco.org:onCreateNode
+onCreateNode(ChildAssociationRef childAssocRef)
}
interface AssociationPolicy extends Policy
interface OnCreateChildAssociationPolicy extends AssociationPolicy {
+QNAME: http://www.alfresco.org:onCreateChildAssociation
+onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean isNewNode)
}
enum NotificationFrequency {
EVERY_EVENT,
FIRST_EVENT,
TRANSACTION_COMMIT
}
interface Behaviour {
+ <T> getInterface(Class<T> policy) : T
+ disable()
+ enable()
+ isEnabled() : boolean
+ getNotificationFrequency() : NotificationFrequency
}
class BaseBehaviour implements Behaviour {
# proxies : Map<Class, Object>
# frequency : NotificationFrequency
- disabled : StackThreadLocal
+ disable()
+ enable()
+ isEnabled() : boolean
+ getNotificationFrequency() : NotificationFrequency
}
class JavaBehaviour extends BaseBehaviour {
+ <T> getInterface(Class<T> policy) : T
# <T> getInvocationHandler(Object instance, String method, Class<T> policyIF) : InvocationHandler
}
class QueuedBehaviour <<V5.2>> #DDDDDD extends BaseBehaviour {
- ProducerTemplate queueTemplate
+ <T> getInterface(Class<T> policy) : T
# <T> getInvocationHandler(Object instance, String method, Class<T> policyIF) : InvocationHandler
}
class ScriptBehaviour extends BaseBehaviour
BaseBehaviour o- NotificationFrequency
interface BehaviourBinding {
+ generaliseBinding() : BehaviourBinding
}
class ClassBehaviourBinding implements BehaviourBinding {
+ generaliseBinding() : BehaviourBinding
}
class ClassFeatureBehaviourBinding extends ClassBehaviourBinding {
}
class ServiceBehaviourBinding implements BehaviourBinding {
+ generaliseBinding() : BehaviourBinding
}
class ClassPolicyDelegate<P extends ClassPolicy> {
- dictionary : DictionaryService
- factory : CachedPolicyFactory<ClassFeatureBehaviourBinding, P>
# ClassPolicyDelegate(DictionaryService dictionary, Class<P> policyClass, BehaviourIndex<ClassBehaviourBinding> index, long tryLockTimeout)
}
class AssociationPolicyDelegate<P extends AssociationPolicy> {
- dictionary : DictionaryService
- factory : CachedPolicyFactory<ClassFeatureBehaviourBinding, P>
# AssociationPolicyDelegate(DictionaryService dictionary, Class<P> policyClass, BehaviourIndex<ClassFeatureBehaviourBinding> index, long tryLockTimeout)
}
class PropertyPolicyDelegate<P extends PropertyPolicy> {
- dictionary : DictionaryService
- factory : CachedPolicyFactory<ClassFeatureBehaviourBinding, P>
# PropertyPolicyDelegate(DictionaryService dictionary, Class<P> policyClass, BehaviourIndex<ClassFeatureBehaviourBinding> index, long tryLockTimeout)
}
class PolicyFactory<B extends BehaviourBinding, P extends Policy> {
- index : BehaviourIndex~<B>
- policyClass : Class~<P>
- transactionHandlerFactory : TransactionInvocationHandlerFactory
- tenantService : TenantService
--
PolicyFactory(Class<P> policyClass, BehaviourIndex~<B> index)
--
}
class CachedPolicyFactory<B extends BehaviourBinding, P extends Policy> extends PolicyFactory
abstract class AbstractNodeServiceImpl implements NodeService {
- policyComponent : PolicyComponent
# dictionaryService : DictionaryService
# transactionService : TransactionService
# tenantService : TenantService
- onCreateNodeDelegate : ClassPolicyDelegate<OnCreateNodePolicy>
}
interface PolicyComponent {
+ <P extends ClassPolicy> registerClassPolicy(Class<P> policy) : ClassPolicyDelegate<P>
+ <P extends PropertyPolicy> registerPropertyPolicy(Class<P> policy) : PropertyPolicyDelegate<P>
+ <P extends AssociationPolicy> registerAssociationPolicy(Class<P> policy) : AssociationPolicyDelegate<P>
+ bindClassBehaviour(QName policy, QName className, Behaviour behaviour) : BehaviourDefinition<ClassBehaviourBinding>
+ bindClassBehaviour(QName policy, Object service, Behaviour behaviour) : BehaviourDefinition<ServiceBehaviourBinding>
+ bindPropertyBehaviour(QName policy, QName className, QName propertyName, Behaviour behaviour) : BehaviourDefinition<ClassFeatureBehaviourBinding>
+ bindPropertyBehaviour(QName policy, QName className, Behaviour behaviour) : BehaviourDefinition<ClassFeatureBehaviourBinding>
+ bindPropertyBehaviour(QName policy, Object service, Behaviour behaviour) : BehaviourDefinition<ServiceBehaviourBinding>
+ bindAssociationBehaviour(QName policy, QName className, QName assocName, Behaviour behaviour) : BehaviourDefinition<ClassFeatureBehaviourBinding>
+ bindAssociationBehaviour(QName policy, QName className, Behaviour behaviour) : BehaviourDefinition<ClassFeatureBehaviourBinding>
+ bindAssociationBehaviour(QName policy, Object service, Behaviour behaviour) : BehaviourDefinition<ServiceBehaviourBinding>
+ removeClassDefinition(BehaviourDefinition<ClassBehaviourBinding> definition) : void
}
class PolicyComponentImpl implements PolicyComponent {
- Map<QName, ClassBehaviourIndex<ClassBehaviourBinding>> classBehaviours
- Map<QName, ClassBehaviourIndex<ClassFeatureBehaviourBinding>> propertyBehaviours
- Map<QName, ClassBehaviourIndex<ClassFeatureBehaviourBinding>> associationBehaviours
+ PolicyComponentImpl(DictionaryService dictionary)
+ ... (all)
}
interface BehaviourFilter {
+ disableBehaviour() : void
+ disableBehaviour(QName className) : void
+ disableBehaviour(QName className, boolean includeSubClasses) : void
+ disableBehaviour(NodeRef nodeRef, QName className) : void
+ disableBehaviour(NodeRef nodeRef) : void
+ enableBehaviour() : void
+ enableBehaviour(QName className) : void
+ enableBehaviour(NodeRef nodeRef, QName className) : void
+ enableBehaviour(NodeRef nodeRef) : void
}
class BehaviourFilterImpl implements BehaviourFilter {
+ ... (all)
}
AbstractNodeServiceImpl -> PolicyComponentImpl
PolicyComponentImpl -> BehaviourFilterImpl
PolicyComponentImpl -> "creates" ClassPolicyDelegate
PolicyComponentImpl -> "creates" AssocationPolicyDelegate
PolicyComponentImpl -> "creates" PropertyPolicyDelegate
ClassPolicyDelegate --> "uses" PolicyFactory
AssociationPolicyDelegate --> "uses" PolicyFactory
PropertyPolicyDelegate --> "uses" PolicyFactory
PolicyFactory --> "creates" BehaviourBinding
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -0,0 +1,56 @@
@startuml
title Policies: Queued Policies (V5.2 Proposal)
actor user
database ActiveMQ as AMQ
database DB {
folder alf_policies
}
component "Client Application" {
component [Client Code]
component [ClientQueueReceiver]
component [Camel(Client App)]
}
user <--> [Client Code]
ClientQueueReceiver <-- [Camel(Client App)]
ClientQueueReceiver -> [Client Code]
[Camel(Client App)] <- AMQ
component "Alfresco One Platform" {
component Quartz as Q
component [Camel] as Camel
component [Policy ReST API] as PR
component PolicyService as PS {
[PolicyCheckJob] as PCJ
[PolicyMap] as PM <<Map>>
component Routes as R {
component ToQueue
component FromQueue
}
}
component PolicyComponent as PC {
component QueuedBehaviour as QB
}
component [Alfresco Services] as Services
component PolicyDAO as PD
}
[Client Code] <-> PR
Q --> PCJ
PCJ -> PM
PR --> PS
Services -> PC
PCJ --> PD
PD -> DB
QB -> ToQueue
ToQueue -> Camel
FromQueue <- Camel
FromQueue --> Services
Camel <-> AMQ
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,37 @@
@startuml
Title: Policies: Register Policy Endpoint (V5.2 Proposal)
skinparam componentStyle uml2
actor "Client App" as Client
participant "Policy Endpoint Rest API" as API
participant "PolicyEndpointService" as PS
participant "PolicyEndpointRegistry" as PER
participant "PolicyEndpointDAO" as DAO
database DB
participant "PolicyComponent" as PC
database AMQ
note over DAO,DB
UNIQUE : policy,typeOrAspect,endpoint
OTHER : active, modified
SORT : modified
end note
Client -> API
API -> PS : registerPolicyEndpoint(policy, typeOrAspect, endpoint)
PS -> DAO : createPolicyEndpoint(policy, typeOrAspect, endpoint)
DAO -> DB : INSERT
PS <-- DAO : success
PS -> PER : reload(fromTime)
PER -> DAO : getPolicyEndpoints(fromTime)
loop each policy endpoint registration change
PER -> PER
end
PS <-- PER : success
API <-- PS : success
Client <-- API : OK
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -0,0 +1,48 @@
@startuml
Title: Policies: Reload Policy Endpoints (V5.2 Proposal)
skinparam componentStyle uml2
participant "Quartz"
participant "PolicyCheckJob" as PCJ
participant "PolicyEndpointRegistry" as PER
participant "QueuedBehaviour" as QB
participant "PolicyEndpointDAO" as DAO
database DB
participant "PolicyComponent" as PC
database AMQ
== Static Route Initialization ==
activate PER
PER -> QB: new
activate PER
PER -> PER: from("direct:policy")
PER -> PER: dynamicRouter(method(PolicyEndpointRegistry.class, "slip"))
deactivate PER
deactivate PER
== Quartz ==
note over DAO,DB
UNIQUE : policy,typeOrAspect,endpoint
OTHER : active, modified
SORT : modified
end note
Quartz -> PCJ
PCJ -> PER : reload(fromTime)
PER -> DAO : getPolicyEndpoints(fromTime)
DAO -> DB: SELECT(fromTime)
DAO <-- DB
PER <-- DAO
loop each policy endpoint registration change
PER -> PER: updateRegistrations(PolicyEndpoint)
PER -> PC: bindClassBehaviour(policy,typeOrAspect, behaviour)
end
PCJ <-- PER : success
Quartz <-- PCJ : success
@enduml