Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sapphire-dev] Validate a ValueProperty

I need to validate a value against its ValueProperty. I found the following way:

ICachingScheme newScheme = scheme.getModelElementType().instantiate(); newScheme.resource().binding((ValueProperty)property).write(value);
                                newScheme.refresh(property);
Value<?> newValue = newScheme.read((ValueProperty)property);
                                return newValue.validate();

This seems to work, except there is a @DependsOn() annotation in another property which caused the following error:

ERROR : Invalid model path "CachingSchemes/SchemeName" evaluated on oracle.eclipse.tools.coherence.descriptors.cacheConfig.IPagedExternalScheme.

First of all, I'm not sure if instantiating an in-memory ModelElement is the right approach. If it is, Is there a way a suppress the error message in the in-memory case?

Thanks!


Back to the top