public interface TR069Connector
The connector uses a Dmt Session from the caller, which is given when the connector is created. The connector does not implement the exact RPCs but only provides the basic functions to set and get the parameters of an object as well as adding and deleting an object in a table. A TR-069 developer must still parse the XML, handle the relative and absolute path issues, open a Dmt Session etc.
The connector assumes that each parameter or object path is relative to the root of the Dmt Session.
This connector must convert the TR-069 paths to Dmt Admin URIs. This
conversion must take into account the LIST
and MAP
concepts
defined in the specifications as well as the synthetic parameters
NumberOfEntries
and Alias
. These concepts define the use of
an InstanceId
node that must be used by the connector to provide a
TR-069 table view on the LIST
and MAP
nodes.
Modifier and Type | Field and Description |
---|---|
static String |
PREFIX
The MIME type prefix.
|
static int |
TR069_BASE64
Constant representing the TR-069 base64 type.
|
static int |
TR069_BOOLEAN
Constant representing the TR-069 boolean type.
|
static int |
TR069_DATETIME
Constant representing the TR-069 date time type.
|
static int |
TR069_DEFAULT
Constant representing the default or unknown type.
|
static int |
TR069_HEXBINARY
Constant representing the TR-069 hex binary type.
|
static int |
TR069_INT
Constant representing the TR-069 integer type.
|
static int |
TR069_LONG
Constant representing the TR-069 long type.
|
static String |
TR069_MIME_BASE64
Constant representing the TR-069 base64 type.
|
static String |
TR069_MIME_BOOLEAN
Constant representing the TR-069 boolean type.
|
static String |
TR069_MIME_DATETIME
Constant representing the TR-069 date time type.
|
static String |
TR069_MIME_DEFAULT
Constant representing the default or unknown type.
|
static String |
TR069_MIME_EAGER
Constant representing the TR-069 eager type.
|
static String |
TR069_MIME_HEXBINARY
Constant representing the TR-069 hex binary type.
|
static String |
TR069_MIME_INT
Constant representing the TR-069 integer type.
|
static String |
TR069_MIME_LONG
Constant representing the TR-069 long type.
|
static String |
TR069_MIME_STRING
Constant representing the TR-069 string type.
|
static String |
TR069_MIME_STRING_LIST
Constant representing the TR-069 string list type.
|
static String |
TR069_MIME_UNSIGNED_INT
Constant representing the TR-069 unsigned integer type.
|
static String |
TR069_MIME_UNSIGNED_LONG
Constant representing the TR-069 unsigned long type.
|
static int |
TR069_STRING
Constant representing the TR-069 string type.
|
static int |
TR069_UNSIGNED_INT
Constant representing the TR-069 unsigned integer type.
|
static int |
TR069_UNSIGNED_LONG
Constant representing the TR-069 unsigned long type.
|
Modifier and Type | Method and Description |
---|---|
String |
addObject(String path)
Add a new node to the Dmt Admin as defined by the AddObject RPC.
|
void |
close()
Close this connector.
|
void |
deleteObject(String objectPath)
Delete an object from a table.
|
Collection<ParameterInfo> |
getParameterNames(String objectOrTablePath,
boolean nextLevel)
Getting the
ParameterInfo objects addressed by path. |
ParameterValue |
getParameterValue(String parameterPath)
Getting a parameter value.
|
void |
setParameterValue(String parameterPath,
String value,
int type)
Setting a parameter.
|
String |
toPath(String uri)
Convert a Dmt Session relative Dmt Admin URI to a valid TR-069 path,
either a table, object, or parameter path depending on the structure of
the DMT.
|
String |
toURI(String name,
boolean create)
Convert a TR-069 path to a Dmt Session relative Dmt Admin URI.
|
static final String PREFIX
static final String TR069_MIME_DEFAULT
static final String TR069_MIME_INT
static final String TR069_MIME_UNSIGNED_INT
static final String TR069_MIME_LONG
static final String TR069_MIME_UNSIGNED_LONG
static final String TR069_MIME_STRING
static final String TR069_MIME_STRING_LIST
static final String TR069_MIME_BOOLEAN
static final String TR069_MIME_BASE64
static final String TR069_MIME_HEXBINARY
static final String TR069_MIME_DATETIME
static final String TR069_MIME_EAGER
static final int TR069_DEFAULT
static final int TR069_INT
static final int TR069_UNSIGNED_INT
static final int TR069_LONG
static final int TR069_UNSIGNED_LONG
static final int TR069_STRING
static final int TR069_BOOLEAN
static final int TR069_BASE64
static final int TR069_HEXBINARY
static final int TR069_DATETIME
void setParameterValue(String parameterPath, String value, int type) throws TR069Exception
The connector must attempt to create any missing nodes along the way, creating parent nodes on demand.
If the value of a an Alias node is set then the parent node must be
renamed. For example, if the value of M/X/Alias
is set to
Y
then the node will have a URI of M/Y/Alias
. The value
must not be escaped as the connector will escape it.
parameterPath
- The parameter pathvalue
- A trimmed string value that has the given type. The value
can be in either canonical or lexical representation by TR069.type
- The type of the parameter (TR069_INT
,
TR069_UNSIGNED_INT
,TR069_LONG
,
TR069_UNSIGNED_LONG
,TR069_STRING
,
TR069_DATETIME
,TR069_BASE64
,
TR069_HEXBINARY
, TR069_BOOLEAN
)TR069Exception
- The following fault codes are defined for this
method: 9001, 9002, 9003, 9004, 9005, 9006, 9007, 9008.
TR069Exception.REQUEST_DENIED
TR069Exception.INTERNAL_ERROR
TR069Exception.INVALID_ARGUMENTS
TR069Exception.RESOURCES_EXCEEDED
TR069Exception.INVALID_PARAMETER_NAME
TR069Exception.INVALID_PARAMETER_TYPE
TR069Exception.INVALID_PARAMETER_VALUE
TR069Exception.NON_WRITABLE_PARAMETER
ParameterValue getParameterValue(String parameterPath) throws TR069Exception
getParameterNames(String, boolean)
.
If the parameterPath
ends in NumberOfEntries
then the
method must synthesize the value. The parameterPath
then has a
pattern like (object-path)(table-name)NumberOfEntries
. The
returned value must be an TR069_UNSIGNED_INT
that contains the
number of child nodes in the table (object-path)(table-name)
. For
example, if A.B.CNumberOfEntries
is requested the return value
must be the number of child nodes under A/B/C
.
If the value of a an Alias
node is requested then the name of the
parent node must be returned. For example, if the path is
M.X.Alias
then the returned value must be X
.
The connector must attempt to create any missing nodes along the way, creating parent nodes on demand.
parameterPath
- A parameter path (must refer to a valid parameter,
not an object or table).ParameterValueStruct
.TR069Exception
- The following fault codes are defined for this
method: 9001, 9002, 9003, 9004, 9005.
Collection<ParameterInfo> getParameterNames(String objectOrTablePath, boolean nextLevel) throws TR069Exception
ParameterInfo
objects addressed by path. This method
is intended to be used to implement the GetParameterNames RPC.
The connector must attempt to create any missing nodes that are needed
for the objectOrTablePath
by using the
toURI(String, boolean)
method with true
.
This method must traverse the sub-tree addressed by the path and return
the paths to all the objects, tables, and parameters in that tree. If the
nextLevel argument is true
then only the children object, table,
and parameter information must be returned.
The returned ParameterInfo
objects must be usable to discover the
sub-tree.
If the child nodes have an InstanceId
node then the returned
names must include the InstanceId
values instead of the node
names.
If the parent node is a MAP
, then the synthetic Alias
parameter must be included.
Any MAP
and LIST
node must include a
ParameterInfo
for the corresponding NumberOfEntries
parameter.
objectOrTablePath
- A path to an object or table.nextLevel
- If true
consider only the children of the object
or table addressed by path
, otherwise include the whole
sub-tree, including the addressed object or table.ParameterInfo
objects representing the
resulting child parameter, objects, and tables as defined by the
TR-069 ParameterInfoStruct
.TR069Exception
- If the fault is caused by an invalid ParameterPath
value, the Invalid Parameter Name fault code (9005) MUST be used
instead of the more general Invalid Arguments fault code (9003).
A ParameterPath value must be considered invalid if it is not an
empty string and does not exactly match a parameter or object
name currently present in the data model. If nextLevel
is
true
and objectOrTablePath
is a parameter path
rather than an object/table path, the method must return a fault
response with the Invalid Arguments fault code (9003). If the
value cannot be gotten for some reason, this method can generate
the following fault codes::
String addObject(String path) throws TR069Exception
LIST
or MAP
node as no
other nodes can accept new children.
If the path ends in an alias ([ ALIAS ]
) then the node name must
be the alias, however, no new node must be created. Otherwise, the
Connector must calculate a unique instance id for the new node name that
follows the TR-069 rules for instance ids. That is, this id must not be
reused and must not be in use. That is, the id must be reserved
persistently.
If the LIST
or MAP
node has a Meta Node with a MIME type
application/x-tr-069-eager then the node must be immediately created.
Otherwise no new node must be created, this node must be created when the
node is accessed in a subsequent RPC.
The alias name or instance id must be returned as identifier for the ACS.
path
- A table path with an optional alias at the endTR069Exception
- The following fault codes are defined for this
method: 9001, 9002, 9003, 9004, 9005. If an AddObject request
would result in exceeding the maximum number of such objects
supported by the CPE, the CPE MUST return a fault response with
the Resources Exceeded (9004) fault code.void deleteObject(String objectPath) throws TR069Exception
objectPath
- The path to an object in a table to be deleted.TR069Exception
- The following fault codes are defined for this
method: 9001, 9002, 9003, 9005. If the fault is caused by an
invalid objectPath value, the Invalid Parameter Name fault code
(9005) must be used instead of the more general Invalid Arguments
fault code (9003). A missing node for objectPath
must be
ignored.String toPath(String uri) throws TR069Exception
LIST
, MAP
, Alias
, and InstanceId
nodes.uri
- A Dmt Session relative URITR069Exception
- If there is an errorString toURI(String name, boolean create) throws TR069Exception
LIST
,
MAP
, InstanceId
node semantics.
The synthetic Alias
or NumberOfEntries
parameter cannot
be mapped and must throw an TR069Exception.INVALID_PARAMETER_NAME
.
The returned path is properly escaped for TR-069.
The mapping from the path to a URI requires support from the meta data in
the DMT, it is not possible to use a mapping solely based on string
replacements. The translation takes into account the semantics of the MAP
and LIST nodes. If at a certain point a node under a MAP
node
does not exist then the Connector can create it if the create
flag is set to true
. Otherwise a non-existent node will terminate
the mapping.
name
- A TR-069 pathcreate
- If true
, create missing nodes when they reside
under a MAP or LISTTR069Exception
- If there is an errorvoid close()
Copyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0