* @return true if the user is logged offline and it has not been online previously. False in other case (user not logged, user logged online, user offline but it was previously online logged
* @return true if the user is logged offline and it has not been online previously. False in
* other case (user not logged, user logged online, user offline but it was previously online
* logged
*/
publicstaticbooleanis_user_offline(){
returnpcbdb==null?false//no hay usuario aun
:!getPcbdb().isUser_online();
if(pcbdb==null){
returnfalse;
}else{
return!getPcbdb().isUser_online();
}
}
publicstaticbooleanis_user_online(){
returnpcbdb!=null&&getPcbdb().isUser_online();
}
// Return the context
// modified by Fernando
publicstaticContextgetContext(){if(context==null)thrownewjava.lang.NullPointerException("Context is null. PCBcontext.init must be invoked previously");returncontext;}
// Return the device
// modified by Fernando
publicstaticDevicegetDevice(){if(device==null)thrownewjava.lang.NullPointerException("Device is null. PCBcontext.init must be invoked previously");returndevice;}
/**
* @return context
* @TODO complete documentation
*/
publicstaticContextgetContext(){
if(context==null){
thrownewjava.lang.NullPointerException("Context is null. PCBcontext.init must be"+
"invoked previously");
}
returncontext;
}
// Return the PCBDB
// modified by Fernando
publicstaticPCBDBHelpergetPcbdb(){if(context==null)thrownewjava.lang.NullPointerException("PCBDB is null. PCBcontext.set_user must be invoked previously");returnpcbdb;}
/**
* @return device
* @TODO complete documentation
*/
publicstaticDevicegetDevice(){
if(device==null){
thrownewjava.lang.NullPointerException("Device is null. PCBcontext.init must be"+
"invoked previously");
}
returndevice;
}
// Return the NetService
// modified by Fernando
publicstaticNetServicegetNetService(){if(service==null)thrownewjava.lang.NullPointerException("NetService is null. PCBcontext.set_user must be invoked previously");returnservice;}
/**
* @return PCBDB
* @TODO complete documentation
*/
publicstaticPCBDBHelpergetPcbdb(){
if(context==null){
thrownewjava.lang.NullPointerException("PCBDB is null. PCBcontext.set_user must be"+
"invoked previously");
}
returnpcbdb;
}
// Return the RestapiWrapper
// modified by Fernando
publicstaticRestapiWrappergetRestapiWrapper(){if(wrapper==null)thrownewjava.lang.NullPointerException("RestapiWrapper is null. PCBcontext.init must be invoked previously");returnwrapper;}
/**
* @return NetService
* @TODO complete documentation
*/
publicstaticNetServicegetNetService(){
if(service==null){
thrownewjava.lang.NullPointerException("NetService is null. PCBcontext.set_user"+
"must be invoked previously");
}
returnservice;
}
// Return the Room
// modified by Fernando
publicstaticRoomgetRoom(){if(room==null)thrownewjava.lang.NullPointerException("Room is null. PCBcontext.set_user must be invoked previously");returnroom;}
/**
* @return RestapiWrapper
* @TODO complete documentation
*/
publicstaticRestapiWrappergetRestapiWrapper(){
if(wrapper==null){
thrownewjava.lang.NullPointerException("RestapiWrapper is null. PCBcontext.init"+
"must be invoked previously");
}
returnwrapper;
}
/**
* @return Room
* @TODO complete documentation
*/
publicstaticRoomgetRoom(){
if(room==null){
thrownewjava.lang.NullPointerException("Room is null. PCBcontext.set_user must"+
"be invoked previously");
}
returnroom;
}
// Return the Vocabulary
// modified by Fernando
publicstaticVocabularygetVocabulary(){if(vocabulary==null)thrownewjava.lang.NullPointerException("Vocabulary is null. PCBcontext.set_user must be invoked previously");returnvocabulary;}
/**
* @return Vocabulary
* @TODO complete documentation
*/
publicstaticVocabularygetVocabulary(){
if(vocabulary==null){
thrownewjava.lang.NullPointerException("Vocabulary is null. PCBcontext.set_user"+
"must be invoked previously");
}
returnvocabulary;
}
// Return the ActionLog
// modified by Fernando
publicstaticActionLoggetActionLog(){if(actionLog==null)thrownewjava.lang.NullPointerException("ActionLog is null. PCBcontext.set_user must be invoked previously");returnactionLog;}
/**
* @return ActionLog
* @TODO complete documentation
*/
publicstaticActionLoggetActionLog(){
if(actionLog==null){
thrownewjava.lang.NullPointerException("ActionLog is null. PCBcontext.set_user"+