/**
* Invoked by the XML loading framework when the object is deserialized.
*/
private void loadAttributeSets(ResourceLookup resourceLookup) throws Exception
{
attributeSets = new AttributeValueSets();
IResource resource = null;
if (!StringUtils.isBlank(attributeSetsResource))
{
// Try to load from the directly provided resource name
resource = resourceLookup.getFirst(attributeSetsResource);
if (resource == null)
{
throw new IOException("Attribute set resource not found: "
+ attributeSetsResource);
}
}
if (resource != null)
{
final InputStream inputStream = resource.open();
try
{
attributeSets = AttributeValueSets.deserialize(inputStream);
}
finally
{
CloseableUtils.close(inputStream);
}
}
if (getAttributeSets() == null)
{
attributeSets = new AttributeValueSets();
}
}