ContentWrapper expects requires AbstractContent to work properly
----------------------------------------------------------------
Key: MAGNOLIA-3054
URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3054
Project: Magnolia
Issue Type: Improvement
Components: core
Affects Versions: 4.3 M1
Reporter: Jan Haderka
Assignee: Philipp Bärfuss
{{AbstractContent}} defines {code}
abstract public NodeData getNodeData(String name, int type) throws
AccessDeniedException, RepositoryException;
{code}
method that all extending classes need to implement and {{ContentWrapper}}
implements this method as well, undiscriminatelly casting {{Content}} returned
by {code}
public Content getWrappedContent();
{code} method into {{AbstractContent}}.
Since the content wrapper is used to wrap all sorts of content in Magnolia
making it actually mandatory for all {{Content}} implementations to extend
{{AbstractContent}} the abstract method above should be declared in the
{{Content}} interface directly or the {{ContentWrapper}} init method should be
changed to accept only objects extending {{AbstractContent}} rather then those
implementing {{Content}}.
For example the easymock objects created against {{Content}} interface
obviously fail to be casted into {{AbstractContent}}.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------