|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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)
File
s 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()). |
|
boolean |
checkCrypt(String candidate_plaintext,
String stored_hash)
Check a plain text string against an encrypted string previoulsy stored in JCMS. |
|
int |
checkMemberAccessFile(String filename,
Member member,
Set<String> authorizedFilenames)
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)
Hash the specified string with the BCrypt encryption algorithm. |
|
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 .This methods is called when the site is restarted or shutdown. |
|
void |
generateLogFromMemory()
Generates a cleaned version of the store. CAUTION: All operations on deleted data are removed. All update operations are integrated in a new creation operation (except cycling data references which are resolved in a second update step). The previous store is backuped with the extension .bak |
|
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. |
|
Map<String,AlarmManager> |
getAllAlarmManager()
Returns All alarmManager present in the channel |
|
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...) |
|
String |
getCountry()
Retrieve the default country of the site |
|
Member |
getCurrentDelegateMember()
Returns the original Member of the current session if he has connected to another account since then (using JCMS_sulogin feature). Uses DelegationAuthenticationHandler.getSuHistory(HttpServletRequest) .Used by internal method during data creation/update/delete to correctly set the opDelegate field of any Data. This method must be called during a user request to work otherwise it returns null. |
|
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. |
|
Locale |
getCurrentUserLocale()
Returns the user Locale if it is available (i.e. |
|
Collection<Class<?>> |
getCustomExtensionCollection()
Returns all the DataExtension classes. |
|
Map<String,Class<?>> |
getCustomExtensionMap()
Returns the map of String (Class) to data extension (Class). |
|
List |
getCustomTypeList()
Return the list of custom publication types Class, that is all the Publication Class of package "generated.". |
|
|
getData(Class<T> clazz,
String id)
Returns a data from its id. |
|
Data |
getData(String id)
Returns a data from its id |
|
|
getDataAndDBDataIterator(Class<T> clazz)
Returns an iterator on an hybrid list of data stored in the database and JStore. |
|
Map<Class<?>,Set<DataController>> |
getDataControllerMap()
Returns the internal map class/DataController. |
|
Set<DataController> |
getDataControllerSet(Class<?> clazz)
|
|
long |
getDataCount(Class<? extends Data> clazz)
Returns the number of data available for the given class. |
|
Map<Data,ControllerStatus> |
getDataIntegrityReport(boolean refresh)
Checks the integrity constraints of all the data in the store. |
|
Date |
getDataIntegrityReportDate()
Returns the date of the last report generation. |
|
ArrayList<Data> |
getDataList(String[] ids)
Returns the instances associated to an array of ids. |
|
|
getDataList(String[] ids,
boolean ignoreNull,
Class<T> clazz)
Returns the data corresponding to the given array of data ids. |
|
String |
getDataPath(String uri)
Retrieves the file system path of the specified uri relative to the directory /WEB-INF/data/ of the webapp.The returned file path will be in native path format, suitable for use with new File() constructor. |
|
DataRight |
getDataRight(boolean canPublish,
boolean canUpdateOther,
boolean canDeleteOther,
boolean create)
Returns a DataRight matching the given criteria. |
|
|
getDataSet(Class<T> clazz)
Returns all instances of a given class and it's subclass. |
|
TreeSet<?> |
getDataSet(String[] ids)
Returns the instances associated to an array of ids. |
|
|
getDataSet(String[] ids,
Class<? extends T> clazz,
boolean neverNull)
Returns a set of data from an array of idenfiers. |
|
String |
getDataSourceLabel(String dataSource,
String userLang)
Returns the label for the given data source. |
|
SimpleDateFormat |
getDateFormat(String lang)
Retrieve a Date formated suitable for parsing and formatting of date input of JCMS forms. |
|
SimpleDateFormat |
getDateTimeFormat(String lang)
Retrieve a Date formated suitable for parsing and formatting of date & time input of JCMS forms. |
|
DBData |
getDBData(Class<?> clazz,
Long rowId)
Returns a given DBData according its class and it row id. |
|
|
getDBDataIterator(Class<T> clazz)
Returns an iterator on the list of instance for the given class stored in the database. |
|
|
getDBDataList(Class<T> clazz)
Returns all the instance for the given class stored in the database. |
|
|
getDBDataList(Class<T> clazz,
int firstResult,
int maxResults)
Returns all the instance for the given class stored in the database. |
|
List<Class<? extends Publication>> |
getDBPublicationClassList()
Returns the list of Publication subclasses managed by Hibernate. |
|
PageResult<Publication> |
getDBPublicationList(PublicationCriteria pubCriteria)
Returns a list of publications in the database matching the given criteria. |
|
Member |
getDefaultAdmin()
Returns the default admin. |
|
String |
getDefaultEmail()
Returns the default email of the channel get from the property channel.default-email |
|
Group |
getDefaultGroup()
Returns the default group. |
|
String[] |
getDefaultQueryTypes()
Returns the default 'types' attribute to use for query (get from the property query.default.types) |
|
String[] |
getDefaultQueryTypesOff()
Returns the default 'typesOff' attribute to use for query (get from the property query.default.types-off) |
|
Workspace |
getDefaultWorkspace()
Returns the default workspace. |
|
TreeSet<? extends Storable> |
getDeletedSet(Class<? extends Storable> clazz)
Get the latest version of the deleted Data for a given class. |
|
double |
getDoubleProperty(String name,
double defaultValue)
Gets the value of a property as a double value given its key/name. |
|
TreeSet<Data> |
getFileIndexedDataSet(String filename)
Returns the set of data bound to the given filename. |
|
FileIndexManager |
getFileIndexManager()
Return the FileIndexManager singleton instance which
manages Data's links to filename. |
|
ObjectLongTreeMap |
getFileSizeMap(boolean refresh)
Deprecated. since jcms-7.1.0, use getGlobalFileAnalyzer method to have more information about satellites files |
|
Publication |
getFirstPublicationFromTitle(String title)
Returns the first publication with the title in default site language matching the given title. |
|
|
getFirstPublicationSetFromTitle(Class<T> clazz,
String title)
Returns the first publications of the given class with title in default site language matching the given title. |
|
float |
getFloatProperty(String name,
float defaultValue)
Gets the value of a property as a float value given its key/name. |
|
Group |
getGroup(String id)
Returns a group from its id |
|
Group |
getGroupFromDN(String dn)
Returns a LDAP group from its distinguish name. |
|
int |
getHierarchicalWorkspaceLimit()
Returns the hierarchical workspace limit define by property "hierarchical-ws.menu-limit". |
|
int[] |
getIntArrayProperty(String name,
int[] defaultValue)
Gets the value of a property as a int array. |
|
int |
getIntegerProperty(String name,
int defaultValue)
Gets the value of a property as an int value given its key/name. |
|
String |
getJaliosPath(String uri)
Retrieves the file system path of the specified uri relative to the directory /WEB-INF/jalios/ of the webapp.The returned file path will be in native path format, suitable for use with new File() constructor. |
|
JcmsInfo |
getJcmsInfo()
Return a JcmsInfo instance (a singleton) which describe the JCMS version of this channel. |
|
List<String> |
getJcmsLanguageList()
Retrieves all the languages in which JCMS is localized. |
|
String |
getJcmsWorkPath(String uri)
Retrieves the file system path of the specified uri relative to the directory /WEB-INF/jcmswork/ of the webapp.The returned file path will be in native path format, suitable for use with new File() constructor. |
|
org.apache.oro.text.regex.Pattern |
getJSyncIpPattern()
|
|
String |
getJSyncLeaderUrl()
|
|
JSyncPreviousReplicaManager |
getJSyncPreviousReplicaManager()
|
|
JSyncReplica |
getJSyncReplica()
|
|
String |
getJSyncReplicaUrl()
|
|
long |
getJSyncStabDelay()
|
|
String |
getLanguage()
|
|
String |
getLanguageDirection(String lang)
Retrieves the text/table direction to use for the given language. |
|
List<String> |
getLanguageList()
Retrieve all the languages of this channel with the main language as the first one of the list. |
|
List<String> |
getLanguageListOrdered()
Retrieve all the languages of this channel in the exact ordered in which they were specified in the properties. |
|
LangProperties |
getLanguageProperties()
Gets the internal language properties used by channel. As of version 5.5 those properties are the same as getChannelProperties() but may differ in a future revision. |
|
Object[] |
getLangValue(String lang,
boolean useDefault,
Object[] value,
HashMap valueML)
Return a value bound to the given language |
|
Object[] |
getLangValue(String lang,
boolean useDefault,
Object[] value,
HashMap valueML,
String mainLanguage)
Return a value bound to the given language |
|
Object |
getLangValue(String lang,
boolean useDefault,
Object value,
HashMap valueML)
Return a value bound to the given language |
|
Object |
getLangValue(String lang,
boolean useDefault,
Object value,
HashMap valueML,
String mainLanguage)
Return a value bound to the given language |
|
String[] |
getLangValue(String lang,
boolean useDefault,
String[] value,
HashMap valueML)
Return a value bound to the given language |
|
String[] |
getLangValue(String lang,
boolean useDefault,
String[] value,
HashMap valueML,
String mainLanguage)
Return a value bound to the given language |
|
String |
getLangValue(String lang,
boolean useDefault,
String value,
HashMap valueML)
Return a value bound to the given language |
|
String |
getLangValue(String lang,
boolean useDefault,
String value,
HashMap valueML,
String mainLanguage)
Return a value bound to the given language |
|
LDAPConfiguration |
getLDAPConfiguration()
Returns the LDAPConfiguration used by JCMS which you can give to LDAPMapper.LDAPMapper(LDAPConfiguration) to
connect to your LDAP server. |
|
LimitController |
getLimitController()
Returns the LimitController which is in charge to validate license limitations of JCMS. |
|
int |
getLinkCount(Data data)
Returns the number of instances of Data referring the given Data |
|
|
getLinkIndexedDataSet(Data data,
Class<T> clazz)
Returns the Set of Data of the given Class, referring the given data. |
|
|
getLinkIndexedDataSet(Data data,
Class<T> clazz,
String field)
Returns the Set of Data of the given Class, referring the given data with the given field. |
|
LinkIndexManager |
getLinkIndexManager()
Return the LinkIndexManager singleton instance which
manages Data's links on each other. |
|
Locale |
getLocale()
Return the locale of the channel |
|
List<String> |
getLocalizedLanguageList()
Retrieves all the languages specified in the properties in which JCMS is localized. |
|
long |
getLockTimeout()
Return the lock timeout in milliseconds. |
|
long |
getLongProperty(String name,
long defaultValue)
Gets the value of a property as a long value given its key/name. |
|
String |
getLucenePath(String uri)
Retrieves the file system path of the specified uri relative to the directory /WEB-INF/data/lucene/ of the webapp.The returned file path will be in native path format, suitable for use with new File() constructor. |
|
Member |
getMember(String id)
Returns a member from its id |
|
Member |
getMemberFromEmail(String email)
Returns the member with the given email. |
|
Member |
getMemberFromLogin(String login)
Returns the member with the given login. |
|
Member |
getMemberFromLogin(String login,
boolean checkDisabled)
Returns the member with the given login. |
|
LuceneMemberSearchEngine |
getMemberSearchEngine()
Retrieve the singleton instance of the MemberSearchEngine used by JCMS. |
|
MetaDataExtractor |
getMetaDataExtractor(String contentType)
Returns a metadata extractor bound to the given contentType |
|
String |
getName()
Returns the name of the channel |
|
CategoryRight |
getNoCategoryRight()
Returns the CategoryRight which sets edition of cateogry forbidden |
|
NotificationManager |
getNotificationManager()
|
|
PageResult<Publication> |
getNotVisibleDBPublicationList(PublicationCriteria pubCriteria)
Returns a list publications in the database matching the given criteria and not in a visible state. |
|
List<File> |
getOrphanFiles()
Returns the files which are not referenced by any JCMS publication. |
|
List<File> |
getOrphanFiles(boolean searchInDB)
Returns the files which are not referenced by any JCMS publication. |
|
List<File> |
getOrphanFiles(FileFilter filter)
Returns the files which are not referenced by any JCMS publication. |
|
List<File> |
getOrphanFiles(FileFilter filter,
boolean searchInDB)
Returns the files which are not referenced by any JCMS publication. |
|
List<String> |
getOtherLanguageList()
Retrieve all the languages of this channel excepted the main language. |
|
PolicyManager |
getPolicyManager()
Retrieve the singleton instance of the PolicyManager used by JCMS. |
|
LangProperties |
getProperties(String prefix)
Gets a new LangProperties instance containg all the properties whose name starts with the given prefix. |
|
String |
getProperty(String name)
Gets value of a property. |
|
String |
getProperty(String name,
String defaultValue)
Gets the value of a property given its key/name. |
|
Publication |
getPublication(String id)
Returns a publication from its id |
|
|
getPublicationSet(Class<T> clazz,
Member member)
Returns all publications of a given class that can be accessed by a given member and that are in a visible state. |
|
|
getPublicationSet(Class<T> clazz,
Member member,
boolean checkPstatus)
Returns all publications of a given class that can be accessed by a given member. |
|
|
getPublicationSet(Class<T> clazz,
Member member,
boolean checkPstatus,
Workspace workspace)
Returns all publications of a given class that can be accessed by a given member. |
|
|
getPublicationSet(Class<T> clazz,
Member member,
boolean checkPstatus,
Workspace workspace,
boolean searchDB)
|
|
Set<Publication> |
getPublicationSet(Set<Publication> publicationSet,
Workflow wf)
Return a SubSet of all publication using the given workflow |
|
|
getPublicationSet(Set<T> publicationSet,
boolean specialState)
Return a SubSet of publication in or not in special state. |
|
|
getPublicationSetFromTitle(Class<T> clazz,
String title)
Returns all publications of the given class with title in default site language matching the given title. |
|
Set<Publication> |
getPublicationSetFromTitle(String title)
Returns all publications with title in default site language matching the given title. |
|
Set<Publication> |
getPublicationSetFromTitle(String title,
boolean searchInDB)
|
|
Class<?>[] |
getPublicationSuperTypes()
Returns the super publication types (i.e. |
|
List<Class<? extends Publication>> |
getPublicationTypeList()
Returns all the available publication types (sorted on the main language). |
|
List<Class<? extends Publication>> |
getPublicationTypeList(String lang)
Retrieves all the available publication types sorted on the given language. |
|
HashSet<Publication> |
getPublicationWithoutCategories()
Returns all the publications without categories in a new HashSet. |
|
|
getPublishableSubTypeList(Class<T> clazz,
Member member)
Returns all the publication types which extends the giving one and that the given member is allowed to publish and that are not abstract. |
|
QueryManager |
getQueryManager()
Retrieve the singleton instance of the QueryManager used by JCMS. |
|
String |
getRealPath(String uri)
Retrieves the file system path of the specified uri relative to the webapp root folder. The returned file path will be in native path format, suitable for use with new File() constructor. |
|
Set<Category> |
getRefineRootSet()
Returns the categories to used as roots for the refinement. |
|
String |
getRelativePath(File file)
Retrieves a path relative to the webapp root, from a File instance. Example: given a File pointing the folder "C:\tomcat\webapps\ROOT\AnyFolder\MyFileOrFolder" returns "AnyFolder/MyFileOrFolder" . |
|
Category |
getRootCategory()
Returns the root category using the id specified in the property channel.root-category default to j_3 . |
|
Set<Category> |
getRootCategoryAsSet()
A convenient method which returns a set containing the root category |
|
CategoryRight |
getRootCategoryRight()
Returns the CategoryRight allowing edition of all the cateogry |
|
Set<Category> |
getSearchRootSet()
Returns the categories to used as root for the search. |
|
String |
getSecuredBaseUrl(javax.servlet.http.HttpServletRequest request)
Returns the base URL of the given request, modifying it according to the fact that SSL is enabled or not. |
|
String |
getSenderFullEmail()
Retrieves the full email that can be used to send message from JCMS |
|
String |
getSenderFullEmail(Publication pub,
String lang)
Retrieves the full email that can be used to send message from JCMS given a workspace and a language |
|
String |
getSenderFullEmail(Workspace ws,
Publication pub,
String lang)
Retrieves a full email (something "WorkspaceName - the publication's workspace email, "Pub's WorkspaceName - the channel default email,
"Channel Name - last the default admin email, "Default Admin |
|
String |
getSenderFullEmail(Workspace ws,
String lang)
Retrieves the full email that can be used to send message from JCMS given a workspace and a language |
|
javax.servlet.ServletContext |
getServletContext()
Returns the ServletContext used for this site. |
|
Map<String,String> |
getSortedProperties(String prefix)
Returns a Map containing all the properties whose name starts with the given prefix sorted by key. |
|
Map<String,String> |
getSortedProperties(String prefix,
boolean trim)
Returns a Map containing all the properties whose name starts with the given prefix sorted by key. |
|
int |
getSSLport()
|
|
StatReportListener |
getStatReportListener()
Return the StoreListener used to listen to StatReport object modification to
update schedule of Statistics. |
|
Storable |
getStorable(String id)
Returns a storable from its id. |
|
Store |
getStore()
Returns the store. Internal, DO NOT use. |
|
int |
getStoreCreateCount()
Returns the count of create operations recorded in the store. |
|
int |
getStoreDeleteCount()
Returns the count of delete operations recorded in the store. |
|
Map<Class<?>,Set<StoreListener>> |
getStoreListenerClassMap()
Returns the map class/StoreListener. |
|
Set<StoreListener> |
getStoreListenerSet()
Returns the set of StoreListener listening for all data. |
|
LoadReport |
getStoreLoadReport()
Returns the store load report |
|
int |
getStoreSize()
Returns the size of the store (ie the data count) in bytes. |
|
int |
getStoreUpdateCount()
Returns the count of update operations recorded in the store. |
|
String[] |
getStringArrayProperty(String name,
String[] defaultValue)
Gets the value of a property as a String array. |
|
Map<String,Object> |
getSubProperties(String prefix)
|
|
|
getSubTypeList(Class<T> clazz)
Returns a list of the publication types which extends the giving one. |
|
|
getSubTypeList(Class<T> clazz,
String lang)
Returns a list of the publication types which extends the giving one. |
|
Category |
getTagRoot()
Returns the common tag root. |
|
Category |
getTagRoot(Workspace ws)
Returns the tag root for the given workspace if it exists ; otherwise return the common tag root. |
|
TypeFieldEntry |
getTypeAbstractFieldEntry(Class<?> clazz)
Returns the TypeFieldEntry associated to the abstract (summary)
field of the specified type. |
|
String |
getTypeDescription(Class clazz,
String lang)
Returns the description of the given type (class) in the given language. |
|
String |
getTypeDescription(Class clazz,
Workspace workspace,
String lang)
Returns the description of the given type for the given workspace in the given language. |
|
TypeEntry |
getTypeEntry(Class<?> clazz)
Return the TypeEntry bound to given Class . |
|
TypeEntry |
getTypeEntry(String className)
Return the TypeEntry bound to given className . |
|
TypeFieldEntry[] |
getTypeFieldEntries(Class<?> clazz)
Return an array of TypeFieldEntry bound to given Class . |
|
TypeFieldEntry[] |
getTypeFieldEntries(String className)
Return an array of TypeFieldEntry bound to given Class . |
|
TypeFieldEntry |
getTypeFieldEntry(Class<?> clazz,
String fieldName)
Returns the TypeFieldEntry bound to the given field of the given class. |
|
TypeFieldEntry |
getTypeFieldEntry(Class<?> clazz,
String fieldName,
boolean checkAll)
Return the TypeFieldEntry associated to the given Class and fieldName. |
|
String |
getTypeFieldLabel(Class<?> clazz,
String fieldName)
Returns the localized label of the given field of the given class. |
|
String |
getTypeFieldLabel(Class<?> clazz,
String fieldName,
String lang)
Returns the localized label of the given field of the given class. |
|
String |
getTypeFieldLabel(Data data,
String fieldName)
Returns the localized label of the given field of the given data. |
|
String |
getTypeFieldLabel(Data data,
String fieldName,
String lang)
Returns the localized label of the given field of the given data. |
|
String |
getTypeLabel(Class<?> clazz,
String lang)
Returns the label of the given type (class) in the given language. |
|
String |
getTypeLabel(Class<?> clazz,
Workspace workspace,
String lang)
Returns the label of the given type (class) in the given workspace in the given language. |
|
Channel.TypeLabelComparator |
getTypeLabelComparator(String lang)
Retrieves a new instance of a TypeLabelComparator which sorts Class using their TypeProcessor label. |
|
String |
getUploadParentPath()
Returns the path of the directoy that contains the upload directory. |
|
String |
getUploadPath(String uri)
Retrieves the file system path of the specified uri relative to the upload directory of the webapp ( /upload/ ).The returned file path will be in native path format, suitable for use with new File() constructor. |
|
String |
getUrid()
Returns the urid of the channel |
|
String |
getUrl()
Returns the Url of the channel. |
|
String |
getUsedLanguage(Data data,
String fieldName,
String lang)
Retrieve the language code really used if the field of the given publication is requested in the given language. |
|
List<? extends Storable> |
getVersionList(Data data)
Get all the version of a given Data. |
|
List<? extends Storable> |
getVersionList(String id)
Get all the version of a Data, given its id. |
|
String |
getVirtualID(Data data)
Returns the virtual ID bound to the given data (or null if it does not exist). |
|
PageResult<Publication> |
getVisibleDBPublicationList(PublicationCriteria pubCriteria)
Returns a list publications in the database matching the given criteria and in a visible state. |
|
int[] |
getVisiblePstatus()
Returns the default (aka visible) pstatus attribute to use for query (get from the property query.default.pstatus) |
|
String |
getWebappPath()
Retrieves the file system path of the webapp root. |
|
String |
getWebInfPath(String uri)
Retrieves the file system path of the specified uri relative to the directory /WEB-INF/ of the webapp.The returned file path will be in native path format, suitable for use with new File() constructor. |
|
Workspace |
getWorkspace(String id)
Return a Workspace from its id |
|
Set<Workspace> |
getWorkspaceSet(Workflow wf)
Return a Set of Workspace that use the given Workflow |
|
WSTypeEntry |
getWSTypeEntry(Class clazz,
Workspace workspace)
This method is a substitute of old getTypeEntry(Class) or getTypeEntry(String). |
|
WSTypeEntry |
getWSTypeEntry(String className,
Workspace workspace)
This method is a substitute of old getTypeEntry(Class) or getTypeEntry(String). |
|
void |
handleDataWriteState(boolean disable,
String msg,
boolean updateProperty)
Handle the given data write state and perform the update in properties if needed. |
|
void |
handleFinalize()
This method is called when the site is restarted or shutdown. |
|
void |
handleJcmsDBError(String msg,
Throwable th)
This method is called when a fatal error occurs on the JcmsDB. |
|
void |
handleStoreError(String msg,
Throwable th)
This method is called when a fatal error occurs on the store. |
|
protected void |
initAfterLoad()
Perform all the initalizations after the store has been loaded (called byte ChannelInitServlet) |
|
protected void |
initBeforeLoad()
Perform all the initalizations before the store has been loaded (called byte ChannelInitServlet) |
|
protected void |
initHibernate()
|
|
protected static void |
initialize(javax.servlet.ServletContext context,
String logFile,
String webappPropFile,
String customPropFile,
ClassLoader classLoader)
Singleton method to Instanciate the channel. |
|
void |
initVirtualIDMap()
Init the virtual ID map (data, virtual ID). |
|
void |
invalidateSearchAndRefineRootSet()
Invalidate search and refine root set (they will be computed at the next call). |
|
boolean |
isAuthenticationRequired()
Returns true if the authentication is required in this site (use the value of channel.is-authentication-required property) |
|
boolean |
isAvailable()
Check if the site is started and ready. |
|
boolean |
isDataWriteEnabled()
Checks if data write are enabled (see channel.data-write.enabled property) |
|
boolean |
isDeployManagerEnabled()
Returns true if the DeployManager is enabled. |
|
boolean |
isFailSafeMode()
|
|
boolean |
isGzipCompressionEnabled()
|
|
boolean |
isJSyncAutoUpdate()
|
|
boolean |
isJSyncEnabled()
|
|
boolean |
isLdapEnabled()
|
|
boolean |
isLoginCaseSensitive()
|
|
boolean |
isMailEnabled()
|
|
boolean |
isMainLanguage(String lang)
|
|
boolean |
isMainLeader()
Return leadership status of JCMS when using in cluster. |
|
boolean |
isMultilingual()
|
|
boolean |
isNotificationEnabled()
|
|
boolean |
isRegistered(Data data)
Checks if the given data is still registered in the Store. |
|
boolean |
isRegistered(String id)
Checks if the given data is still registered in the Store. |
|
boolean |
isReverseProxyEnabled()
Checks if the reverse proxy is enabled. |
|
boolean |
isSSLenabled()
|
|
boolean |
isUsingAdvancedI18N()
Indicates whether JCMS is in advanced internationalization mode. |
|
boolean |
isValidAdminIP(javax.servlet.ServletRequest request)
Checks if the specified request is authorized to access admin area. |
|
boolean |
isValidWorkspacesIP(javax.servlet.ServletRequest request)
Checks if the specified request is authorized to access workspace area. |
|
boolean |
isVisiblePstatus(int pstatus)
Check if a pstatus is a default (aka visible) query pstatus (replace previous method isDefaultQueryPstatus). |
|
boolean |
isWebdavEnabled()
Check if Webdav is enable |
|
protected void |
loadStore()
Load the JCMS store file. |
|
void |
performStoreBackup()
Perform a backup of the store. |
|
String |
processReverseProxyRedirect(javax.servlet.ServletRequest request,
String url)
Check if the given request comes from one of the reverse proxies specified in the configuration (channel.reverse-proxy.conf*). |
|
boolean |
processReverseProxyRequest(javax.servlet.ServletRequest request)
Check if the given request comes from one of the reverse proxies specified in the configuration (channel.reverse-proxy.conf*). |
|
void |
propertiesChange(JProperties p)
This methods triggers re-initialization of all the managers/parameters of this JCMS site, only those that can be reinitialized without a restart. It is the method to support implementation of the JPropertiesListener and is called after a change of the properties. |
|
QueryResultSet |
query(QueryHandler qh,
javax.servlet.ServletRequest request,
Set<? extends Publication> proposedDataSet)
Perform a query using parameters specified in the given QueryHandler . |
|
void |
reloadLanguageProperties()
Reload languages properties of JCMS (WEB-INF/jalios/languages/{lang}.prop). |
|
void |
removeAuthenticationHandler(AuthenticationHandler authHandler)
Remove the specified AuthenticationHandler from the list of
AuthenticationHandlers used by the AuthenticationManager
to process users' authentication. |
|
void |
removeChannelListener(ChannelListener listener)
Removes a ChannelListener. |
|
void |
removeCleanFilter(CustomCleanFilter filter)
Removes a custom clean filter. |
|
void |
removeDataController(DataController dc,
Class<?> clazz)
Remove the given DataController |
|
void |
removeDBListener(DBListener listener)
Remove a DBListener. |
|
void |
removeDBListener(DBListener listener,
Class<?> clazz)
Remove a DBListener. |
|
void |
removePolicyFilter(PolicyFilter pf)
Remove the given PolicyFilter to the list of RightPolicyFilter used by
the PolicyManager (getPolicyManager() ). |
|
void |
removePropertiesListener(JPropertiesListener listener)
Removes a properties listener. |
|
void |
removeQueryFilter(QueryFilter qf)
Remove the given QueryFilter from the list of QueryFilters used by
the QueryManager (getQueryManager() ). |
|
void |
removeStoreListener(StoreListener listener)
Removes a StoreListener for all storable classes. |
|
void |
removeStoreListener(StoreListener listener,
Class<?> clazz)
Removes a StoreListener associated to a given class. |
|
void |
restart()
Restarts the channel. |
|
|
select(Collection<? extends T> dataColl,
DataSelector selector,
Comparator comparator)
Perform a selection on a Collection of Data using
the given DataSelector , and return a TreeSet sorted using the
given Comparator . |
|
void |
setAvailable(boolean isAvailable)
Enable or disable the site. |
|
void |
setCurrentServletRequest(javax.servlet.http.HttpServletRequest request)
Assigns the current servlet request. |
|
void |
setCurrentServletResponse(javax.servlet.http.HttpServletResponse response)
Assigns the current servlet response. |
|
void |
setProperty(String name,
String value)
Modify an internal property with the given value. Do not change any JCMS property at runtime, behaviour of JCMS maybe incorrect if you do so, use the user interface for such task. |
|
String |
toString()
|
|
void |
updateAndSaveProperties(JProperties prop)
Updates and save specified properties. |
|
protected void |
updateClass2DataSet(Data data,
boolean add)
This methods is called by a DataListener when a Data is updated or created to update the map which link Class to Set of Data. |
|
void |
updateData(Data updated,
Member opAuthor)
Updates a data in the store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected javax.servlet.ServletContext context
protected String logFilePath
protected String webappPropFilePath
protected String customPropFilePath
protected ClassLoader classLoader
protected JcmsInfo jcmsInfo
protected String name
protected AppServerInfo appServerInfo
protected boolean isAvailable
protected String urid
protected String url
protected String securedUrl
protected String uri
protected Store store
protected String language
protected String country
protected Locale locale
protected SimpleDateFormat dateTimeFormat
protected SimpleDateFormat dateFormat
protected HashMap<String,SimpleDateFormat> dateTimeFormatMap
protected HashMap<String,SimpleDateFormat> dateFormatMap
protected Group defaultGroup
protected Member defaultAdmin
protected Workspace defaultWorkspace
protected String defaultEmail
protected int realPathLength
protected File webappDir
protected LangProperties properties
protected Map<String,AlarmManager> alarmManagerMap
protected CacheManager cacheManager
protected TypeProcessor typeProcessor
protected ArrayList<String> langList
protected ArrayList<String> langListOrdered
protected ArrayList<String> otherLangList
protected ArrayList<String> localizedLangList
protected ArrayList<String> jcmsLangList
protected org.apache.oro.text.regex.Pattern adminIpPattern
protected boolean adminIpNoPattern
protected org.apache.oro.text.regex.Pattern workspacesIpPattern
protected boolean workspacesIpNoPattern
protected boolean isDataWriteEnabled
protected boolean isDataWriteEnabledComputed
protected boolean isWebdavEnable
protected boolean isWebdavEnableComputed
protected boolean isGzipCompressionEnabled
protected boolean isDeployManagerEnabled
protected String webdavEncoding
protected ThreadLocal<javax.servlet.http.HttpServletRequest> currentServletRequest
protected ThreadLocal<javax.servlet.http.HttpServletResponse> currentServletResponse
protected AlarmEntry nlAlarmEntry
protected File storeBackupDir
protected int storeBackupMax
protected boolean isReverseProxyEnabled
protected HashMap<String,String> ipToReverseProxyConfNameMap
protected HashMap<String,String> reverseProxyContextPath
protected HashMap<String,String> reverseProxyBaseURL
protected HashMap<String,String> reverseProxySSLBaseURL
protected LDAPConfiguration ldapConf
protected AuthenticationManager authMgr
protected NotificationManager notificationManager
protected boolean isNotificationEnabled
protected static boolean isSSLenabled
protected static int SSLport
protected LimitController limitController
protected JSyncReplica jsyncReplica
protected boolean jsyncEnabled
protected String jsyncReplicaUrl
protected String jsyncLeaderUrl
protected boolean jsyncHasLeader
protected String jsyncUpdateMode
protected long jsyncStabDelay
protected boolean jsyncAutoUpdate
protected boolean jsyncSyncFiles
protected long jsyncDownloadInterval
protected org.apache.oro.text.regex.Pattern jsyncIpPattern
protected JSyncPreviousReplicaManager jsyncPreviousReplicaManager
protected boolean jsyncSuggestJoin
protected String jsyncExplicitReplicaList
protected LinkIndexManager lim
protected FileIndexManager fim
protected DataListener dataListener
protected PublicationListener pubListener
protected StatReportListener statReportListener
protected TreeSet<ChannelListener> channelListenerSet
protected PolicyManager policyManager
protected Map<Class<? extends Data>,Set<Data>> class2dataSet
protected Category rootCategory
protected Category tagRoot
protected Set<Category> rootCategoryAsSet
protected Set<Category> searchRootSet
protected Set<Category> refineRootSet
protected Set<Category> advRefineRootSet
protected ArrayList<Class<? extends Publication>> coreTypeList
protected Map<String,List<Class<? extends Publication>>> publicationTypeMap
protected String[] defaultQueryTypes
protected String[] defaultQueryTypesOff
protected int[] visiblePstatus
protected CategoryRight rootCategoryRight
protected CategoryRight noCategoryRight
protected Set<Publication> pubWithoutCategories
protected HashMap<Storable,String> virtualIDMap
protected HashMap<Class<?>,Map<String,TypeFieldEntry>> allTypeFieldEntriesCacheMap
protected HashMap<Class<?>,Map<String,TypeFieldEntry>> exactTypeFieldEntriesCacheMap
protected HashMap<Class<?>,Set<DataController>> dataControllerMap
protected TreeMap<Data,ControllerStatus> dataIntegrityReport
protected Date dataIntegrityReportDate
protected QueryManager queryMgr
protected LuceneMemberSearchEngine mbrSearchEngine
protected List<CustomCleanFilter> cleanFilterList
protected Class<?>[] publicationSuperTypes
protected boolean isUsingAdvancedI18N
protected HashSet<String> rightToLeftLanguageSet
protected ObjectLongTreeMap fileSizeMap
protected static Channel channel
Method Detail |
---|
public void reloadLanguageProperties() throws IOException
IOException
public static Channel getChannel()
protected static void initialize(javax.servlet.ServletContext context, String logFile, String webappPropFile, String customPropFile, ClassLoader classLoader) throws Exception
context
- the ServletContextlogFile
- the relative file path of the logwebappPropFile
- the relative file path of the webapp.prop propertiescustomPropFile
- the relative file path of the webapp.prop propertiesclassLoader
- the web-app ClassLoader
Exception
protected static void destroy()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void fireChannelFinalize()
ChannelListener.handleFinalize()
of every
registered ChannelListener
.
addChannelListener(ChannelListener)
,
removeChannelListener(ChannelListener)
public void handleFinalize()
ChannelListener
protected void initHibernate() throws Exception
Exception
protected void initBeforeLoad() throws Exception
Exception
protected void loadStore() throws LogException
LogException
protected void initAfterLoad() throws Exception
Exception
public void propertiesChange(JProperties p)
propertiesChange
in interface JPropertiesListener
p
- the properties which have been modified (may not contain all JCMS properties)public StatReportListener getStatReportListener()
StatReport
object modification to
update schedule of Statistics.
public AppServerInfo getAppServerInfo()
public boolean isReverseProxyEnabled()
public boolean processReverseProxyRequest(javax.servlet.ServletRequest request)
request
- the current request
public String processReverseProxyRedirect(javax.servlet.ServletRequest request, String url)
request
- the current requesturl
- the URL to be modified with reverse proxy settings
public boolean isDeployManagerEnabled()
public LimitController getLimitController()
public boolean isJSyncEnabled()
public boolean isMainLeader()
public JSyncReplica getJSyncReplica()
public JSyncPreviousReplicaManager getJSyncPreviousReplicaManager()
public String getJSyncReplicaUrl()
public String getJSyncLeaderUrl()
public boolean isJSyncAutoUpdate()
public long getJSyncStabDelay()
public org.apache.oro.text.regex.Pattern getJSyncIpPattern()
public boolean isGzipCompressionEnabled()
public boolean isNotificationEnabled()
public NotificationManager getNotificationManager()
public boolean isMailEnabled()
public LinkIndexManager getLinkIndexManager()
LinkIndexManager
singleton instance which
manages Data's links on each other.
public <T> TreeSet<T> getLinkIndexedDataSet(Data data, Class<T> clazz)
T
- any object type (usually something extending Data)data
- the dataclazz
- the class to search the referring instances
public <T> TreeSet<T> getLinkIndexedDataSet(Data data, Class<T> clazz, String field)
T
- any object type (usually something extending Data)data
- the dataclazz
- the class to search the referring instancesfield
- the name of the field which contains the reference
public int getLinkCount(Data data)
data
- the data for which we want to retrieve link count
public FileIndexManager getFileIndexManager()
FileIndexManager
singleton instance which
manages Data's links to filename.
public String getCleanFilename(String filename)
///upload%2Fmydir///private.%70df -> upload/mydir/private.pdf
filename
- the URI to be decoded, converted to a valid path relative to the webapp
public TreeSet<Data> getFileIndexedDataSet(String filename)
filename
- a relative filename ("upload/...").
public boolean canMemberAccessFile(String filename, Member member)
filename
- the filename to be checkedmember
- the member
checkMemberAccessFile(String, Member, Set)
public int checkMemberAccessFile(String filename, Member member, Set<String> authorizedFilenames)
filename
- the filename to be checkedmember
- the memberauthorizedFilenames
- Set of filename authorized, placed in session while executing version.jsp
PRIVATE_FILE_ACCESS
, PUBLIC_FILE_ACCESS
, FORBIDDEN_FILE_ACCESS
canMemberAccessFile(String, com.jalios.jcms.Member)
public ObjectLongTreeMap getFileSizeMap(boolean refresh)
refresh
- if true refresh the map
public List<File> getOrphanFiles()
public List<File> getOrphanFiles(boolean searchInDB)
searchInDB
- if true extends the search to the database
public List<File> getOrphanFiles(FileFilter filter)
filter
- the FileFilter to use (may be null)
public List<File> getOrphanFiles(FileFilter filter, boolean searchInDB)
filter
- the FileFilter to use (may be null)searchInDB
- true if file search should also be performed for DBFileDocument, false otherwise
public final boolean isSSLenabled()
public final int getSSLport()
public final String getSecuredBaseUrl(javax.servlet.http.HttpServletRequest request)
request
- the request
public LDAPConfiguration getLDAPConfiguration()
LDAPMapper.LDAPMapper(LDAPConfiguration)
to
connect to your LDAP server.
public boolean isLdapEnabled()
public AuthenticationManager getAuthMgr()
public boolean isAuthenticationRequired()
public boolean isLoginCaseSensitive()
public CacheManager getCacheManager()
public AlarmManager getAlarmManager(String name)
AlarmManager.getAllAlarms()
)
or removed (AlarmManager.removeAllAlarms()
).
name
- the name of the AlarmManager.
getCommonAlarmManager()
public AlarmManager getCommonAlarmManager()
AlarmManager.getAllAlarms()
) and
(AlarmManager.removeAllAlarms()
have not to be called.
getAlarmManager(String)
public Map<String,AlarmManager> getAllAlarmManager()
AlarmManager
with the name as keypublic javax.servlet.ServletContext getServletContext()
public String getRealPath(String uri)
new File()
constructor.
String realFilePath = channel.getRealPath("/upload/myfile.txt"); File myFile = new File(realFilePath);
uri
- a path relative to the webapp root (with or without starting slash).
e.g "/upload/somefile.txt"
, "WEB-INF/data/somefolder"
"C:\tomcat\webapps\jcms\WEB-INF\data\somefolder"
.public String getWebappPath()
"C:\tomcat\webapps\jcms\"
.public String getWebInfPath(String uri)
/WEB-INF/
of the webapp.new File()
constructor.
String webXmlPath = channel.getWebInfPath("web.xml"); File webXmlFile = new File(webXmlPath);
uri
- a path relative to the /WEB-INF/
directory (with or without starting slash).
e.g "web.xml"
"C:\tomcat\webapps\jcms\WEB-INF\web.xml"
.getRealPath(String)
public String getDataPath(String uri)
/WEB-INF/data/
of the webapp.new File()
constructor.
String statusPropPath = channel.getDataPath("status.prop"); File statusPropFile = new File(statusPropPath);
uri
- a path relative to the /WEB-INF/data/
directory (with or without starting slash).
e.g "status.prop"
"C:\tomcat\webapps\jcms\WEB-INF\data\status.prop"
.getRealPath(String)
public String getLucenePath(String uri)
/WEB-INF/data/lucene/
of the webapp.new File()
constructor.
String fileIndexPath = channel.getLucenePath("FilesIndex"); File fileIndexFile = new File(fileIndexPath);
uri
- a path relative to the /WEB-INF/data/lucene/
directory (with or without starting slash).
e.g "FilesIndex"
"C:\tomcat\webapps\jcms\WEB-INF\data\lucene\FilesIndex\"
.getRealPath(String)
public String getJaliosPath(String uri)
/WEB-INF/jalios/
of the webapp.new File()
constructor.
String jcmsPropPath = channel.getJaliosPath("jcms.prop"); File jcmsPropFile = new File(jcmsPropPath);
uri
- a path relative to the /WEB-INF/jalios/
directory (with or without starting slash).
e.g "jcms.prop"
"C:\tomcat\webapps\jcms\WEB-INF\jalios\jcms.prop"
.getRealPath(String)
public String getJcmsWorkPath(String uri)
/WEB-INF/jcmswork/
of the webapp.new File()
constructor.
String myLockFilePath = channel.getJcmsWorkPath("myfile.lock"); File myLockFile = new File(myLockFilePath);
uri
- a path relative to the /WEB-INF/jcmswork/
directory (with or without starting slash).
e.g "myfile.lock"
"C:\tomcat\webapps\jcms\WEB-INF\jcmswork\myfile.lock"
.getRealPath(String)
public String getUploadPath(String uri)
/upload/
).new File()
constructor.
String uploadedFilePath = channel.getUploadPath("uploadedfile.txt"); File uploadedFile = new File(uploadedFilePath);
uri
- a path relative to the /upload/
folder (with or without starting slash).
e.g "myfile.lock"
"C:\tomcat\webapps\jcms\upload\"
.getRealPath(String)
public String getUploadParentPath()
public String getRelativePath(File file)
"C:\tomcat\webapps\ROOT\AnyFolder\MyFileOrFolder"
returns "AnyFolder/MyFileOrFolder"
.
file
- the File to convert into a relative filepath, e.g. new File("C:\\tomcat\\webapps\\jcms\\upload\\myfile.txt")
"upload/myfile.txt"
public String getDataSourceLabel(String dataSource, String userLang)
<lang>.data-source.<ds-name>
. E.g.: en.data-source.jdbc/mydb: My Data Source
.
dataSource
- the name of the DataSource (eg. "jdbc/mydb")userLang
- the userLang
public String crypt(String str)
Use checkCrypt(String, String)
method to verify the encrypted version against a plain text entry.
str
- the String to encrypt
checkCrypt(String, String)
public boolean checkCrypt(String candidate_plaintext, String stored_hash)
As of current implementation, this method is compatible with the following crypt algorythm :
Util.cryptUnix(String)
)Util.cryptMD5(String)
)
candidate_plaintext
- the plain text to be tested (information usually received from the client, eg : a plain text password recevied from a login form)stored_hash
- the encrypted version stored (information known only on the server side, eg : member.getPassword())
crypt(String)
public Group getDefaultGroup()
public Member getDefaultAdmin()
public Workspace getDefaultWorkspace()
public String getDefaultEmail()
public String[] getDefaultQueryTypes()
public String[] getDefaultQueryTypesOff()
public int[] getVisiblePstatus()
public boolean isVisiblePstatus(int pstatus)
pstatus
- the pstatus to test
public boolean isValidAdminIP(javax.servlet.ServletRequest request)
request
- the ServletRequest to check
public boolean isValidWorkspacesIP(javax.servlet.ServletRequest request)
request
- the ServletRequest to check
public Category getRootCategory()
channel.root-category
default to j_3
.
public Set<Category> getRootCategoryAsSet()
public Set<Category> getSearchRootSet()
getRootCategory()
,
getRefineRootSet()
,
getAdvRefineRootSet()
public Set<Category> getRefineRootSet()
getRootCategory()
,
getSearchRootSet()
,
getAdvRefineRootSet()
public Category getTagRoot()
public Category getTagRoot(Workspace ws)
ws
- the workspace
public Set<Category> getAdvRefineRootSet()
getRefineRootSet()
,
getSearchRootSet()
,
getRootCategory()
public void invalidateSearchAndRefineRootSet()
public MetaDataExtractor getMetaDataExtractor(String contentType)
contentType
- the content type of the file to extract the metadata
public String getSenderFullEmail()
"name <user@company.com>"
.getSenderFullEmail(Workspace, Publication, String)
public String getSenderFullEmail(Workspace ws, String lang)
ws
- workspace from which we will retrieve emaillang
- optionnal paramereter (set to null if not used)
"name <user@company.com>"
.getSenderFullEmail(Workspace, Publication, String)
public String getSenderFullEmail(Publication pub, String lang)
pub
- publication from which we will retrieve workspace and its emaillang
- optionnal paramereter (set to null if not used)
"name <user@company.com>"
.getSenderFullEmail(Workspace, Publication, String)
public String getSenderFullEmail(Workspace ws, Publication pub, String lang)
"WorkspaceName "
- the publication's workspace email, "Pub's WorkspaceName "
- the channel default email,
"Channel Name "
- last the default admin email, "Default Admin "
ws
- workspace from which we will retrieve emailpub
- publication from which we will retrieve workspace and its emaillang
- optionnal paramereter (set to null if not used)
"name <user@company.com>"
.public boolean isRegistered(Data data)
data
- the data to check
public boolean isRegistered(String id)
id
- the id of the data to check
public void initVirtualIDMap()
public String getVirtualID(Data data)
data
- the data to get the virtual ID.
public Storable getStorable(String id)
id
- the id of the storable
public Data getData(String id)
id
- the id of the data
public <T extends Data> T getData(Class<T> clazz, String id)
T
- any Data typeclazz
- the class of the Dataid
- its id.
public Workspace getWorkspace(String id)
id
- the id of the workspace
public Category getCategory(String id)
id
- the id of the category
public Publication getPublication(String id)
id
- the id of the publication
public Group getGroup(String id)
id
- the id of the group
public Group getGroupFromDN(String dn)
dn
- the dn of the group
public Member getMember(String id)
id
- the id of the member
public Member getMemberFromLogin(String login)
This method is only available after JCMS startup (both JStore and JcmsDB access must be fully ready).
login
- the member's login
null
if no member has this
login.public Member getMemberFromLogin(String login, boolean checkDisabled)
This method is only available after JCMS startup (both JStore and JcmsDB access must be fully ready).
login
- the member's logincheckDisabled
- if true do not return member if account is disabled
null
if no member has this
login.public Member getMemberFromEmail(String email)
This method is only available after JCMS startup (both JStore and JcmsDB access must be fully ready).
email
- the member's email
null
if no member has this
email.public List<? extends Storable> getVersionList(Data data) throws LogException
data
- the data
LogException
- if an error occured while reading store.xmlpublic List<? extends Storable> getVersionList(String id) throws LogException
id
- the data id
LogException
- if an error occured while reading store.xmlpublic TreeSet<? extends Storable> getDeletedSet(Class<? extends Storable> clazz) throws LogException
clazz
- the searched class
LogException
- if an error occured while reading store.xmlpublic Class<?>[] getPublicationSuperTypes()
public List<Class<? extends Publication>> getPublicationTypeList()
getCustomTypeList()
,
getCoreTypeList()
,
getPublicationTypeList(String)
public List<Class<? extends Publication>> getPublicationTypeList(String lang)
lang
- the ISO-639 language code of the language to use for sorting,
use default site's language if null.
getCustomTypeList()
,
getCoreTypeList()
,
getPublicationTypeList()
public Channel.TypeLabelComparator getTypeLabelComparator(String lang)
lang
- the language in which to sort the label.
Channel.TypeLabelComparator
public ArrayList<Class<? extends Publication>> getCoreTypeList()
getCustomTypeList()
,
getPublicationTypeList()
public <T> List<Class<? extends T>> getSubTypeList(Class<T> clazz)
T
- any Publication typeclazz
- the super class
getCustomTypeList()
,
getCoreTypeList()
,
getSubTypeList(Class, String)
public <T> List<Class<? extends T>> getSubTypeList(Class<T> clazz, String lang)
T
- any Publication typeclazz
- the super classlang
- the language
getCustomTypeList()
,
getCoreTypeList()
public <T> ArrayList<Class<? extends T>> getPublishableSubTypeList(Class<T> clazz, Member member)
T
- any Publication typeclazz
- the super classmember
- a member
getSubTypeList(Class)
,
getCustomTypeList()
,
getCoreTypeList()
public DataRight getDataRight(boolean canPublish, boolean canUpdateOther, boolean canDeleteOther, boolean create)
canPublish
- the canPublish value of the DataRight that is looked for.canUpdateOther
- the canUpdateOther value of the DataRight that is looked for.canDeleteOther
- the canDeletOther value of the DataRight that is looked for.create
- if true creates the DataRight if it does not exist.
public CategoryRight getNoCategoryRight()
public CategoryRight getRootCategoryRight()
public CategoryRight getCategoryRight(HashSet<Category> roots, int mode, boolean create)
roots
- the categories to look formode
- the mode to look for (GROUP_AND_MEMBER = 0, MEMBER_ONLY = 1, GROUP_ONLY = 2)create
- if true creates the DataRight if it does not exist.
public <T> TreeSet<T> getDataSet(Class<T> clazz)
clazz
- the class of instances to look for
getPublicationSet(Class, Member)
public long getDataCount(Class<? extends Data> clazz)
clazz
- the class.
public <T> List<T> getDBDataList(Class<T> clazz)
T
- any DB typeclazz
- the class
HibernateUtil.getDBDataList(Class)
public <T> List<T> getDBDataList(Class<T> clazz, int firstResult, int maxResults)
T
- any DB typeclazz
- the classfirstResult
- set the first data to retrieve. If <= 0, rows will be retrieved beginnning from first data.maxResults
- set the maximum number of data to retrieve. If <= 0, there is no limit to the number of data retrieved.
HibernateUtil.getDBDataList(Class)
public DBData getDBData(Class<?> clazz, Long rowId)
clazz
- the classrowId
- the row id
HibernateUtil.getObject(Class, Long)
public <T> Iterator<T> getDBDataIterator(Class<T> clazz)
T
- any DB typeclazz
- the class.
HibernateUtil.getDBDataIterator(Class)
public <T> Iterator<T> getDataAndDBDataIterator(Class<T> clazz)
T
- any DB typeclazz
-
public PageResult<Publication> getDBPublicationList(PublicationCriteria pubCriteria)
pubCriteria
- the PublicationCriteria
HibernateUtil.queryPublication(PublicationCriteria)
public PageResult<Publication> getVisibleDBPublicationList(PublicationCriteria pubCriteria)
pubCriteria
- the PublicationCriteria
public PageResult<Publication> getNotVisibleDBPublicationList(PublicationCriteria pubCriteria)
pubCriteria
- the PublicationCriteria
public List<Class<? extends Publication>> getDBPublicationClassList()
protected void updateClass2DataSet(Data data, boolean add)
public <T> TreeSet<T> getAllDataSet(Class<T> clazz)
clazz
- the class
public TreeSet<Data> getAllDataSet()
public <T> TreeSet<T> getDataSet(String[] ids, Class<? extends T> clazz, boolean neverNull)
T
- any data typeids
- an array of identifiers.clazz
- the clazz of the identifiers (may be null, if the array is heterogeneous)neverNull
- if true and if there is no results, return an empty set instead of null.
public TreeSet<?> getDataSet(String[] ids)
ids
- an array of ids
public ArrayList<Data> getDataList(String[] ids)
ids
- an array of ids
for generic method
public <T extends Data> ArrayList<T> getDataList(String[] ids, boolean ignoreNull, Class<T> clazz)
T
- any data typeids
- an array of idsignoreNull
- if true, null are skippedclazz
- a filter class
public <T extends Publication> TreeSet<T> getAllPublicationSet(Class<T> clazz, Member member)
T
- any publication typeclazz
- the class of instances to look formember
- the member who access the publication set
public <T extends Publication> TreeSet<T> getAllPublicationSet(Class<T> clazz, Member member, boolean checkPstatus)
T
- any publication typeclazz
- the class of instances to look formember
- the member who access the publication setcheckPstatus
- if true, select only the publications that
are in a visible state.
public <T extends Publication> TreeSet<T> getPublicationSet(Class<T> clazz, Member member)
T
- any publication typeclazz
- the class of instances to look formember
- the member who access the publication set
public <T extends Publication> TreeSet<T> getPublicationSet(Class<T> clazz, Member member, boolean checkPstatus)
T
- any publication typeclazz
- the class of instances to look formember
- the member who access the publication setcheckPstatus
- if true, select only the publications that
are in a visible state.
public <T extends Publication> TreeSet<T> getPublicationSet(Class<T> clazz, Member member, boolean checkPstatus, Workspace workspace)
T
- any publication typeclazz
- the class of instances to look formember
- the member who access the publication setcheckPstatus
- if true, select only the publications that are in a visible state.workspace
- if not null select only the publications of this workspace
public <T extends Publication> TreeSet<T> getPublicationSet(Class<T> clazz, Member member, boolean checkPstatus, Workspace workspace, boolean searchDB)
public <T extends Publication> Set<T> getPublicationSet(Set<T> publicationSet, boolean specialState)
publicationSet
- specialState
-
public Set<Publication> getPublicationSet(Set<Publication> publicationSet, Workflow wf)
publicationSet
- wf
-
public Set<Publication> getPublicationSetFromTitle(String title)
title
- the title to be searched for.
public Set<Publication> getPublicationSetFromTitle(String title, boolean searchInDB)
public Publication getFirstPublicationFromTitle(String title)
title
- the title to be searched for.
public <T> Set<T> getPublicationSetFromTitle(Class<T> clazz, String title)
clazz
- the class of the publicationtitle
- the title to be searched for.
public <T> T getFirstPublicationSetFromTitle(Class<T> clazz, String title)
clazz
- the class of the publicationtitle
- the title to be searched for.
public HashSet<Publication> getPublicationWithoutCategories()
public boolean isWebdavEnabled()
public void disableDataWrite(String msg)
msg
- the maintenance message.enableDataWrite()
,
isDataWriteEnabled()
public void enableDataWrite()
disableDataWrite(String)
,
isDataWriteEnabled()
public void handleDataWriteState(boolean disable, String msg, boolean updateProperty)
disable
- msg
- updateProperty
- public boolean isDataWriteEnabled()
public void handleStoreError(String msg, Throwable th)
msg
- the contextual error message.th
- the original throwablepublic void handleJcmsDBError(String msg, Throwable th)
msg
- the contextual error message.th
- the original throwablepublic void createData(Data data, Member opAuthor)
Data.performCreate(Member)
method.
data
- the data to be createdopAuthor
- the member which performs the write operation (can be null)Data.performCreate(com.jalios.jcms.Member)
public void updateData(Data updated, Member opAuthor)
Data.performUpdate(Member)
method.
updated
- the data to be updatedopAuthor
- the member which performs the write operation (can be null)Data.performUpdate(com.jalios.jcms.Member)
public void deleteData(Data data, Member opAuthor)
Data.performDelete(Member)
method.
data
- the data to be deletedopAuthor
- the member which performs the write operation (can be null)Data.performDelete(com.jalios.jcms.Member)
public <T> TreeSet<T> select(Collection<? extends T> dataColl, DataSelector selector, Comparator comparator)
Collection
of Data
using
the given DataSelector
, and return a TreeSet sorted using the
given Comparator
. Comparator
is given, CdateComparator
is used.
dataColl
- the Collection
of Data
to select.selector
- the DataSelector
to use.comparator
- the Comparator
to use.
TreeSet
of Data
.JcmsUtil.select(Collection, DataSelector, Comparator)
public QueryManager getQueryManager()
public QueryResultSet query(QueryHandler qh, javax.servlet.ServletRequest request, Set<? extends Publication> proposedDataSet)
QueryHandler
. Collection
of Publication
or in
all Publication
if not specified.
qh
- the QueryHandler
from which to retrieve the query
parameters, MUST NOT be null.request
- the ServletHttpRequest
used to set some error
or warning messages in the attributes, can be null.proposedDataSet
- the Collection
of Publication
in which to search and apply query parameters, if null, search is done
in all Publication
.
QueryResultSet
containing all results of this query,
it is a HashSet
and therefore it is NOT sorted.
use either getAsSortedSet()
or getAsSortedSet(Comparator)
to obtain a sorted Set.public LuceneMemberSearchEngine getMemberSearchEngine()
public WSTypeEntry getWSTypeEntry(Class clazz, Workspace workspace)
clazz
- the Class
of which to find the WSTypeEntry
workspace
- the workspace to use or null
Workspace.getWSTypeEntry(Class)
public WSTypeEntry getWSTypeEntry(String className, Workspace workspace)
className
- the String
representing the name the Class of which to find the WSTypeEntry
workspace
- the workspace to use or null
public TypeEntry getTypeEntry(Class<?> clazz)
Class
.
Since jcms-5.5.0 should call #getTypeEntry(Class,Workspace)
clazz
- the Class
of which to find the TypeEntry
TypeEntry
associated to the given class or null if not available.TypeProcessor.getTypeEntry(Class)
public TypeEntry getTypeEntry(String className)
className
.
className
- the name the Class of which to find the TypeEntry
TypeEntry
associated to the given class or null if not available.TypeProcessor.getTypeEntry(String)
public TypeFieldEntry getTypeAbstractFieldEntry(Class<?> clazz)
TypeFieldEntry
associated to the abstract (summary)
field of the specified type.
clazz
- the Class of which to find the TypeFieldEntry
TypeFieldEntry
associated to the specified class
or null if not available.public TypeFieldEntry getTypeFieldEntry(Class<?> clazz, String fieldName, boolean checkAll)
TypeFieldEntry
associated to the given Class
and fieldName.
clazz
- the Class of which to find the TypeFieldEntry
fieldName
- the field name of which to find the TypeFieldEntry
checkAll
- whether to check in inherited field entry of the class.
TypeFieldEntry
associated to the given class and fieldName or null if not available.getTypeFieldEntries(Class clazz)
,
getAllTypeFieldEntries(Class clazz)
public TypeFieldEntry getTypeFieldEntry(Class<?> clazz, String fieldName)
clazz
- the classfieldName
- the field name
public String getTypeFieldLabel(Class<?> clazz, String fieldName, String lang)
clazz
- the classfieldName
- the field namelang
- the language in which localized the label
public String getTypeFieldLabel(Class<?> clazz, String fieldName)
clazz
- the classfieldName
- the field name
getCurrentUserLang()
public String getTypeFieldLabel(Data data, String fieldName, String lang)
data
- the datafieldName
- the field namelang
- the language in which localized the label
getCurrentUserLang()
public String getTypeFieldLabel(Data data, String fieldName)
data
- the datafieldName
- the field name
getCurrentUserLang()
public TypeFieldEntry[] getTypeFieldEntries(Class<?> clazz)
TypeFieldEntry
bound to given Class
. Class
.
clazz
- the Class
of which to find the TypeFieldEntry
.
TypeFieldEntry
containing all Field used by Class
or an empty array (never return null)TypeProcessor.getTypeFieldEntries(Class)
public TypeFieldEntry[] getTypeFieldEntries(String className)
TypeFieldEntry
bound to given Class
. Class
.
className
- the String
representing the name the Class of which to find the TypeFieldEntry
TypeFieldEntry
containing all Field used by Class
or an empty array (never return null)TypeProcessor.getTypeFieldEntries(String)
public TypeFieldEntry[] getAllTypeFieldEntries(Class<?> clazz)
TypeFieldEntry
bound to given Class
. Class
.
clazz
- the Class
of which to find the TypeFieldEntry
.
TypeFieldEntry
containing all Field used by Class
or an empty array (never return null)TypeProcessor.getAllTypeFieldEntries(Class)
public TypeFieldEntry[] getAllTypeFieldEntries(String className)
TypeFieldEntry
bound to given Class
name. Class
.
className
- the String
representing the name the Class of which to find the TypeFieldEntry
TypeFieldEntry
containing all Field used by Class
or an empty array (never return null)TypeProcessor.getAllTypeFieldEntries(String)
public String getTypeLabel(Class<?> clazz, String lang)
clazz
- the classlang
- the language
getTypeLabel(Class, Workspace, String)
public String getTypeLabel(Class<?> clazz, Workspace workspace, String lang)
clazz
- the classworkspace
- the Workspacelang
- the language
getTypeLabel(Class,String)
,
Workspace.getTypeLabel(Class,String)
public String getTypeDescription(Class clazz, String lang)
clazz
- the classlang
- the language
getTypeDescription(Class, Workspace, String)
public String getTypeDescription(Class clazz, Workspace workspace, String lang)
clazz
- the classworkspace
- the Workspacelang
- the language
getTypeLabel(Class,String)
,
Workspace.getTypeDescription(Class,String)
public void restart()
getAppServerInfo()
,
AppServerInfo.getRestartFile()
public boolean isAvailable()
public void setAvailable(boolean isAvailable)
isAvailable
- true to enable site, false to disablepublic ClassLoader getClassLoader()
public Class[] getClass(String[] clazzStr)
clazzStr
- the full qualified name of the classes to load
public Class getClass(String className) throws ClassNotFoundException
className
- the full qualified name of the class to load
ClassNotFoundException
IllegalStateException
- if className represents a class generated by JCMS
and such classes have not yet been generated and compiled.
If thrown, the site must not been started.public List getCustomTypeList()
getCustomTypeList()
,
getPublicationTypeList()
public Map<String,Class<?>> getCustomExtensionMap()
public Collection<Class<?>> getCustomExtensionCollection()
public String getUrl()
public String getName()
public String getUrid()
public String toString()
toString
in class Object
getName()
public JcmsInfo getJcmsInfo()
public int getHierarchicalWorkspaceLimit()
public void addChannelListener(ChannelListener listener)
listener
- the ChannelListener to addpublic void removeChannelListener(ChannelListener listener)
listener
- the ChannelListener to removepublic void addStoreListener(StoreListener listener, Class<?> clazz, boolean repeat)
listener
- the StoreListener to addclazz
- the class to listen to.repeat
- If true, the listener will be called every time an operation is
processed on the given class, that is during store load (if listener is added
before store load) and for every following operation on every replica.
If false, the listener will only be called the very first time the operation
takes place, and only on the replica where it is done (also not during store load).public void addStoreListener(StoreListener listener, boolean repeat)
listener
- the StoreListener to addrepeat
- true if the listner must notify each time this operation is processedpublic void removeStoreListener(StoreListener listener, Class<?> clazz)
listener
- the StoreListener to removeclazz
- the class to listen to.public void removeStoreListener(StoreListener listener)
listener
- the StoreListener to removepublic Set<StoreListener> getStoreListenerSet()
public Map<Class<?>,Set<StoreListener>> getStoreListenerClassMap()
public void addDBListener(DBListener listener)
listener
- the listener to be added.public void addDBListener(DBListener listener, Class<?> clazz)
listener
- the listener to be added.clazz
- the class to listen to.public void removeDBListener(DBListener listener)
listener
- the listener to be removed.public void removeDBListener(DBListener listener, Class<?> clazz)
listener
- the listener to be removed.clazz
- the exact class that was being listenedpublic void addDataController(DataController dc, Class<?> clazz)
dc
- the DataController to be addedclazz
- the clazz this DataController must controlpublic void removeDataController(DataController dc, Class<?> clazz)
dc
- the DataController to be removedclazz
- the clazz this DataController controlspublic Set<DataController> getDataControllerSet(Class<?> clazz)
clazz
- the class
public Map<Class<?>,Set<DataController>> getDataControllerMap()
public void addPolicyFilter(PolicyFilter pf)
PolicyFilter
to the list of RightPolicyFilter used by
the PolicyManager (getPolicyManager()
).
pf
- the RightPolicyFilter to be addedpublic void removePolicyFilter(PolicyFilter pf)
PolicyFilter
to the list of RightPolicyFilter used by
the PolicyManager (getPolicyManager()
).
pf
- the RightPolicyFilter to be addedpublic PolicyManager getPolicyManager()
public void addQueryFilter(QueryFilter qf)
QueryFilter
to the list of QueryFilters used by
the QueryManager (getQueryManager()
).
qf
- the QueryFilter to be addedpublic void removeQueryFilter(QueryFilter qf)
QueryFilter
from the list of QueryFilters used by
the QueryManager (getQueryManager()
).
qf
- the QueryFilter to be removedpublic void addAuthenticationHandler(AuthenticationHandler authHandler)
AuthenticationHandler
to the list of
AuthenticationHandlers used by the AuthenticationManager
to process users' authentication.
authHandler
- the AuthenticationHandler to be addedpublic void removeAuthenticationHandler(AuthenticationHandler authHandler)
AuthenticationHandler
from the list of
AuthenticationHandlers used by the AuthenticationManager
to process users' authentication.
authHandler
- the AuthenticationHandler to be removedpublic Map<Data,ControllerStatus> getDataIntegrityReport(boolean refresh)
refresh
- if true recompute the report
public Date getDataIntegrityReportDate()
public void generateLogFromMemory()
public void cleanStore(CleanFilter filter, JcmsContext context)
filter
- the filter to applycontext
- current JcmsContextpublic void addCleanFilter(CustomCleanFilter filter)
filter
- the filter to be added.public void removeCleanFilter(CustomCleanFilter filter)
filter
- the filter to be removed.public List<CustomCleanFilter> getCleanFilterList()
public void appendMilestone(String text)
text
- the text of the milestone.Store.appendMilestone(String)
public LoadReport getStoreLoadReport()
public int getStoreSize()
public int getStoreCreateCount()
public int getStoreUpdateCount()
public int getStoreDeleteCount()
public Store getStore()
public void performStoreBackup()
public long getLockTimeout()
See property channel.lock-timeout
(warning : value must be in minutes!).
public Locale getLocale()
public SimpleDateFormat getDateTimeFormat(String lang)
lang
- the language in which the Date&Time will be formatted/parsed
public SimpleDateFormat getDateFormat(String lang)
lang
- the language in which the Date will be formatted/parsed
public Object getLangValue(String lang, boolean useDefault, Object value, HashMap valueML, String mainLanguage)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languagesmainLanguage
- the main language
public Object getLangValue(String lang, boolean useDefault, Object value, HashMap valueML)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languages
public String getLangValue(String lang, boolean useDefault, String value, HashMap valueML, String mainLanguage)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languagesmainLanguage
- the main language
public String getLangValue(String lang, boolean useDefault, String value, HashMap valueML)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languages
public Object[] getLangValue(String lang, boolean useDefault, Object[] value, HashMap valueML, String mainLanguage)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languagesmainLanguage
- the main language
public Object[] getLangValue(String lang, boolean useDefault, Object[] value, HashMap valueML)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languages
public String[] getLangValue(String lang, boolean useDefault, String[] value, HashMap valueML, String mainLanguage)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languagesmainLanguage
- the main language
public String[] getLangValue(String lang, boolean useDefault, String[] value, HashMap valueML)
lang
- the language to useuseDefault
- should the main language use as defaultvalue
- the value in the main languagevalueML
- the map of value of the other languages
public boolean isMultilingual()
getLanguageList()
public boolean isMainLanguage(String lang)
lang
- the lang to check
getLanguage()
public boolean isUsingAdvancedI18N()
public String getLanguageDirection(String lang)
lang
- the ISO-639 code of the language to
public String getUsedLanguage(Data data, String fieldName, String lang)
data
- the Data or Publication of which to retrieve the field valuefieldName
- the field name to retrievelang
- the language in which the field was asked (ISO-639 code).
public List<String> getLanguageList()
public List<String> getLanguageListOrdered()
public List<String> getOtherLanguageList()
public List<String> getLocalizedLanguageList()
public List<String> getJcmsLanguageList()
public String getLanguage()
public String getCountry()
Locale
public void updateAndSaveProperties(JProperties prop)
prop
- the properties to be updated/saved.JProperties.updateAndSave(java.io.File)
public boolean containsProperty(String name)
name
- the key/name of the property to check
JProperties.containsProperty(java.lang.String)
public String getProperty(String name)
name
- the key/name of the property to retrieve
JProperties.getProperty(java.lang.String)
public String getProperty(String name, String defaultValue)
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value is null.
JProperties.getProperty(java.lang.String, java.lang.String)
public boolean getBooleanProperty(String name, boolean defaultValue)
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value
is null or is neither "false" nor "true" (case sensitive).
JProperties.getBooleanProperty(java.lang.String, boolean)
public int getIntegerProperty(String name, int defaultValue)
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value
is null or if Integer.parseInt() throws exception during String
to int conversion.
JProperties.getIntegerProperty(java.lang.String, int)
public long getLongProperty(String name, long defaultValue)
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value
is null or if Long.parseLong() throws exception during String
to long conversion.
JProperties.getLongProperty(java.lang.String, long)
public float getFloatProperty(String name, float defaultValue)
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value
is null or if Float.parseFloat() throws exception during String
to float conversion.
JProperties.getFloatProperty(java.lang.String, float)
public double getDoubleProperty(String name, double defaultValue)
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value
is null or if Double.parseDouble() throws exception during String
to double conversion.
JProperties.getDoubleProperty(java.lang.String, double)
public String[] getStringArrayProperty(String name, String[] defaultValue)
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value
is null or no values could be found in the conversion.
JProperties.getStringArrayProperty(java.lang.String,java.lang.String[])
public int[] getIntArrayProperty(String name, int[] defaultValue)
getStringArrayProperty(String, String[])
.
name
- the key/name of the property to retrievedefaultValue
- the default value to use if the existing value
is null or no values could be found in the conversion.
JProperties.getIntArrayProperty(java.lang.String,int[])
public JProperties getChannelProperties()
getLanguageProperties()
but may differ in a future revision.
Do not change any JCMS property at runtime, behaviour of JCMS maybe
incorrect if you do so, use the user interface for such task.
However you can modify any of your own properties.
public LangProperties getLanguageProperties()
getChannelProperties()
but may differ in a future revision.
Do not change any JCMS property at runtime, behaviour of JCMS maybe
incorrect if you do so, use the user interface for such task.
However you can modify any of your own properties.
public LangProperties getProperties(String prefix)
prefix
- the prefix
LangProperties.getProperties(java.lang.String)
public Map<String,String> getSortedProperties(String prefix)
prefix
- the prefix
LangProperties.getProperties(java.lang.String)
public Map<String,String> getSortedProperties(String prefix, boolean trim)
prefix
- the prefixtrim
- boolean true to remove prefix from key
getSortedProperties(java.lang.String)
public Map<String,Object> getSubProperties(String prefix)
prefix
- the prefix
JProperties.getSubProperties(java.lang.String)
public void setProperty(String name, String value)
name
- the name/key of the property to changevalue
- the new value of this propertJProperties.setProperty(String, String)
public void addPropertiesListener(JPropertiesListener listener)
listener
- the properties listenerpublic void removePropertiesListener(JPropertiesListener listener)
listener
- the properties listenerpublic Set<Group> getCommonGroupSet()
public Set<Workspace> getWorkspaceSet(Workflow wf)
wf
- the Workflow to look for
public void setCurrentServletRequest(javax.servlet.http.HttpServletRequest request)
initFilter
.
request
- the ServletRequestpublic void clearCurrentServletRequest()
initFilter
.
public javax.servlet.http.HttpServletRequest getCurrentServletRequest()
getCurrentJcmsContext()
public void setCurrentServletResponse(javax.servlet.http.HttpServletResponse response)
initFilter
.
response
- the ServletResponsepublic void clearCurrentServletResponse()
initFilter
.
public javax.servlet.http.HttpServletResponse getCurrentServletResponse()
getCurrentJcmsContext()
public JcmsContext getCurrentJcmsContext()
getCurrentServletRequest()
public String getCurrentUserLang()
public Locale getCurrentUserLocale()
public Member getCurrentLoggedMember()
public Member getCurrentDelegateMember()
DelegationAuthenticationHandler.getSuHistory(HttpServletRequest)
.
public boolean isFailSafeMode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |