|
Knopflerfish OSGi 1.3.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knopflerfish.util.metatype.OCD
Implementation of the ObjectClassDefinition interface.
Field Summary |
Fields inherited from interface org.osgi.service.metatype.ObjectClassDefinition |
ALL, OPTIONAL, REQUIRED |
Constructor Summary | |
OCD(java.lang.String id,
java.lang.String name,
java.lang.String desc)
Create a new, empty ObjectClassDefinition. |
|
OCD(java.lang.String id,
java.lang.String name,
java.lang.String desc,
java.util.Dictionary props)
Creates an OCD with attribute definitions from an existing dictionary. |
Method Summary | |
void |
add(AttributeDefinition attr,
int filter)
Add an attribute definition |
AttributeDefinition[] |
getAttributeDefinitions(int filter)
Return the attribute definitions. |
java.lang.String |
getDescription()
Get description of OCD. |
java.io.InputStream |
getIcon(int size)
Get icon stream using the getIconURL URL. |
java.lang.String |
getIconURL()
Get URL to icon data |
java.lang.String |
getID()
Return the id of this object class. |
int |
getMaxInstances()
Get maximum number of instances. |
java.lang.String |
getName()
Return the name of this class. |
void |
setIconURL(java.lang.String url)
Set URL to icon |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OCD(java.lang.String id, java.lang.String name, java.lang.String desc)
id
- unique ID of the definition.name
- human-readable name of the definition. If set to
null,
use id as name.desc
- human-readable description of the definition
java.lang.IllegalArgumentException
- if id is public OCD(java.lang.String id, java.lang.String name, java.lang.String desc, java.util.Dictionary props)
id
- unique ID of the definition.name
- human-readable name of the definition. If set to null,
use id as name.desc
- human-readable description of the definitionprops
- set of key value pairs used for attribute definitions.
all entries in props will be set as REQUIRED
atttributes.
java.lang.IllegalArgumentException
- if id is Method Detail |
public void add(AttributeDefinition attr, int filter)
attr
- definition to addfilter
- either OPTIONAL or REQUIRED
Illegalargumentexception
- if filter is not OPTIONAL or REQUIREDpublic AttributeDefinition[] getAttributeDefinitions(int filter)
ObjectClassDefinition
Return a set of attributes. The filter parameter can distinguish between ALL, REQUIRED or the OPTIONAL attributes.
getAttributeDefinitions
in interface ObjectClassDefinition
filter
- ALL, REQUIRED, OPTIONAL
public java.lang.String getDescription()
getDescription
in interface ObjectClassDefinition
public java.io.InputStream getIcon(int size) throws java.io.IOException
getIconURL
URL.
getIcon
in interface ObjectClassDefinition
size
- icon size hint is ignored.
java.io.IOException
public int getMaxInstances()
public void setIconURL(java.lang.String url)
public java.lang.String getIconURL()
public java.lang.String getID()
ObjectClassDefinition
ObjectDefintion objects share a global namespace in the registry. They share this aspect with LDAP/X.500 attributes. In these standards the OSI Object Identifier (OID) is used to uniquely identify object classes. If such an OID exists, (which can be requested at several standard organisations and many companies already have a node in the tree) it can be returned here. Otherwise, a unique id should be returned which can be a java class name (reverse domain name) or generated with a GUID algorithm. Note that all LDAP defined object classes already have an OID associated. It is strongly advised to define the object classes from existing LDAP schemes which will give the OID for free. Many such schemes exist ranging from postal addresses to DHCP parameters.
getID
in interface ObjectClassDefinition
public java.lang.String getName()
ObjectClassDefinition
getName
in interface ObjectClassDefinition
public java.lang.String toString()
|
Knopflerfish OSGi 1.3.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |