diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2013-12-12 14:13:36 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2013-12-12 14:13:36 +0100 |
| commit | 428d828ca640d1348979f9982d1c0bc0a489a3b4 (patch) | |
| tree | a40b0f8fa46942f5e9d4c805a4df724ee5a5aa6b /src/main/java/com/c2kernel/entity/proxy | |
| parent | d5d65f58e69424d898f88e8304a49f147d4036f6 (diff) | |
Properties preserve and respect the PropertyDescription 'isMutable'
property. This setting prevents the WriteProperty predefined step from
changing the property value when isMutable is false. WriteProperty also
requires the selected property to already exist - they should be created
either during Item instantiation or using AddC2KObject.
LDAPPropertyManager prepends the Property name in its entries with ! if
they are non mutable.
Various places around the kernel that create properties now set the
mutable field.
Fixes #150
Diffstat (limited to 'src/main/java/com/c2kernel/entity/proxy')
| -rw-r--r-- | src/main/java/com/c2kernel/entity/proxy/ItemProxy.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java index ceea6c3..0e6859d 100644 --- a/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java +++ b/src/main/java/com/c2kernel/entity/proxy/ItemProxy.java @@ -79,7 +79,7 @@ public class ItemProxy extends EntityProxy public void setProperty(AgentProxy agent, String name, String value)
throws AccessRightsException,
- PersistencyException
+ PersistencyException, InvalidDataException
{
String[] params = new String[2];
params[0] = name;
@@ -90,9 +90,11 @@ public class ItemProxy extends EntityProxy throw (e);
} catch (PersistencyException e) {
throw (e);
+ } catch (InvalidDataException e) {
+ throw (e);
} catch (Exception e) {
Logger.error(e);
- throw new PersistencyException("Could not store property");
+ throw new PersistencyException("Could not store property", "");
}
}
/**************************************************************************
|
