rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
_multipartParams = uploadReq.getMultipartParameters();
public LiferayStrutsRequestImpl(HttpServletRequest req) { super(req); _strutsAttributes = (Map)req.getAttribute("STRUTS_BRIDGES_ATTRIBUTES"); if (_strutsAttributes == null) { _strutsAttributes = CollectionFactory.getHashMap(); req.setAttribute("STRUTS_BRIDGES_ATTRIBUTES", _strutsAttributes); } }
int value = article1.getModifiedDate().compareTo(article2.getModifiedDate());
int value = DateUtil.compareTo( article1.getModifiedDate(), article2.getModifiedDate());
public int compare(Object obj1, Object obj2) { JournalArticle article1 = (JournalArticle)obj1; JournalArticle article2 = (JournalArticle)obj2; int value = article1.getModifiedDate().compareTo(article2.getModifiedDate()); if (_asc) { return value; } else { return -value; } }
List list = q.list(); return list;
return q.list();
public List findByCompanyId(String companyId) throws SystemException { Session session = null; try { session = openSession(); StringBuffer query = new StringBuffer(); query.append( "FROM com.ext.portlet.reports.model.ReportsEntry WHERE "); if ...
_log.warn("No ReportsEntry exists with the primary key " + entryId.toString());
if (_log.isWarnEnabled()) { _log.warn("No ReportsEntry exists with the primary key " + entryId.toString()); }
public ReportsEntry findByPrimaryKey(String entryId) throws NoSuchEntryException, SystemException { Session session = null; try { session = openSession(); ReportsEntry reportsEntry = (ReportsEntry) session.get(ReportsEntry.class, entryId); if ...
List list = q.list(); return list;
return q.list();
public List findByUserId(String userId) throws SystemException { Session session = null; try { session = openSession(); StringBuffer query = new StringBuffer(); query.append( "FROM com.ext.portlet.reports.model.ReportsEntry WHERE "); if (userI...
_log.warn("No ReportsEntry exists with the primary key " + entryId.toString());
if (_log.isWarnEnabled()) { _log.warn("No ReportsEntry exists with the primary key " + entryId.toString()); }
public ReportsEntry remove(String entryId) throws NoSuchEntryException, SystemException { Session session = null; try { session = openSession(); ReportsEntry reportsEntry = (ReportsEntry) session.get(ReportsEntry.class, entryId); if (reportsEn...
if (reportsEntry.isNew() || reportsEntry.isModified()) { session = openSession(); if (reportsEntry.isNew()) { ReportsEntry reportsEntryModel = new ReportsEntry(); reportsEntryModel.setEntryId(reportsEntry.getEntryId()); reportsEntryModel.setCompanyId(reportsEntry.getCompanyId()); reportsEntryModel.setUserId(reportsEnt...
session = openSession(); session.saveOrUpdate(reportsEntry); session.flush(); reportsEntry.setNew(false);
public com.ext.portlet.reports.model.ReportsEntry update( com.ext.portlet.reports.model.ReportsEntry reportsEntry) throws SystemException { Session session = null; try { if (reportsEntry.isNew() || reportsEntry.isModified()) { session = openSession(); ...
companyId, autoUserId, userId, autoPassword, password1, password2, passwordReset, emailAddress, locale, firstName, middleName, lastName, nickName, prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
creatorUserId, companyId, autoUserId, userId, autoPassword, password1, password2, passwordReset, emailAddress, locale, firstName, middleName, lastName, nickName, prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
public void checkCompany(String companyId) throws PortalException, SystemException { // Company String companyMx = companyId; Date now = new Date(); Company company = null; try { company = CompanyUtil.findByPrimaryKey(companyId); } catch (NoSuchCompanyException nsce) { String portalURL = "localhost"; Str...
null
StringPool.BLANK
public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { String composeAction = ParamUtil.getString(req, "composeAction"); long messageId = ParamUtil.getLong(req, "messageId"); String folderId = ParamUtil.getString(req,...
HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name,
HttpPrincipal httpPrincipal, java.lang.String name,
public static com.liferay.portal.model.Group addGroup( HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = className; ...
Object paramObj0 = className;
Object paramObj0 = name;
public static com.liferay.portal.model.Group addGroup( HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = className; ...
if (className == null) {
if (name == null) {
public static com.liferay.portal.model.Group addGroup( HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = className; ...
Object paramObj1 = classPK;
Object paramObj1 = friendlyURL;
public static com.liferay.portal.model.Group addGroup( HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = className; ...
if (classPK == null) {
if (friendlyURL == null) {
public static com.liferay.portal.model.Group addGroup( HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = className; ...
Object paramObj2 = name; if (name == null) { paramObj2 = new NullWrapper("java.lang.String"); } Object paramObj3 = friendlyURL; if (friendlyURL == null) { paramObj3 = new NullWrapper("java.lang.String"); }
public static com.liferay.portal.model.Group addGroup( HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = className; ...
"addGroup", new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
"addGroup", new Object[] { paramObj0, paramObj1 });
public static com.liferay.portal.model.Group addGroup( HttpPrincipal httpPrincipal, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = className; ...
if (userTracker.isNew() || userTracker.isModified()) { session = openSession(); if (userTracker.isNew()) { UserTracker userTrackerModel = new UserTracker(); userTrackerModel.setUserTrackerId(userTracker.getUserTrackerId()); userTrackerModel.setCompanyId(userTracker.getCompanyId()); userTrackerModel.setUserId(userTrack...
session = openSession(); session.saveOrUpdate(userTracker); session.flush(); userTracker.setNew(false);
public com.liferay.portal.model.UserTracker update( com.liferay.portal.model.UserTracker userTracker) throws SystemException { Session session = null; try { if (userTracker.isNew() || userTracker.isModified()) { session = openSession(); if (userTracker.isNew()) { UserTracker userTrackerModel = new User...
setModified(true);
public void setExtension(String extension) { if (((extension == null) && (_extension != null)) || ((extension != null) && (_extension == null)) || ((extension != null) && (_extension != null) && !extension.equals(_extension))) { if (!XSS_ALLOW_EXTENSION) { extension = XSSUtil.strip(extension); } _ex...
setModified(true);
public void setNumber(String number) { if (((number == null) && (_number != null)) || ((number != null) && (_number == null)) || ((number != null) && (_number != null) && !number.equals(_number))) { if (!XSS_ALLOW_NUMBER) { number = XSSUtil.strip(number); } _number = number; setModified(true); } ...
setModified(true);
public void setPhoneId(String phoneId) { if (((phoneId == null) && (_phoneId != null)) || ((phoneId != null) && (_phoneId == null)) || ((phoneId != null) && (_phoneId != null) && !phoneId.equals(_phoneId))) { if (!XSS_ALLOW_PHONEID) { phoneId = XSSUtil.strip(phoneId); } _phoneId = phoneId; setModi...
if (wikiPage.isNew() || wikiPage.isModified()) { session = openSession(); if (wikiPage.isNew()) { WikiPage wikiPageModel = new WikiPage(); wikiPageModel.setNodeId(wikiPage.getNodeId()); wikiPageModel.setTitle(wikiPage.getTitle()); wikiPageModel.setVersion(wikiPage.getVersion()); wikiPageModel.setCompanyId(wikiPage.get...
session = openSession(); session.saveOrUpdate(wikiPage); session.flush(); wikiPage.setNew(false);
public com.liferay.portlet.wiki.model.WikiPage update( com.liferay.portlet.wiki.model.WikiPage wikiPage) throws SystemException { Session session = null; try { if (wikiPage.isNew() || wikiPage.isModified()) { session = openSession(); if (wikiPage.isNew()) { WikiPage wikiPageModel = new WikiPage(); ...
String topicId = ParamUtil.getString(req, "topicId");
public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { try { String topicId = ParamUtil.getString(req, "topicId"); String messageId = ParamUtil.getString(req, "messageId"); MBMessageDisplay messageDisplay = MBM...
topicId, messageId, req.getRemoteUser());
messageId, req.getRemoteUser());
public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { try { String topicId = ParamUtil.getString(req, "topicId"); String messageId = ParamUtil.getString(req, "messageId"); MBMessageDisplay messageDisplay = MBM...
String filterClass = config.getInitParameter("filter-class");
_config = config;
public void init(FilterConfig config) throws ServletException { String filterClass = config.getInitParameter("filter-class"); ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _filter = (Filter)classLoader.loadClass(filterClass).newInstance(); } catch (ClassNotFoundException cnfe) { thro...
ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _filter = (Filter)classLoader.loadClass(filterClass).newInstance(); } catch (ClassNotFoundException cnfe) { throw new ServletException(cnfe.getMessage()); } catch (IllegalAccessException iae) { throw new ServletException(iae.getMessage()); } catch...
PortalInitableUtil.init(this);
public void init(FilterConfig config) throws ServletException { String filterClass = config.getInitParameter("filter-class"); ClassLoader classLoader = PortalClassLoaderUtil.getClassLoader(); try { _filter = (Filter)classLoader.loadClass(filterClass).newInstance(); } catch (ClassNotFoundException cnfe) { thro...
Group group = GroupServiceUtil.addGroup( null, null, name, friendlyURL); GroupServiceUtil.addUserGroups( req.getRemoteUser(), new String[] {group.getGroupId()});
Group group = GroupServiceUtil.addGroup(name, friendlyURL);
protected void updateGroup(ActionRequest req) throws Exception { String groupId = ParamUtil.getString(req, "groupId"); String name = ParamUtil.getString(req, "name"); String friendlyURL = ParamUtil.getString(req, "friendlyURL"); if (Validator.isNull(groupId)) { // Add group Group group = GroupServiceUtil.addGr...
SessionErrors.add(req, PrincipalException.class.getName()); setForward(req, "portlet.portlet_configuration.error"); } } else if (selResource.equals(Layout.class.getName())) { String layoutGroupId = StringUtil.split(resourcePrimKey, ".")[1]; layoutGroupId = StringUtil.replace(layoutGroupId, "}", ""); if (!GroupPermis...
public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY); PermissionChecker permissionChecker = themeDisplay.getPermissionChecker(); ...
!oldCategoryId.equals(parentCategoryId)) {
!oldCategoryId.equals(parentCategoryId) && !parentCategoryId.equals(MBCategory.DEFAULT_PARENT_CATEGORY_ID)) {
public MBCategory updateCategory( String categoryId, String parentCategoryId, String name, String description, boolean mergeWithParentCategory) throws PortalException, SystemException { // Category MBCategory category = MBCategoryUtil.findByPrimaryKey(categoryId); String oldCategoryId = category.getParentCateg...
public static boolean hasReadFlag(java.lang.String topicId, java.lang.String messageId, java.lang.String userId)
public static boolean hasReadFlag(java.lang.String messageId, java.lang.String userId)
public static boolean hasReadFlag(java.lang.String topicId, java.lang.String messageId, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageFlagLocalService mbMessageFlagLocalService = MBMessageFlagLocalServiceFactory.getService(); return mb...
return mbMessageFlagLocalService.hasReadFlag(topicId, messageId, userId);
return mbMessageFlagLocalService.hasReadFlag(messageId, userId);
public static boolean hasReadFlag(java.lang.String topicId, java.lang.String messageId, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { MBMessageFlagLocalService mbMessageFlagLocalService = MBMessageFlagLocalServiceFactory.getService(); return mb...
if (portletPreferences.isNew() || portletPreferences.isModified()) { session = openSession(); if (portletPreferences.isNew()) { PortletPreferences portletPreferencesModel = new PortletPreferences(); portletPreferencesModel.setPortletId(portletPreferences.getPortletId()); portletPreferencesModel.setLayoutId(portletPref...
session = openSession(); session.saveOrUpdate(portletPreferences); session.flush(); portletPreferences.setNew(false);
public com.liferay.portal.model.PortletPreferences update( com.liferay.portal.model.PortletPreferences portletPreferences) throws SystemException { Session session = null; try { if (portletPreferences.isNew() || portletPreferences.isModified()) { session = openSession(); if (portletPreferences.isNew()) { ...
boolean hasUpdateLayoutPermission = LayoutPermission.contains( permissionChecker, layout, ActionKeys.UPDATE); if (hasUpdateLayoutPermission) { themeDisplay.setShowAddContentIcon(true); themeDisplay.setURLAddContent( "LayoutConfiguration.toggle('" + plid + "', '" + PortletKeys.LAYOUT_CONFIGURATION + "', '" + doAsUser...
public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { long start = 0; if (_log.isDebugEnabled()) { start = System.currentTimeMillis(); } try { HttpSession ses = req.getSession(); // Company Company company = PortalUtil.getCompany(req); String companyId = company.getCo...
setModified(true);
public void setExternalUserId(String externalUserId) { if (((externalUserId == null) && (_externalUserId != null)) || ((externalUserId != null) && (_externalUserId == null)) || ((externalUserId != null) && (_externalUserId != null) && !externalUserId.equals(_externalUserId))) { if (!XSS_ALLOW_EXTERNALUSERI...
java.lang.String topicId, java.lang.String messageId) throws RemoteException {
java.lang.String messageId) throws RemoteException {
public static void deleteDiscussionMessage(java.lang.String groupId, java.lang.String className, java.lang.String classPK, java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.deleteDiscussionMessage(groupId, className, classPK, topicId, messageId); } cat...
classPK, topicId, messageId);
classPK, messageId);
public static void deleteDiscussionMessage(java.lang.String groupId, java.lang.String className, java.lang.String classPK, java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.deleteDiscussionMessage(groupId, className, classPK, topicId, messageId); } cat...
public static void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException {
public static void deleteMessage(java.lang.String messageId) throws RemoteException {
public static void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.deleteMessage(topicId, messageId); } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteException(stackT...
MBMessageServiceUtil.deleteMessage(topicId, messageId);
MBMessageServiceUtil.deleteMessage(messageId);
public static void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.deleteMessage(topicId, messageId); } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteException(stackT...
java.lang.String topicId, java.lang.String messageId) throws RemoteException {
java.lang.String messageId) throws RemoteException {
public static com.liferay.portlet.messageboards.model.MBMessageModel getMessage( java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(topicId, messageId); return returnValue; } c...
com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(topicId, messageId);
com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(messageId);
public static com.liferay.portlet.messageboards.model.MBMessageModel getMessage( java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.getMessage(topicId, messageId); return returnValue; } c...
public static void subscribeMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException {
public static void subscribeMessage(java.lang.String messageId) throws RemoteException {
public static void subscribeMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.subscribeMessage(topicId, messageId); } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteException(...
MBMessageServiceUtil.subscribeMessage(topicId, messageId);
MBMessageServiceUtil.subscribeMessage(messageId);
public static void subscribeMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.subscribeMessage(topicId, messageId); } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteException(...
public static void unsubscribeMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException {
public static void unsubscribeMessage(java.lang.String messageId) throws RemoteException {
public static void unsubscribeMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.unsubscribeMessage(topicId, messageId); } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteExcept...
MBMessageServiceUtil.unsubscribeMessage(topicId, messageId);
MBMessageServiceUtil.unsubscribeMessage(messageId);
public static void unsubscribeMessage(java.lang.String topicId, java.lang.String messageId) throws RemoteException { try { MBMessageServiceUtil.unsubscribeMessage(topicId, messageId); } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteExcept...
java.lang.String classPK, java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws RemoteException {
java.lang.String classPK, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws RemoteException {
public static com.liferay.portlet.messageboards.model.MBMessageModel updateDiscussionMessage( java.lang.String groupId, java.lang.String className, java.lang.String classPK, java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws RemoteException { try { com....
className, classPK, topicId, messageId, subject, body);
className, classPK, messageId, subject, body);
public static com.liferay.portlet.messageboards.model.MBMessageModel updateDiscussionMessage( java.lang.String groupId, java.lang.String className, java.lang.String classPK, java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws RemoteException { try { com....
java.lang.String topicId, java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) throws RemoteException {
java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) throws RemoteException {
public static com.liferay.portlet.messageboards.model.MBMessageModel updateMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) throws RemoteException { try { com.liferay.portlet.messageboards.model.MBMe...
com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(topicId, messageId, categoryId, subject, body, files);
com.liferay.portlet.messageboards.model.MBMessage returnValue = MBMessageServiceUtil.updateMessage(messageId, categoryId, subject, body, files);
public static com.liferay.portlet.messageboards.model.MBMessageModel updateMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files) throws RemoteException { try { com.liferay.portlet.messageboards.model.MBMe...
String priorityName = priority[0]; String priorityImage = priority[1]; double priorityValue = GetterUtil.getDouble(priority[2]);
try { String priorityName = priority[0]; String priorityImage = priority[1]; double priorityValue = GetterUtil.getDouble(priority[2]);
public static String[] getThreadPriority( PortletPreferences prefs, double value, ThemeDisplay themeDisplay) throws Exception { String[] priorities = prefs.getValues("priorities", new String[0]); for (int i = 0; i < priorities.length; i++) { String[] priority = StringUtil.split(priorities[i]); String priority...
if (value == priorityValue) { if (!priorityImage.startsWith(Http.HTTP)) { priorityImage = themeDisplay.getPathThemeImage() + priorityImage;
if (value == priorityValue) { if (!priorityImage.startsWith(Http.HTTP)) { priorityImage = themeDisplay.getPathThemeImage() + priorityImage; } return new String[] {priorityName, priorityImage};
public static String[] getThreadPriority( PortletPreferences prefs, double value, ThemeDisplay themeDisplay) throws Exception { String[] priorities = prefs.getValues("priorities", new String[0]); for (int i = 0; i < priorities.length; i++) { String[] priority = StringUtil.split(priorities[i]); String priority...
return new String[] {priorityName, priorityImage};
} catch (Exception e) {
public static String[] getThreadPriority( PortletPreferences prefs, double value, ThemeDisplay themeDisplay) throws Exception { String[] priorities = prefs.getValues("priorities", new String[0]); for (int i = 0; i < priorities.length; i++) { String[] priority = StringUtil.split(priorities[i]); String priority...
Layout.PRIVATE + groupId, user.getActualCompanyId());
Layout.PRIVATE + groupId, group.getCompanyId());
public Group addGroup( String userId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { // Group User user = UserUtil.findByPrimaryKey(userId); if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, user.getActualCompanyId...
Layout.PUBLIC + groupId, user.getActualCompanyId());
Layout.PUBLIC + groupId, group.getCompanyId());
public Group addGroup( String userId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { // Group User user = UserUtil.findByPrimaryKey(userId); if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, user.getActualCompanyId...
user.getActualCompanyId(), "GROUP_" + groupId + "_ADMINISTRATOR", Group.class.getName(), groupId);
null, group.getCompanyId(), "GROUP_" + groupId + "_ADMINISTRATOR", Group.class.getName(), groupId);
public Group addGroup( String userId, String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { // Group User user = UserUtil.findByPrimaryKey(userId); if (Validator.isNull(className) || Validator.isNull(classPK)) { validateName(null, user.getActualCompanyId...
ResourceLocalServiceUtil.deleteResource( group.getCompanyId(), Group.class.getName(), Resource.TYPE_CLASS, Resource.SCOPE_INDIVIDUAL, group.getPrimaryKey().toString());
public void deleteGroup(String groupId) throws PortalException, SystemException { Group group = GroupUtil.findByPrimaryKey(groupId); if (PortalUtil.isSystemGroup(group.getName())) { throw new RequiredGroupException(); } // Layout sets LayoutSetLocalServiceUtil.deleteLayoutSet(Layout.PRIVATE + groupId); Layout...
clearOrganizations.clear(groupId); clearPermissions.clear(groupId); clearRoles.clear(groupId); clearUserGroups.clear(groupId); clearUsers.clear(groupId);
public Group remove(String groupId) throws NoSuchGroupException, SystemException { Session session = null; try { session = openSession(); Group group = (Group)session.get(Group.class, groupId); if (group == null) { _log.warn("No Group exists with the primary key " + groupId.toString()); throw new No...
java.lang.String companyId, java.lang.String className,
java.lang.String userId, java.lang.String className,
public static com.liferay.portal.model.Group addGroup( java.lang.String companyId, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { GroupLocalService groupLocalServi...
return groupLocalService.addGroup(companyId, className, classPK, name, friendlyURL);
return groupLocalService.addGroup(userId, className, classPK, name, friendlyURL);
public static com.liferay.portal.model.Group addGroup( java.lang.String companyId, java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { GroupLocalService groupLocalServi...
String groupId = PortalUtil.getPortletGroupId(req);
String groupId = ParamUtil.getString(req, "groupId");
public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { try { String companyId = PortalUtil.getCompanyId(req); String groupId = PortalUtil.getPortletGroupId(req); String templateId = getTemplateId(req); ThemeDispla...
Map tokens = JournalUtil.getTokens(themeDisplay);
Map tokens = JournalUtil.getTokens(groupId, themeDisplay);
public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { try { String companyId = PortalUtil.getCompanyId(req); String groupId = PortalUtil.getPortletGroupId(req); String templateId = getTemplateId(req); ThemeDispla...
public static String getTemplateScript(JournalTemplate template, Map tokens, String languageId, boolean transform)
public static String getTemplateScript( String companyId, String templateId, Map tokens, String languageId)
public static String getTemplateScript(JournalTemplate template, Map tokens, String languageId, boolean transform) throws PortalException, SystemException { String script = template.getXsl(); if (transform) { // Listeners String[] listeners = PropsUtil.getArray(PropsUtil.JOURNAL_TRANSFORMER_LISTENER); fo...
String script = template.getXsl(); if (transform) { String[] listeners = PropsUtil.getArray(PropsUtil.JOURNAL_TRANSFORMER_LISTENER); for (int i = 0; i < listeners.length; i++) { TransformerListener listener = null; try { listener = (TransformerListener)Class.forName( listeners[i]).newInstance(); listener.setToke...
return getTemplateScript( companyId, templateId, tokens, languageId, true);
public static String getTemplateScript(JournalTemplate template, Map tokens, String languageId, boolean transform) throws PortalException, SystemException { String script = template.getXsl(); if (transform) { // Listeners String[] listeners = PropsUtil.getArray(PropsUtil.JOURNAL_TRANSFORMER_LISTENER); fo...
if (text.indexOf(StringPool.SPACE) == -1) { text = KeywordsUtil.toWildcard(text); }
public static void addTerm( BooleanQuery booleanQuery, String field, String text) throws ParseException { if (Validator.isNotNull(text)) { if (text.indexOf(StringPool.SPACE) == -1) { text = KeywordsUtil.toWildcard(text); } QueryParser queryParser = new QueryParser(field, getAnalyzer()); Query query = qu...
Query query = queryParser.parse(text);
Query query = queryParser.parse(KeywordsUtil.toWildcard(text)); booleanQuery.add(query, BooleanClause.Occur.SHOULD); query = queryParser.parse(KeywordsUtil.toFuzzy(text));
public static void addTerm( BooleanQuery booleanQuery, String field, String text) throws ParseException { if (Validator.isNotNull(text)) { if (text.indexOf(StringPool.SPACE) == -1) { text = KeywordsUtil.toWildcard(text); } QueryParser queryParser = new QueryParser(field, getAnalyzer()); Query query = qu...
setModified(true);
public void setFriClose(int friClose) { if (friClose != _friClose) { _friClose = friClose; setModified(true); } }
setModified(true);
public void setFriOpen(int friOpen) { if (friOpen != _friOpen) { _friOpen = friOpen; setModified(true); } }
setModified(true);
public void setMonClose(int monClose) { if (monClose != _monClose) { _monClose = monClose; setModified(true); } }
setModified(true);
public void setMonOpen(int monOpen) { if (monOpen != _monOpen) { _monOpen = monOpen; setModified(true); } }
setModified(true);
public void setOrgLaborId(String orgLaborId) { if (((orgLaborId == null) && (_orgLaborId != null)) || ((orgLaborId != null) && (_orgLaborId == null)) || ((orgLaborId != null) && (_orgLaborId != null) && !orgLaborId.equals(_orgLaborId))) { if (!XSS_ALLOW_ORGLABORID) { orgLaborId = XSSUtil.strip(orgLaborI...
setModified(true);
public void setSatClose(int satClose) { if (satClose != _satClose) { _satClose = satClose; setModified(true); } }
setModified(true);
public void setSatOpen(int satOpen) { if (satOpen != _satOpen) { _satOpen = satOpen; setModified(true); } }
setModified(true);
public void setSunClose(int sunClose) { if (sunClose != _sunClose) { _sunClose = sunClose; setModified(true); } }
setModified(true);
public void setSunOpen(int sunOpen) { if (sunOpen != _sunOpen) { _sunOpen = sunOpen; setModified(true); } }
setModified(true);
public void setThuClose(int thuClose) { if (thuClose != _thuClose) { _thuClose = thuClose; setModified(true); } }
setModified(true);
public void setThuOpen(int thuOpen) { if (thuOpen != _thuOpen) { _thuOpen = thuOpen; setModified(true); } }
setModified(true);
public void setTueClose(int tueClose) { if (tueClose != _tueClose) { _tueClose = tueClose; setModified(true); } }
setModified(true);
public void setTueOpen(int tueOpen) { if (tueOpen != _tueOpen) { _tueOpen = tueOpen; setModified(true); } }
setModified(true);
public void setWedClose(int wedClose) { if (wedClose != _wedClose) { _wedClose = wedClose; setModified(true); } }
setModified(true);
public void setWedOpen(int wedOpen) { if (wedOpen != _wedOpen) { _wedOpen = wedOpen; setModified(true); } }
int value = lastPostDate1.compareTo(lastPostDate2);
int value = DateUtil.compareTo(lastPostDate1, lastPostDate2);
public int compare(Object obj1, Object obj2) { MBThread thread1 = (MBThread)obj1; MBThread thread2 = (MBThread)obj2; Date lastPostDate1 = thread1.getLastPostDate(); Date lastPostDate2 = thread2.getLastPostDate(); if ((lastPostDate1 == null) || (lastPostDate2 == null)) { return 0; } int value = lastPostDate1.c...
if (!(parent instanceof WizardDialog)) {
if (!(parent instanceof WizardDialogImpl)) {
public Object newInstance(Map properties, Object parent) throws GroovyException { // check location if (!(parent instanceof WizardDialog)) { throw new InvalidParentException("wizardDialog"); } // check for missing attributes String title = (String) properties.get("ti...
addScript( fileName, metadata );
private void setMetadata() { final String fileName = key( file ); metadata = scriptStore().get( fileName ); if( metadata != null ) return; try { metadata = getScriptMetadata( contents( file ) ); metadata.setFile( file ); scriptStore()...
jsonFolder.put("newCount", folder.getNewMessageCount());
jsonFolder.put("newCount", folder.getUnreadMessageCount());
protected String getFolders(HttpServletRequest req) throws Exception { HttpSession ses = req.getSession(); JSONObject jsonObj = new JSONObject(); JSONArray jsonFolders = new JSONArray(); int count = 1; Iterator itr = MailUtil.getFolders(ses).iterator(); while (itr.hasNext()) { MailFolder folder = (MailFolder)i...
jsonEnvelope.put("recent", mailEnvelope.isRecent());
jsonEnvelope.put("read", mailEnvelope.isRead());
protected String getPreview(HttpServletRequest req) throws Exception { JSONObject jsonObj = new JSONObject(); ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute( WebKeys.THEME_DISPLAY); User user = themeDisplay.getUser(); Locale locale = themeDisplay.getLocale(); TimeZone timeZone = themeDisplay.getTime...
for( final Object child : getChildren( dom ) ) elements.add( child );
for( final VarDescriptor child : ( VarDescriptor[] )getChildren( dom ) ) set.add( child ); elements.addAll( set );
private void flatView( final List< Object > elements ) { for( final DOMDescriptor dom : doms ) for( final Object child : getChildren( dom ) ) elements.add( child ); elements.addAll( includes ); for( final BundleDescriptor bundle : bundles ) for( final Obj...
setModified(true);
public void setHidden(boolean hidden) { if (hidden != _hidden) { _hidden = hidden; setModified(true); } }
setModified(true);
public void setParentLayoutId(String parentLayoutId) { if (((parentLayoutId == null) && (_parentLayoutId != null)) || ((parentLayoutId != null) && (_parentLayoutId == null)) || ((parentLayoutId != null) && (_parentLayoutId != null) && !parentLayoutId.equals(_parentLayoutId))) { if (!XSS_ALLOW_PARENTLAYOUTI...
setModified(true);
public void setPriority(int priority) { if (priority != _priority) { _priority = priority; setModified(true); } }
setModified(true);
public void setTypeSettings(String typeSettings) { if (((typeSettings == null) && (_typeSettings != null)) || ((typeSettings != null) && (_typeSettings == null)) || ((typeSettings != null) && (_typeSettings != null) && !typeSettings.equals(_typeSettings))) { if (!XSS_ALLOW_TYPESETTINGS) { typeSettings =...
value = getCreateDate().compareTo(emailAddress.getCreateDate());
value = DateUtil.compareTo(getCreateDate(), emailAddress.getCreateDate());
public int compareTo(Object obj) { if (obj == null) { return -1; } EmailAddress emailAddress = (EmailAddress)obj; int value = 0; value = getCreateDate().compareTo(emailAddress.getCreateDate()); if (value != 0) { return value; } return 0; }
if (shoppingItemField.isNew() || shoppingItemField.isModified()) { session = openSession(); if (shoppingItemField.isNew()) { ShoppingItemField shoppingItemFieldModel = new ShoppingItemField(); shoppingItemFieldModel.setItemFieldId(shoppingItemField.getItemFieldId()); shoppingItemFieldModel.setItemId(shoppingItemField....
session = openSession(); session.saveOrUpdate(shoppingItemField); session.flush(); shoppingItemField.setNew(false);
public com.liferay.portlet.shopping.model.ShoppingItemField update( com.liferay.portlet.shopping.model.ShoppingItemField shoppingItemField) throws SystemException { Session session = null; try { if (shoppingItemField.isNew() || shoppingItemField.isModified()) { session = openSession(); if (shoppingItemFiel...
public ColorScheme getColorScheme() {
public ColorScheme getColorScheme() throws PortalException, SystemException {
public ColorScheme getColorScheme() { return ThemeLocalUtil.getColorScheme( getCompanyId(), getTheme().getThemeId(), getColorSchemeId()); }
public Theme getTheme() {
public Theme getTheme() throws PortalException, SystemException {
public Theme getTheme() { return ThemeLocalUtil.getTheme(getCompanyId(), getThemeId()); }
ActionKeys.ADD_EVENT);
ActionKeys.ADD_QUESTION);
public PollsQuestion addQuestion( String plid, String title, String description, int expirationDateMonth, int expirationDateDay, int expirationDateYear, int expirationDateHour, int expirationDateMinute, boolean neverExpire, List choices, boolean addCommunityPermissions, boolean addGuestPermissions) throws P...
throw new RuntimeException( e );
public FieldEditor createField(Composite parent) { FieldEditor fieldEditor = null; try { Class[] types = { String.class, String.class, Composite.class}; Constructor constructor = beanClass.getConstructor(types); if (constructor != null) { ...
if (portlet == null) { _log.warn( "Returning preferences for a portlet that does not exist"); return PortletPreferencesSerializer.fromXML( companyId, pk, Portlet.DEFAULT_PREFERENCES); }
public javax.portlet.PortletPreferences getPreferences( String companyId, PortletPreferencesPK pk) throws PortalException, SystemException { Map prefsPool = PortletPreferencesLocalUtil.getPreferencesPool( pk.ownerId); PortletPreferencesImpl prefs = (PortletPreferencesImpl)prefsPool.get(pk); if (prefs == null...
if (pk.portletId.equals(PortletKeys.LIFERAY_PORTAL)) {
if (portlet == null) {
public javax.portlet.PortletPreferences getPreferences( String companyId, PortletPreferencesPK pk) throws PortalException, SystemException { Map prefsPool = PortletPreferencesLocalUtil.getPreferencesPool( pk.ownerId); PortletPreferencesImpl prefs = (PortletPreferencesImpl)prefsPool.get(pk); if (prefs == null...
STRUTS_BRIDGES_CONTEXT_PROVIDER);
ServletContextProvider.STRUTS_BRIDGES_CONTEXT_PROVIDER);
private ServletContextProvider _getProvider(GenericPortlet portlet) { PortletContext portletCtx = portlet.getPortletContext(); if (_provider == null) { _provider = (ServletContextProvider)portletCtx.getAttribute( STRUTS_BRIDGES_CONTEXT_PROVIDER); } return _provider; }
public com.liferay.portal.model.Group addGroup(java.lang.String className, java.lang.String classPK, java.lang.String name,
public com.liferay.portal.model.Group addGroup(java.lang.String name,
public com.liferay.portal.model.Group addGroup(java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException, java.rmi.RemoteException { PrincipalSessionBean.setThreadValues(_sc); return g...
return getService().addGroup(className, classPK, name, friendlyURL);
return getService().addGroup(name, friendlyURL);
public com.liferay.portal.model.Group addGroup(java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException, java.rmi.RemoteException { PrincipalSessionBean.setThreadValues(_sc); return g...
Random random = new Random(); /*Group generalGuestGroup = GroupLocalServiceUtil.getGroupByName( PortalUtil.getCompanyId(req), Group.GENERAL_GUEST);
Group generalGuestGroup = GroupLocalServiceUtil.getGroup( themeDisplay.getCompanyId(), Group.GUEST);
public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { // Disable caching for CSS and JavaScript PropsUtil.set(PropsUtil.LAST_MODIFIED_CHECK, "false"); // Do not randomize layout unless the user is logged in ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribut...