|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rapla.facade.RaplaComponent
public class RaplaComponent
Base class for most components. Eases
access to frequently used services, e.g. I18nBundle
.
Field Summary | |
---|---|
protected I18nBundle |
childBundle
|
Constructor Summary | |
---|---|
RaplaComponent(RaplaContext context)
|
Method Summary | |
---|---|
boolean |
canModify(Object object)
returns if the current user is allowed to modify the object. |
boolean |
canUserAllocateSomething(User user)
returns if the user has allocation rights for one or more resource |
protected void |
checkServiceState()
|
PluginDescriptor |
findDescriptor(String pluginClassName)
|
protected AppointmentFormater |
getAppointmentFormater()
lookup AppointmentFormater from the serviceManager |
String |
getChildBundleName()
|
protected ClientFacade |
getClientFacade()
|
protected Container |
getContainer()
|
protected RaplaContext |
getContext()
|
protected I18nBundle |
getI18n()
lookup I18nBundle from the serviceManager |
ImageIcon |
getIcon(String key)
calls getI18n().getIcon(key) |
protected Locale |
getLocale()
|
protected Logger |
getLogger()
|
protected ModificationModule |
getModification()
lookup ModificationModule from the serviceManager |
String |
getName(Object object)
returns a translation for the object name into the selected language. |
protected PeriodModel |
getPeriodModel()
lookup PeriodModel from the serviceManager |
protected QueryModule |
getQuery()
lookup QueryModule from the serviceManager |
protected RaplaLocale |
getRaplaLocale()
lookup RaplaLocale from the context |
protected Object |
getService(String role)
lookup the service in the serviceManager under the specified key: serviceManager.lookup(role). |
String |
getString(String key)
calls getI18n().getString(key) |
String |
getStringAsHTML(String key)
calls "<html>" + getI18n().getString(key) + "</html>" |
protected UpdateModule |
getUpdateModule()
lookup UpdateModule from the serviceManager |
protected User |
getUser()
|
protected UserModule |
getUserModule()
lookup UserModule from the serviceManager |
boolean |
isAdmin()
returns if the session user is admin |
boolean |
isModifyPreferencesAllowed()
|
boolean |
isRegisterer()
returns if the session user is a registerer |
Preferences |
newEditablePreferences()
|
void |
setChildBundleName(String childBundleName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected I18nBundle childBundle
Constructor Detail |
---|
public RaplaComponent(RaplaContext context) throws RaplaException
RaplaException
Method Detail |
---|
public String getChildBundleName()
public void setChildBundleName(String childBundleName)
protected Container getContainer() throws RaplaException
RaplaException
protected void checkServiceState()
public boolean isAdmin()
public boolean isRegisterer()
public boolean isModifyPreferencesAllowed()
public boolean canUserAllocateSomething(User user) throws RaplaException
RaplaException
public boolean canModify(Object object)
protected User getUser() throws RaplaException
RaplaException
protected Logger getLogger()
protected Object getService(String role)
IllegalStateException
- if GUIComponent wasn't serviced. No service method called
UnsupportedOperationException
- if service not available.protected RaplaContext getContext()
protected RaplaLocale getRaplaLocale()
protected Locale getLocale()
protected I18nBundle getI18n()
protected AppointmentFormater getAppointmentFormater()
protected PeriodModel getPeriodModel()
protected QueryModule getQuery()
protected ClientFacade getClientFacade()
protected ModificationModule getModification()
protected UpdateModule getUpdateModule()
protected UserModule getUserModule()
public String getName(Object object)
public String getString(String key)
public String getStringAsHTML(String key)
public ImageIcon getIcon(String key)
public Preferences newEditablePreferences() throws RaplaException
RaplaException
public PluginDescriptor findDescriptor(String pluginClassName) throws RaplaException
RaplaException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |