Issue Type: Bug Bug
Affects Versions: 1.0
Assignee: Tomohisa igarashi
Components: core
Created: 24/May/13 8:40 AM
Description:

Introduction of PolicyFactory has broken support for introducing custom policy types, specifically this method:
https://github.com/jboss-switchyard/core/commit/5c6a00e346ade61d267635fe383aa4782fd7f847#L4R47

We need to add a new type to the PolicyType enum called CUSTOM. The code in PolicyFactory which performs a lookup needs to return the CUSTOM type if policy name is not found in the _policies list.

The implementation of Policy for CUSTOM should be straightforward with the exception of the getType() method. This method appears to be used exclusively in our validation logic and I think it's going to be problematic for this use case. Returning null seems a bit hacky, as does adding a type of BOTH. Is the getType() method really necessary? If we need to keep something like PolicyType around, I suggest we change the method on policy to something like:

boolean supports(PolicyType type);

The existing calls to policy.getType() == PolicyType.INTERACTION can be changed to policy.supports(PolicyType.INTERACTION).

Fix Versions: 1.0
Project: SwitchYard
Priority: Blocker Blocker
Reporter: Keith Babo
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira