on 04-08-2015 11:12 AM
I defined own restriction called MyStoreTypeRestriction like below.
but, I got a error when I ant clean all. [yjavac] 1. ERROR in D:\xxxx\my-hybris\extensions\my\mycore\src\com\my\cms2\jalo\restrictions\MyStoreTypeRestriction.java (at line 9) [yjavac] public class MyStoreTypeRestriction extends GeneratedMyStoreTypeRestriction [yjavac] ^^^^^^^^^^^^^^^^^^^^^^^^ [yjavac] The type MyStoreTypeRestriction must implement the inherited abstract method AbstractRestriction.getDescription(SessionContext) [yjavac] ---------- [yjavac] ---------- [yjavac] 2. ERROR in D:\xxxx\my-hybris\extensions\my\mycore\src\com\my\core\jalo\MyStoreTypeRestriction.java (at line 9) [yjavac] public class MyStoreTypeRestriction extends GeneratedmyStoreTypeRestriction [yjavac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [yjavac] GeneratedmyStoreTypeRestriction cannot be resolved to a type [yjavac] ---------- [yjavac] 3. ERROR in D:\xxxx\my-hybris\extensions\my\mycore\src\com\my\core\jalo\MyStoreTypeRestriction.java (at line 15) [yjavac] protected Item createItem(final SessionContext ctx, final ComposedType type, final ItemAttributeMap allAttributes) throws JaloBusinessException [yjavac] ^^^^^^^^^^^^^^^^ [yjavac] ItemAttributeMap cannot be resolved to a type [yjavac] ---------- [yjavac] ---------- [yjavac] 4. ERROR in D:\xxxx\my-hybris\extensions\my\mycore\src\de\hybris\platform\cms2\jalo\restrictions\MyStoreTypeRestriction.java (at line 22) [yjavac] public class MyStoreTypeRestriction extends GeneratedMyStoreTypeRestriction [yjavac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [yjavac] GeneratedMyStoreTypeRestriction cannot be resolved to a type [yjavac] ---------- [yjavac] 5. ERROR in D:\xxxx\my-hybris\extensions\my\mycore\src\de\hybris\platform\cms2\jalo\restrictions\MyStoreTypeRestriction.java (at line 28) [yjavac] protected Item createItem(final SessionContext ctx, final ComposedType type, final ItemAttributeMap allAttributes) throws JaloBusinessException [yjavac] ^^^^^^^^^^^^^^^^ [yjavac] ItemAttributeMap cannot be resolved to a type [yjavac] ----------
pls, suggest how to resolve these errors, thanks.
I guess this doesn't work even if the method is added because the file will be overwritten every time on the build and the method will be removed. Please validate if my understanding is correct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
problem:
must implement the inherited abstract method AbstractRestriction.getDescription(SessionContext)
For now as a workaround you could just add the get description method to the jalo class:
public class CMSProductDeliverableRestriction extends GeneratedCMSProductDeliverableRestriction
{
@SuppressWarnings("unused")
private static final Logger LOG = Logger.getLogger( CMSProductDeliverableRestriction.class.getName() );
@Override
protected Item createItem(final SessionContext ctx, final ComposedType type, final ItemAttributeMap allAttributes) throws JaloBusinessException
{
// business code placed here will be executed before the item is created
// then create the item
final Item item = super.createItem( ctx, type, allAttributes );
// business code placed here will be executed after the item was created
// and return the item
return item;
}
/**
* @paessionContext
* @deprecated
*/
@Override
public String getDescription(SessionContext sessionContext) {
return Localization.getLocalizedString("type.CMSProductDeliverableRestriction.description.text");
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
me too,have you solved the problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.