mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
8371: Merged V2.1 to V2.2 8307: Next round of fixes for session management. 8309: Fixed AR-1891: Long MLText strings fail in Oracle 8313: Fix for case where existing MLText entry is null 8319: Follow-up fix for NPE where StringValue is null when persisting 8331: Fix for AR-1696: Long text in an aspect property causes an exception git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,19 +25,13 @@
|
||||
|
||||
package org.alfresco.repo.attributes;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.alfresco.repo.domain.DbAccessControlList;
|
||||
|
||||
/**
|
||||
* Value based non-persistent implementation of Attribute.
|
||||
* @author britt
|
||||
*/
|
||||
public abstract class AttributeValue implements Attribute
|
||||
public abstract class AttributeValue extends AbstractAttribute implements Attribute
|
||||
{
|
||||
/**
|
||||
* ACL for this Attribute
|
||||
@@ -55,292 +49,14 @@ public abstract class AttributeValue implements Attribute
|
||||
{
|
||||
fACL = acl;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#clear()
|
||||
*/
|
||||
public void clear()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a Map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#entrySet()
|
||||
*/
|
||||
public Set<Entry<String, Attribute>> entrySet()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a Map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#get(java.lang.String)
|
||||
*/
|
||||
public Attribute get(String key)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a Map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getBlobValue()
|
||||
*/
|
||||
public byte[] getBlobValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a Blob.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getBooleanValue()
|
||||
*/
|
||||
public boolean getBooleanValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a boolean.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getByteValue()
|
||||
*/
|
||||
public byte getByteValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a byte.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getDoubleValue()
|
||||
*/
|
||||
public double getDoubleValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a double.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getFloatValue()
|
||||
*/
|
||||
public float getFloatValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a float.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getIntValue()
|
||||
*/
|
||||
public int getIntValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not an int.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getLongValue()
|
||||
*/
|
||||
public long getLongValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a long.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getSerializableValue()
|
||||
*/
|
||||
public Serializable getSerializableValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a Serializable.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getShortValue()
|
||||
*/
|
||||
public short getShortValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a short.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getStringValue()
|
||||
*/
|
||||
public String getStringValue()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a String.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#keySet()
|
||||
*/
|
||||
public Set<String> keySet()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#put(java.lang.String, org.alfresco.repo.attributes.Attribute)
|
||||
*/
|
||||
public void put(String key, Attribute value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#remove(java.lang.String)
|
||||
*/
|
||||
public void remove(String key)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setBlobValue(byte[])
|
||||
*/
|
||||
public void setBlobValue(byte[] value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a Blob.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setBooleanValue(boolean)
|
||||
*/
|
||||
public void setBooleanValue(boolean value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a boolean.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setByteValue(byte)
|
||||
*/
|
||||
public void setByteValue(byte value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a byte.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setDoubleValue(double)
|
||||
*/
|
||||
public void setDoubleValue(double value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a double.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setFloatValue(float)
|
||||
*/
|
||||
public void setFloatValue(float value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a float.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setIntValue(int)
|
||||
*/
|
||||
public void setIntValue(int value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not an int.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setLongValue(long)
|
||||
*/
|
||||
public void setLongValue(long value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a long.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setSerializableValue(java.io.Serializable)
|
||||
*/
|
||||
public void setSerializableValue(Serializable value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a Serializable.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setShortValue(short)
|
||||
*/
|
||||
public void setShortValue(short value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a short.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setStringValue(java.lang.String)
|
||||
*/
|
||||
public void setStringValue(String value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a String.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#values()
|
||||
*/
|
||||
public Collection<Attribute> values()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#getAcl()
|
||||
*/
|
||||
public DbAccessControlList getAcl()
|
||||
{
|
||||
return fACL;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#setAcl(org.alfresco.repo.domain.DbAccessControlList)
|
||||
*/
|
||||
public void setAcl(DbAccessControlList acl)
|
||||
{
|
||||
fACL = acl;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#add(org.alfresco.repo.attributes.Attribute)
|
||||
*/
|
||||
public void add(Attribute attr)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a List.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#add(int, org.alfresco.repo.attributes.Attribute)
|
||||
*/
|
||||
public void add(int index, Attribute attr)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a List.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#iterator()
|
||||
*/
|
||||
public Iterator<Attribute> iterator()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a List.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#size()
|
||||
*/
|
||||
public int size()
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a List or Map.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#get(int)
|
||||
*/
|
||||
public Attribute get(int index)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a List.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#remove(int)
|
||||
*/
|
||||
public void remove(int index)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a List.");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.attributes.Attribute#set(int, org.alfresco.repo.attributes.Attribute)
|
||||
*/
|
||||
public void set(int index, Attribute value)
|
||||
{
|
||||
throw new AttributeMethodNotImplemented("Not a List.");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user