|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.bus.member.BusMember
org.universAAL.middleware.bus.member.Callee
org.universAAL.middleware.service.ServiceCallee
org.universAAL.support.utils.service.top.UtilEditorCallee
public abstract class UtilEditorCallee
This is an abstract class for those who want to use the typical services of an editor (get, add, change and remove) over an ontological service. Classes extending this abstract class will be ServiceCallees which handle by default these 4 services. Those considering using UtilEditor could take advantage of this class if they want only to handle those 4 typical services profiles and no more.
Field Summary |
---|
Fields inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
busResourceURI, owner, theBus |
Constructor Summary | |
---|---|
UtilEditorCallee(ModuleContext context,
String namespace,
String ontologyURI,
String[] path,
String editedURI)
Default constructor of the class. |
Method Summary | |
---|---|
abstract boolean |
executeAdd(Resource input)
When a ADD service request is received, this method is called automatically. |
abstract boolean |
executeChange(Resource input)
When a CHANGE service request is received, this method is called automatically. |
abstract Resource |
executeGet(Resource input)
When a GET service request is received, this method is called automatically. |
abstract boolean |
executeRemove(Resource input)
When a REMOVE service request is received, this method is called automatically. |
ServiceResponse |
handleCall(ServiceCall call)
The actual service method of the ServiceCallee . |
Methods inherited from class org.universAAL.middleware.service.ServiceCallee |
---|
addNewServiceProfiles, busDyingOut, communicationChannelBroken, getMyID, handleRequest, removeMatchingProfiles |
Methods inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
close, getType, getURI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UtilEditorCallee(ModuleContext context, String namespace, String ontologyURI, String[] path, String editedURI)
context
- The Module Context of uAALnamespace
- The namespace of your server, ending with the character #ontologyURI
- The MY_URI of the class of Service ontology you are going to
implementpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageeditedURI
- The MY_URI of the class of the concept ontology that you want
to manage, which is at the end of the property pathMethod Detail |
---|
public ServiceResponse handleCall(ServiceCall call)
ServiceCallee
ServiceCallee
. It is called
by the bus whenever there is a call that need to be serviced by this
ServiceCallee
.
handleCall
in class ServiceCallee
call
- the call that needs to be serviced.
public abstract Resource executeGet(Resource input)
input
- The Resource object with the instance URI for which the GET is
issued. Take into account that only the instance URI is of
interest here. You can cast it to the right class as you
defined it in the constructor for the managedURI parameter.
public abstract boolean executeAdd(Resource input)
input
- The Resource object to add. You can cast it to the right class
as you defined it in the constructor for the managedURI
parameter.
true
if the addition succeeded.public abstract boolean executeChange(Resource input)
input
- The Resource object to change. It is assumed, although that is
up to the implementation, that the Resource to change already
existed. You can cast it to the right class as you defined it
in the constructor for the managedURI parameter.
true
if the change succeeded.public abstract boolean executeRemove(Resource input)
input
- The Resource object to remove. Take into account that only the
instance URI is of interest here. It is assumed, although that
is up to the implementation, that the Resource to remove
already existed. You can cast it to the right class as you
defined it in the constructor for the managedURI parameter.
true
if the removal succeeded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |