|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.Channel
public class Channel
The Channel singleton is the main access point of the JCMS API.
This singleton is initialized automatically on startup by the servlet
ChannelInitServlet declared in web.xml.
The following methods of Channel may be useful for your developments in JCMS.
getCommonGroupSet() (Global groups)getWorkspaceSet(Workflow) (Workspace using the given worflow)StoreListener to be informed when Storable are
created, updated or deleted from this site.
ChannelListener to be informed when the site is shutting down.
DataController to control Data integrity,
validation and execution of Data write operation.
RightPolicyFilter to customize behavior
of JCMS for rights.
QueryFilter to customize behavior
of JCMS during search.
AuthenticationHandler to provide other authentication method.
containsProperty(String)getProperty(String)getProperty(String, String)getBooleanProperty(String, boolean)getIntegerProperty(String, int)getLongProperty(String, long)getFloatProperty(String, float)getDoubleProperty(String, double)getStringArrayProperty(String, String[])getIntArrayProperty(String, int[])glp
methods of JcmsUtil.
getLanguageProperties()getChannelProperties()getProperties(String)Files and vice-versa.
Useful for configuration files, uploaded files, file manipulations, etc.
File confFile = new File(channel.getDataPath("conf.xml"));
...
getRealPath(String)getWebappPath()getUploadPath(String)getUploadParentPath()getWebInfPath(String)getDataPath(String)getRelativePath(File)getLucenePath(String) (access with care!)getJaliosPath(String) (access with care!)getJcmsWorkPath(String) (access with care!)
String sender = channel.getSenderFullEmail();
Strint recipient = newMbr.getFullEmail();
String subject = "[" + channel.getName() + "] " + "Welcome!"; // TO DO: I18N
String content = "Welcome " + newMbr.getFriendlyName() + "\nEnjoy our new site!"; // TO DO: I18N
MailUtil.sendMail(sender, recipient, subject, content);
appendMilestone(String)addCleanFilter(CustomCleanFilter)removeCleanFilter(CustomCleanFilter)cleanStore(CleanFilter, JcmsContext)getCleanFilterList()generateLogFromMemory()
| Nested Class Summary | |
|---|---|
class |
Channel.TypeLabelComparator
Sort type according their label in a given language. |
| Fields inherited from interface com.jalios.util.JaliosConstants |
|---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
| Method Summary | ||
|---|---|---|
void |
addAuthenticationHandler(AuthenticationHandler authHandler)
Add the specified AuthenticationHandler to the list of
AuthenticationHandlers used by the AuthenticationManager
to process users' authentication. |
|
void |
addChannelListener(ChannelListener listener)
Adds a ChannelListener. |
|
void |
addCleanFilter(CustomCleanFilter filter)
Adds a custom clean filter. |
|
void |
addDataController(DataController dc,
Class<?> clazz)
Add the given DataController |
|
void |
addDBListener(DBListener listener)
Add a DBListener to listen to all the Data. |
|
void |
addDBListener(DBListener listener,
Class<?> clazz)
Add a DBListener to listen to the given class of data. |
|
void |
addPolicyFilter(PolicyFilter pf)
Add the given PolicyFilter to the list of RightPolicyFilter used by
the PolicyManager (getPolicyManager()). |
|
void |
addPropertiesListener(JPropertiesListener listener)
Adds a properties listener. |
|
void |
addQueryFilter(QueryFilter qf)
Add the given QueryFilter to the list of QueryFilters used by
the QueryManager (getQueryManager()). |
|
void |
addStoreListener(StoreListener listener,
boolean repeat)
Adds a StoreListener for all storable classes. |
|
void |
addStoreListener(StoreListener listener,
Class<?> clazz,
boolean repeat)
Adds a StoreListener associated to a given class. |
|
void |
appendMilestone(String text)
Appends a milestone in the store. |
|
boolean |
canMemberAccessFile(String filename,
Member member)
Check if the given member can access the given file (dangling documents are checked, see checkMemberAccessFile()). |
|
int |
checkMemberAccessFile(String filename,
Member member,
boolean checkDanglingDocument)
Check the access mode the given member has for the given file |
|
void |
cleanStore(CleanFilter filter,
JcmsContext context)
Cleans the store. |
|
void |
clearCurrentServletRequest()
Removes the current servlet request of the thread. |
|
void |
clearCurrentServletResponse()
Removes the current servlet response of the thread. |
|
boolean |
containsProperty(String name)
Tests if this JProperties contains the given property key/name. |
|
void |
createData(Data data,
Member opAuthor)
Creates a data in the store. |
|
String |
crypt(String str)
Encrypt the given string with the encryption algorithm defined by channel.crypt property (default algorithm is Unix crypt) |
|
void |
deleteData(Data data,
Member opAuthor)
Delete a data in the store. |
|
protected static void |
destroy()
Singleton Method to finaliez and destroy the channel. |
|
void |
disableDataWrite(String msg)
Disable data write. |
|
void |
enableDataWrite()
Enable data wirte. |
|
protected void |
finalize()
Handles the finalize invocation |
|
void |
fireChannelFinalize()
Call method ChannelListener.handleFinalize() of every
registered ChannelListener. |
|
void |
generateLogFromMemory()
Generates a cleaned version of the store. |
|
PortalElement |
getAdminNewsletter()
Returns the portlet to use for the newsletter as specified by the id in the property "newsletter.portlet". |
|
Set<Category> |
getAdvRefineRootSet()
Returns the categories to used as roots for the advanced refinement. |
|
AlarmManager |
getAlarmManager(String name)
Returns the AlarmManager associated to the given name. |
|
TreeSet<Data> |
getAllDataSet()
Returns all the data of this site in a new TreeSet. |
|
|
getAllDataSet(Class<T> clazz)
Returns all instances of a given class and it's subclass. |
|
|
getAllPublicationSet(Class<T> clazz,
Member member)
Returns all publications of a given class AND subclasses that can be accessed by a given member and that are in a visible state. |
|
|
getAllPublicationSet(Class<T> clazz,
Member member,
boolean checkPstatus)
Returns all publications of a given class AND subclasses that can be accessed by a given member. |
|
TypeFieldEntry[] |
getAllTypeFieldEntries(Class<?> clazz)
Return an array of TypeFieldEntry bound to given Class. |
|
TypeFieldEntry[] |
getAllTypeFieldEntries(String className)
Return an array of TypeFieldEntry bound to given Class name. |
|
AppServerInfo |
getAppServerInfo()
Return the AppServerInfo instance (a singleton) which describe the underlying application server. |
|
AuthenticationManager |
getAuthMgr()
Returns the current AuthenticationManager instance used by JCMS to authenticate members into JCMS. |
|
boolean |
getBooleanProperty(String name,
boolean defaultValue)
Gets the value of a property as a boolean given its key/name. |
|
CacheManager |
getCacheManager()
|
|
Category |
getCategory(String id)
Returns a category from its id |
|
CategoryRight |
getCategoryRight(HashSet<Category> roots,
int mode,
boolean create)
Returns the CategoryRight matching the given criteria |
|
static Channel |
getChannel()
Singleton Method to get the channel |
|
JProperties |
getChannelProperties()
Returns the internal properties used by channel. |
|
Class |
getClass(String className)
Load and return a class |
|
Class[] |
getClass(String[] clazzStr)
Load and return classes |
|
ClassLoader |
getClassLoader()
Returns the classLoader |
|
String |
getCleanFilename(String filename)
Clean the given filename. |
|
List<CustomCleanFilter> |
getCleanFilterList()
Returns the list of custom clean filters. |
|
AlarmManager |
getCommonAlarmManager()
Returns the common AlarmManager. |
|
Set<Group> |
getCommonGroupSet()
Return all the global groups |
|
ArrayList<Class<? extends Publication>> |
getCoreTypeList()
Returns all the available core publication types (Review, FileDocument, ArchivedPublication...) |
|
Member |
getCurrentDelegateMember()
Returns the original Member of the current session if he has connected to another account since then (using JCMS_sulogin feature). |
|
JcmsContext |
getCurrentJcmsContext()
Returns the JcmsContext of the current servlet request of the current thread. |
|
Member |
getCurrentLoggedMember()
Returns the Member currently loggued in for the current request. |
|
javax.servlet.http.HttpServletRequest |
getCurrentServletRequest()
Returns the current servlet request. |
|
javax.servlet.http.HttpServletResponse |
getCurrentServletResponse()
Returns the current servlet response. |
|
String |
getCurrentUserLang()
Returns the user language if it is available (i.e. if called during a user request). |
|