rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
sb.append("}"); sb.append("else {"); sb.append(entity.getName() + " " + entity.getVarName() + "Model = (" + entity.getName() + ")session.get(" + entity.getName() + ".class, " + entity.getVarName() + ".getPrimaryKey());"); sb.append("if (" + entity.getVarName() + "Model != null) {"); for (int i = 0; i < columnList.size...
private void _createPersistence(Entity entity) throws IOException { List columnList = entity.getColumnList(); List finderList = entity.getFinderList(); String pkClassName = entity.getPKClassName(); String pkVarName = entity.getPKVarName(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + ...
sb.append(entity.getVarName() + ".setModified(false);"); sb.append("}");
private void _createPersistence(Entity entity) throws IOException { List columnList = entity.getColumnList(); List finderList = entity.getFinderList(); String pkClassName = entity.getPKClassName(); String pkVarName = entity.getPKVarName(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + ...
Iterator itr = headers.keySet().itrator();
Iterator itr = headers.keySet().iterator();
public void doFilter( ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { if (USE_LAYOUT_CACHE_FILTER) { _log.debug("Layout Cache is enabled"); } else { _log.debug("Layout Cache is disabled"); } HttpServletRequest request = (HttpServletRequest)req; HttpServle...
String subj0 = _stripPrefixes(me0.getSubject().trim().toLowerCase()); String subj1 = _stripPrefixes(me1.getSubject().trim().toLowerCase());
String subj0 = _stripPrefixes( GetterUtil.getString(me0.getSubject()).trim().toLowerCase()); String subj1 = _stripPrefixes( GetterUtil.getString(me1.getSubject()).trim().toLowerCase());
public int compare(Object arg0, Object arg1) { MailEnvelope me0 = (MailEnvelope)arg0; MailEnvelope me1 = (MailEnvelope)arg1; Long uid0 = new Long(me0.getMsgUID()); Long uid1 = new Long(me1.getMsgUID()); String subj0 = _stripPrefixes(me0.getSubject().trim().toLowerCase()); String subj1 = _stripPrefixes(me1.getSub...
Folder folder = MailUtil.getFolder(req, "Inbox");
String folderId = ParamUtil.getString(req, "folderId"); Folder folder = MailUtil.getFolder(req, folderId);
public String getJSON( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); String userId = ParamUtil.getString(req, "userId"); String rtString = ""; if ("getFolders".equals(cmd)) { List folders = ...
System.out.println("newnewer");
System.out.println("super");
public String getJSON( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); String userId = ParamUtil.getString(req, "userId"); String rtString = ""; if ("getFolders".equals(cmd)) { List folders = ...
if (account.isNew() || account.isModified()) { session = openSession(); if (account.isNew()) { Account accountModel = new Account(); accountModel.setAccountId(account.getAccountId()); accountModel.setCompanyId(account.getCompanyId()); accountModel.setUserId(account.getUserId()); accountModel.setUserName(account.getUse...
session = openSession(); session.saveOrUpdate(account); session.flush(); account.setNew(false);
public com.liferay.portal.model.Account update( com.liferay.portal.model.Account account) throws SystemException { Session session = null; try { if (account.isNew() || account.isModified()) { session = openSession(); if (account.isNew()) { Account accountModel = new Account(); accountModel.setAccoun...
value = getCreateDate().compareTo(mbTopic.getCreateDate());
value = DateUtil.compareTo(getCreateDate(), mbTopic.getCreateDate());
public int compareTo(Object obj) { if (obj == null) { return -1; } MBTopic mbTopic = (MBTopic)obj; int value = 0; value = getCreateDate().compareTo(mbTopic.getCreateDate()); value = value * -1; if (value != 0) { return value; } return 0; }
if (bookmarksFolder.isNew() || bookmarksFolder.isModified()) { session = openSession(); if (bookmarksFolder.isNew()) { BookmarksFolder bookmarksFolderModel = new BookmarksFolder(); bookmarksFolderModel.setFolderId(bookmarksFolder.getFolderId()); bookmarksFolderModel.setGroupId(bookmarksFolder.getGroupId()); bookmarksF...
session = openSession(); session.saveOrUpdate(bookmarksFolder); session.flush(); bookmarksFolder.setNew(false);
public com.liferay.portlet.bookmarks.model.BookmarksFolder update( com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder) throws SystemException { Session session = null; try { if (bookmarksFolder.isNew() || bookmarksFolder.isModified()) { session = openSession(); if (bookmarksFolder.isNew())...
for (int i = 0; i < EMOTICON_MAPPING.length; i++) { String imgTag = "<img src='" + EMOTICON_MAPPING[i][0] + "' />"; html = StringUtil.replace(html, EMOTICON_MAPPING[i][1], imgTag);
for (int i = 0; i < _EMOTICONS.length; i++) { String imgTag = "<img src='" + _EMOTICONS[i][0] + "' />"; html = StringUtil.replace(html, _EMOTICONS[i][1], imgTag);
public static String getHTML(String bbcode) { String html = StringUtil.replace(bbcode, _BBCODE_TAGS, _HTML_TAGS); for (int i = 0; i < EMOTICON_MAPPING.length; i++) { String imgTag = "<img src='" + EMOTICON_MAPPING[i][0] + "' />"; html = StringUtil.replace(html, EMOTICON_MAPPING[i][1], imgTag); } BBCodeTag t...
q.setCacheable(true);
q.setCacheable(false);
public int getOrganizationsSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETORGANIZATIONSSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInsta...
q.setCacheable(true);
q.setCacheable(false);
public int getPermissionsSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETPERMISSIONSSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInstance(...
q.setCacheable(true);
q.setCacheable(false);
public int getRolesSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETROLESSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInstance(q); qPos.a...
q.setCacheable(true);
q.setCacheable(false);
public int getUserGroupsSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETUSERGROUPSSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInstance(q)...
EmailAddressLocalServiceUtil.deleteAll( contact.getCompanyId(), Contact.class.getName(), contactId); ContactUtil.remove(contactId);
deleteContact(contact);
public void deleteContact(String contactId) throws PortalException, SystemException { Contact contact = ContactUtil.findByPrimaryKey(contactId); // Delete contact's email addresses EmailAddressLocalServiceUtil.deleteAll( contact.getCompanyId(), Contact.class.getName(), contactId); // Delete contact ContactUtil...
public void init(ServletConfig sc) throws ServletException {
public void init(ServletConfig config) throws ServletException {
public void init(ServletConfig sc) throws ServletException { synchronized (ChatServlet.class) { if (CHAT_AVAILABLE) { super.init(sc); } } }
super.init(sc);
super.init(config);
public void init(ServletConfig sc) throws ServletException { synchronized (ChatServlet.class) { if (CHAT_AVAILABLE) { super.init(sc); } } }
java.lang.String groupId, java.lang.String userId, java.lang.String name, java.lang.String primKey, boolean portletActions, boolean addCommunityPermissions, boolean addGuestPermissions)
java.lang.String groupId, java.lang.String name, boolean portletActions)
public void addResources(java.lang.String companyId, java.lang.String groupId, java.lang.String userId, java.lang.String name, java.lang.String primKey, boolean portletActions, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemExce...
if( buildingStatus.getException() != null ) { buffer.append( getFullStackTrace( buildingStatus.getException() ) ); buffer.append( "\n" ); }
private void populateCopyBuffer(IStatus buildingStatus, StringBuffer buffer, int nesting) { if (!buildingStatus.matches(displayMask)) { return; } for (int i = 0; i < nesting; i++) { buffer.append(NESTING_INDENT); } buffer.append(buildingStatus.getMessage())...
sb.append("import java.util.HashSet;");
private void _createHBM(Entity entity) throws IOException { List pkList = entity.getPKList(); List columnList = entity.getColumnList(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + _packagePath + ".service.persistence;"); // Imports sb.append("import " + _packagePath + ".model." + ent...
sb.append("if (_" + col.getName() + " == null) {"); sb.append("_" + col.getName() + " = new HashSet();"); sb.append("}");
private void _createHBM(Entity entity) throws IOException { List pkList = entity.getPKList(); List columnList = entity.getColumnList(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + _packagePath + ".service.persistence;"); // Imports sb.append("import " + _packagePath + ".model." + ent...
else if (col.isCollection()) { sb.append(entity.getVarName() + "HBM.set" + col.getMethodName() + "(new HashSet());"); }
private void _createPersistence(Entity entity) throws IOException { List pkList = entity.getPKList(); List columnList = entity.getColumnList(); List finderList = entity.getFinderList(); String pkClassName = entity.getPKClassName(); String pkVarName = entity.getPKVarName(); StringBuffer sb = new StringBuffer(); ...
LayoutServiceUtil.updateLayout(
LayoutLocalServiceUtil.updateLayout(
public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { HttpSession ses = req.getSession(); String companyId = PortalUtil.getCompanyId(req); String userId = PortalUtil.getUserId(req); Map currentUsers = (Map)WebAppPool.get(companyId, WebKeys.CURRENT_USERS); boolea...
_log.error(e);
_log.error(StackTraceUtil.getStackTrace(e));
public void consume() { try { QueueConnectionFactory qcf = MailQCFUtil.getQCF(); QueueConnection con = qcf.createQueueConnection(); QueueSession session = con.createQueueSession( false, Session.AUTO_ACKNOWLEDGE); Queue queue = (Queue)MailQueueUtil.getQueue(); QueueReceiver subscriber = session.createRece...
_log.error(e);
_log.error(StackTraceUtil.getStackTrace(e));
public void onMessage(Message msg) { try { ObjectMessage objMsg = (ObjectMessage)msg; Object obj = objMsg.getObject(); if (obj instanceof MailMessage) { _onMessage((MailMessage)obj); } else if (obj instanceof MethodWrapper) { _onMessage((MethodWrapper)obj); } } catch (Exception e) { _log.error(e...
setModified(true);
public void setPasswordTrackerId(String passwordTrackerId) { if (((passwordTrackerId == null) && (_passwordTrackerId != null)) || ((passwordTrackerId != null) && (_passwordTrackerId == null)) || ((passwordTrackerId != null) && (_passwordTrackerId != null) && !passwordTrackerId.equals(_passwordTrackerId))) { ...
value = getDisplayDate().compareTo(blogsEntry.getDisplayDate());
value = DateUtil.compareTo(getDisplayDate(), blogsEntry.getDisplayDate());
public int compareTo(Object obj) { if (obj == null) { return -1; } BlogsEntry blogsEntry = (BlogsEntry)obj; int value = 0; value = getDisplayDate().compareTo(blogsEntry.getDisplayDate()); value = value * -1; if (value != 0) { return value; } return 0; }
value = getName().compareTo(blogsCategory.getName());
value = getName().toLowerCase().compareTo(blogsCategory.getName() .toLowerCase());
public int compareTo(Object obj) { if (obj == null) { return -1; } BlogsCategory blogsCategory = (BlogsCategory)obj; int value = 0; value = getName().compareTo(blogsCategory.getName()); if (value != 0) { return value; } return 0; }
if (shoppingItem.isNew() || shoppingItem.isModified()) { session = openSession(); if (shoppingItem.isNew()) { ShoppingItem shoppingItemModel = new ShoppingItem(); shoppingItemModel.setItemId(shoppingItem.getItemId()); shoppingItemModel.setCompanyId(shoppingItem.getCompanyId()); shoppingItemModel.setUserId(shoppingItem...
session = openSession(); session.saveOrUpdate(shoppingItem); session.flush(); shoppingItem.setNew(false);
public com.liferay.portlet.shopping.model.ShoppingItem update( com.liferay.portlet.shopping.model.ShoppingItem shoppingItem) throws SystemException { Session session = null; try { if (shoppingItem.isNew() || shoppingItem.isModified()) { session = openSession(); if (shoppingItem.isNew()) { ShoppingItem ...
super();
public ABList() { super(); }
java.lang.String articleId, double version, boolean incrementVersion, java.lang.String title, java.lang.String content, java.lang.String type, java.lang.String structureId, java.lang.String templateId, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int displayDateMinute, int expirat...
java.lang.String companyId, java.lang.String articleId, double version, boolean incrementVersion, java.lang.String title, java.lang.String content, java.lang.String type, java.lang.String structureId, java.lang.String templateId, int displayDateMonth, int displayDateDay, int displayDateYear, int displayDateHour, int di...
public com.liferay.portlet.journal.model.JournalArticle updateArticle( java.lang.String articleId, double version, boolean incrementVersion, java.lang.String title, java.lang.String content, java.lang.String type, java.lang.String structureId, java.lang.String templateId, int displayDateMonth, int displayDateDay, ...
if (!permissionChecker.hasPermission(
if (selResource.equals(User.class.getName())) { User user = UserLocalServiceUtil.getUserById(resourcePrimKey); if (!UserPermission.contains( permissionChecker, resourcePrimKey, user.getOrganization().getOrganizationId(), user.getLocation().getOrganizationId(), ActionKeys.PERMISSIONS)) { SessionErrors.add(req, Princip...
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(); ...
GroupLocalServiceUtil.addGroup( companyId, Organization.class.getName(), organizationId, null, null);
try { User user = UserLocalServiceUtil.getDefaultUser( companyId); GroupLocalServiceUtil.addGroup( user.getUserId(), Organization.class.getName(), organizationId, null, null); } catch (Exception e) { }
private void _upgradeOrganization() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_ORGANIZATION); rs = ps.executeQuery(); while (rs.next()) { String organizationId...
StringBuffer query = new StringBuffer(); query.append("SELECT password_ "); query.append("FROM User_ WHERE "); query.append("userId = ?"); ps = con.prepareStatement(query.toString());
ps = con.prepareStatement(_CHECK_PASSWORD);
public String checkPassword(String userId, String password) throws CustomRegistryException, PasswordCheckFailedException, RemoteException { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); StringBuffer query = new String...
catch (NamingException ne) { return userId; }
public String checkPassword(String userId, String password) throws CustomRegistryException, PasswordCheckFailedException, RemoteException { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); StringBuffer query = new String...
int value = page1.getCreateDate().compareTo(page2.getCreateDate());
int value = DateUtil.compareTo( page1.getCreateDate(), page2.getCreateDate());
public int compare(Object obj1, Object obj2) { WikiPage page1 = (WikiPage)obj1; WikiPage page2 = (WikiPage)obj2; int value = page1.getCreateDate().compareTo(page2.getCreateDate()); if (_asc) { return value; } else { return -value; } }
return getSessionFactory(SESSION_FACTORY_NAME);
return getSessionFactory(SPRING_HIBERNATE_SESSION_FACTORY);
public static SessionFactoryImplementor getSessionFactory() { return getSessionFactory(SESSION_FACTORY_NAME); }
else { _log.debug("Processing path " + path); }
protected String processPath( HttpServletRequest req, HttpServletResponse res) throws IOException { String path = req.getParameter("struts_action"); if (Validator.isNull(path)) { path = (String)req.getAttribute(WebKeys.PORTLET_STRUTS_ACTION); } if (path == null) { PortletConfigImpl portletConfig = (Portl...
updateContentSearch(req, portletResource, article.getArticleId());
protected void updateArticle(ActionRequest req) throws Exception { String cmd = ParamUtil.getString(req, Constants.CMD); Layout layout = (Layout)req.getAttribute(WebKeys.LAYOUT); String companyId = PortalUtil.getCompanyId(req); String articleId = ParamUtil.getString(req, "articleId"); boolean autoArticleId = Para...
apply(null, '\0', 0, fOffset);
apply(document, '\0', fOffset);
public void apply(IDocument document) { apply(null, '\0', 0, fOffset); }
if (layoutSet.isNew() || layoutSet.isModified()) { session = openSession(); if (layoutSet.isNew()) { LayoutSet layoutSetModel = new LayoutSet(); layoutSetModel.setOwnerId(layoutSet.getOwnerId()); layoutSetModel.setCompanyId(layoutSet.getCompanyId()); layoutSetModel.setGroupId(layoutSet.getGroupId()); layoutSetModel.se...
session = openSession(); session.saveOrUpdate(layoutSet); session.flush(); layoutSet.setNew(false);
public com.liferay.portal.model.LayoutSet update( com.liferay.portal.model.LayoutSet layoutSet) throws SystemException { Session session = null; try { if (layoutSet.isNew() || layoutSet.isModified()) { session = openSession(); if (layoutSet.isNew()) { LayoutSet layoutSetModel = new LayoutSet(); layo...
list.add(folders[i].getName());
list.add(folders[i]);
public static List getAllFolders(Store store) throws Exception { List list = new ArrayList(); Folder root = store.getDefaultFolder(); try { Folder [] folders = root.list(); for (int i = 0; i < folders.length; i++) { if ((folders[i].getType() & Folder.HOLDS_MESSAGES) != 0) { list.add(folders[i].getNam...
final IStructuredSelection sel = ( IStructuredSelection )selection; final List selectedObjects = sel.toList(); for( final Iterator iter = selectedObjects.iterator(); iter.hasNext(); )
final List< IFile > scripts = getScripts(); for( final IFile script : scripts )
public void run( final IAction action ) { String result = ""; final IStructuredSelection sel = ( IStructuredSelection )selection; final List selectedObjects = sel.toList(); for( final Iterator iter = selectedObjects.iterator(); iter.hasNext(); ) { final IFile element...
final IFile element = ( IFile )iter.next();
public void run( final IAction action ) { String result = ""; final IStructuredSelection sel = ( IStructuredSelection )selection; final List selectedObjects = sel.toList(); for( final Iterator iter = selectedObjects.iterator(); iter.hasNext(); ) { final IFile element...
final String contents = getContents( element );
final String contents = getContents( script );
public void run( final IAction action ) { String result = ""; final IStructuredSelection sel = ( IStructuredSelection )selection; final List selectedObjects = sel.toList(); for( final Iterator iter = selectedObjects.iterator(); iter.hasNext(); ) { final IFile element...
value = getLastPostDate().compareTo(mbThread.getLastPostDate());
value = DateUtil.compareTo(getLastPostDate(), mbThread.getLastPostDate());
public int compareTo(Object obj) { if (obj == null) { return -1; } MBThread mbThread = (MBThread)obj; int value = 0; value = getLastPostDate().compareTo(mbThread.getLastPostDate()); value = value * -1; if (value != 0) { return value; } return 0; }
if (PermissionFinder.countByGroupsPermissions( permissions, groups) > 0) {
if (groups.size() > 0) { if (PermissionFinder.countByGroupsPermissions( permissions, groups) > 0) {
public boolean hasUserPermissions( String userId, String groupId, String actionId, String[] resourceIds, PermissionCheckerBag permissionCheckerBag) throws PortalException, SystemException { long start = 0; if (_log.isDebugEnabled()) { start = System.currentTimeMillis(); } // Return false if there is no reso...
return true;
return true; }
public boolean hasUserPermissions( String userId, String groupId, String actionId, String[] resourceIds, PermissionCheckerBag permissionCheckerBag) throws PortalException, SystemException { long start = 0; if (_log.isDebugEnabled()) { start = System.currentTimeMillis(); } // Return false if there is no reso...
ImageLocalServiceUtil.deleteByImageId("%.journal.article.PREVIEW_%");
ImageLocalServiceUtil.deleteImages("%.journal.article.PREVIEW_%");
private void _deleteTempImages() throws PortalException, SystemException { // Journal ImageLocalServiceUtil.deleteByImageId("%.journal.article.PREVIEW_%"); }
String groupId, String className, String classPK, String topicId, String messageId)
String groupId, String className, String classPK, String messageId)
public void deleteDiscussionMessage( String groupId, String className, String classPK, String topicId, String messageId) throws PortalException, SystemException { MBDiscussionPermission.check( getPermissionChecker(), groupId, className, classPK, ActionKeys.DELETE_DISCUSSION); MBMessageLocalServiceUtil.delet...
MBMessageLocalServiceUtil.deleteDiscussionMessage(topicId, messageId);
MBMessageLocalServiceUtil.deleteDiscussionMessage(messageId);
public void deleteDiscussionMessage( String groupId, String className, String classPK, String topicId, String messageId) throws PortalException, SystemException { MBDiscussionPermission.check( getPermissionChecker(), groupId, className, classPK, ActionKeys.DELETE_DISCUSSION); MBMessageLocalServiceUtil.delet...
public void deleteMessage(String topicId, String messageId)
public void deleteMessage(String messageId)
public void deleteMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.DELETE); MBMessageLocalServiceUtil.deleteMessage(topicId, messageId); }
getPermissionChecker(), topicId, messageId, ActionKeys.DELETE);
getPermissionChecker(), messageId, ActionKeys.DELETE);
public void deleteMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.DELETE); MBMessageLocalServiceUtil.deleteMessage(topicId, messageId); }
MBMessageLocalServiceUtil.deleteMessage(topicId, messageId);
MBMessageLocalServiceUtil.deleteMessage(messageId);
public void deleteMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.DELETE); MBMessageLocalServiceUtil.deleteMessage(topicId, messageId); }
public MBMessage getMessage(String topicId, String messageId)
public MBMessage getMessage(String messageId)
public MBMessage getMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.VIEW); return MBMessageLocalServiceUtil.getMessage(topicId, messageId); }
getPermissionChecker(), topicId, messageId, ActionKeys.VIEW);
getPermissionChecker(), messageId, ActionKeys.VIEW);
public MBMessage getMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.VIEW); return MBMessageLocalServiceUtil.getMessage(topicId, messageId); }
return MBMessageLocalServiceUtil.getMessage(topicId, messageId);
return MBMessageLocalServiceUtil.getMessage(messageId);
public MBMessage getMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.VIEW); return MBMessageLocalServiceUtil.getMessage(topicId, messageId); }
public void subscribeMessage(String topicId, String messageId)
public void subscribeMessage(String messageId)
public void subscribeMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE); MBMessageLocalServiceUtil.subscribeMessage( getUserId(), topicId, messageId); }
getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE);
getPermissionChecker(), messageId, ActionKeys.SUBSCRIBE);
public void subscribeMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE); MBMessageLocalServiceUtil.subscribeMessage( getUserId(), topicId, messageId); }
MBMessageLocalServiceUtil.subscribeMessage( getUserId(), topicId, messageId);
MBMessageLocalServiceUtil.subscribeMessage(getUserId(), messageId);
public void subscribeMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE); MBMessageLocalServiceUtil.subscribeMessage( getUserId(), topicId, messageId); }
public void unsubscribeMessage(String topicId, String messageId)
public void unsubscribeMessage(String messageId)
public void unsubscribeMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE); MBMessageLocalServiceUtil.unsubscribeMessage( getUserId(), topicId, messageId); }
getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE);
getPermissionChecker(), messageId, ActionKeys.SUBSCRIBE);
public void unsubscribeMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE); MBMessageLocalServiceUtil.unsubscribeMessage( getUserId(), topicId, messageId); }
MBMessageLocalServiceUtil.unsubscribeMessage( getUserId(), topicId, messageId);
MBMessageLocalServiceUtil.unsubscribeMessage(getUserId(), messageId);
public void unsubscribeMessage(String topicId, String messageId) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.SUBSCRIBE); MBMessageLocalServiceUtil.unsubscribeMessage( getUserId(), topicId, messageId); }
String groupId, String className, String classPK, String topicId, String messageId, String subject, String body)
String groupId, String className, String classPK, String messageId, String subject, String body)
public MBMessage updateDiscussionMessage( String groupId, String className, String classPK, String topicId, String messageId, String subject, String body) throws PortalException, SystemException { MBDiscussionPermission.check( getPermissionChecker(), groupId, className, classPK, ActionKeys.UPDATE_DISCUSSION)...
topicId, messageId, subject, body);
messageId, subject, body);
public MBMessage updateDiscussionMessage( String groupId, String className, String classPK, String topicId, String messageId, String subject, String body) throws PortalException, SystemException { MBDiscussionPermission.check( getPermissionChecker(), groupId, className, classPK, ActionKeys.UPDATE_DISCUSSION)...
String topicId, String messageId, String categoryId, String subject, String body, List files)
String messageId, String categoryId, String subject, String body, List files)
public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.UPDATE); return MBMessageLocalServiceUtil.updateMessage( t...
getPermissionChecker(), topicId, messageId, ActionKeys.UPDATE);
getPermissionChecker(), messageId, ActionKeys.UPDATE);
public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.UPDATE); return MBMessageLocalServiceUtil.updateMessage( t...
topicId, messageId, categoryId, subject, body, files, null);
messageId, categoryId, subject, body, files, null);
public MBMessage updateMessage( String topicId, String messageId, String categoryId, String subject, String body, List files) throws PortalException, SystemException { MBMessagePermission.check( getPermissionChecker(), topicId, messageId, ActionKeys.UPDATE); return MBMessageLocalServiceUtil.updateMessage( t...
baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir();
baseDir = PrefsPropsUtil.getString( PropsUtil.AUTO_DEPLOY_DEPLOY_DIR); destDir = PrefsPropsUtil.getString(PropsUtil.AUTO_DEPLOY_DEST_DIR);
public AutoPortletDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); portletTaglibDTD = DeployUtil.getResourcePath( "liferay-portlet.tld"); unpackWar = OmniadminUtil.getAutoDeployUnpackWar(); ...
unpackWar = OmniadminUtil.getAutoDeployUnpackWar(); tomcatLibDir = OmniadminUtil.getAutoDeployTomcatLibDir();
unpackWar = PrefsPropsUtil.getBoolean( PropsUtil.AUTO_DEPLOY_UNPACK_WAR); tomcatLibDir = PrefsPropsUtil.getString( PropsUtil.AUTO_DEPLOY_TOMCAT_LIB_DIR);
public AutoPortletDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); portletTaglibDTD = DeployUtil.getResourcePath( "liferay-portlet.tld"); unpackWar = OmniadminUtil.getAutoDeployUnpackWar(); ...
try { PortalUtil.getSelectedUser(req); } catch (Exception e) { if (e != null && e instanceof PrincipalException) { SessionErrors.add(req, e.getClass().getName()); return mapping.findForward("portlet.enterprise_admin.error"); } else { throw e; } }
public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { return mapping.findForward( getForward(req, "portlet.enterprise_admin.edit_user")); }
if (mbCategory.isNew() || mbCategory.isModified()) { session = openSession(); if (mbCategory.isNew()) { MBCategory mbCategoryModel = new MBCategory(); mbCategoryModel.setCategoryId(mbCategory.getCategoryId()); mbCategoryModel.setGroupId(mbCategory.getGroupId()); mbCategoryModel.setCompanyId(mbCategory.getCompanyId());...
session = openSession(); session.saveOrUpdate(mbCategory); session.flush(); mbCategory.setNew(false);
public com.liferay.portlet.messageboards.model.MBCategory update( com.liferay.portlet.messageboards.model.MBCategory mbCategory) throws SystemException { Session session = null; try { if (mbCategory.isNew() || mbCategory.isModified()) { session = openSession(); if (mbCategory.isNew()) { MBCategory mbCa...
if (path.endsWith("-complete")) { sb.append("_"); }
private String _buildPramatiXMLWebModule(String path) throws DocumentException, IOException { String contextRoot = path.substring(2, path.length() - 4); String filePath = path + "/docroot/WEB-INF/web.xml"; if (path.endsWith("-complete")) { contextRoot = "/"; filePath = path.substring(0, path.length() - 9) +...
layout = LayoutClonePool.clone(req, layout);
layout = (Layout)layout.clone();
public void run(HttpServletRequest req, HttpServletResponse res) throws ActionException { try { HttpSession ses = req.getSession(); // Company Company company = PortalUtil.getCompany(req); String companyId = company.getCompanyId(); // Paths String contextPath = CompanyPropsUtil.get( companyId, PropsUt...
sb.append("value = " + col.getName() + ".compareTo(pk." + col.getName() + ");");
if (colType.equals("Date")) { sb.append("value = DateUtil.compareTo(" + col.getName() + ", pk." + col.getName() + ");"); } else { sb.append("value = " + col.getName() + ".compareTo(pk." + col.getName() + ");"); }
private void _createEJBPK(Entity entity) throws IOException { List pkList = entity.getPKList(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + _packagePath + ".service.persistence;"); // Imports sb.append("import com.liferay.util.StringPool;"); sb.append("import java.io.Serializable;");...
String colType = col.getType();
private void _createEJBPK(Entity entity) throws IOException { List pkList = entity.getPKList(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + _packagePath + ".service.persistence;"); // Imports sb.append("import com.liferay.util.StringPool;"); sb.append("import java.io.Serializable;");...
if (col.isCaseSensitive()) { sb.append("value = get" + col.getMethodName() + "().compareTo(" + entity.getVarName() + ".get" + col.getMethodName() + "());");
if (colType.equals("Date")) { sb.append("value = DateUtil.compareTo(get" + col.getMethodName() + "(), " + entity.getVarName() + ".get" + col.getMethodName() + "());");
private void _createModel(Entity entity) throws IOException { List pkList = entity.getPKList(); List columnList = entity.getColumnList(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + _packagePath + ".model;"); // Imports if (entity.hasCompoundPK()) { sb.append("import " + _packagePa...
sb.append("value = get" + col.getMethodName() + "().toLowerCase().compareTo(" + entity.getVarName() + ".get" + col.getMethodName() + "().toLowerCase());");
if (col.isCaseSensitive()) { sb.append("value = get" + col.getMethodName() + "().compareTo(" + entity.getVarName() + ".get" + col.getMethodName() + "());"); } else { sb.append("value = get" + col.getMethodName() + "().toLowerCase().compareTo(" + entity.getVarName() + ".get" + col.getMethodName() + "().toLowerCase());")...
private void _createModel(Entity entity) throws IOException { List pkList = entity.getPKList(); List columnList = entity.getColumnList(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + _packagePath + ".model;"); // Imports if (entity.hasCompoundPK()) { sb.append("import " + _packagePa...
if (col.getType().equals("boolean")) {
if (colType.equals("boolean")) {
private void _createModel(Entity entity) throws IOException { List pkList = entity.getPKList(); List columnList = entity.getColumnList(); StringBuffer sb = new StringBuffer(); // Package sb.append("package " + _packagePath + ".model;"); // Imports if (entity.hasCompoundPK()) { sb.append("import " + _packagePa...
setModified(true);
public void setLangType(String langType) { if (((langType == null) && (_langType != null)) || ((langType != null) && (_langType == null)) || ((langType != null) && (_langType != null) && !langType.equals(_langType))) { if (!XSS_ALLOW_LANGTYPE) { langType = XSSUtil.strip(langType); } _langType = lang...
setModified(true);
public void setSmallImage(boolean smallImage) { if (smallImage != _smallImage) { _smallImage = smallImage; setModified(true); } }
setModified(true);
public void setSmallImageURL(String smallImageURL) { if (((smallImageURL == null) && (_smallImageURL != null)) || ((smallImageURL != null) && (_smallImageURL == null)) || ((smallImageURL != null) && (_smallImageURL != null) && !smallImageURL.equals(_smallImageURL))) { if (!XSS_ALLOW_SMALLIMAGEURL) { sma...
setModified(true);
public void setXsl(String xsl) { if (((xsl == null) && (_xsl != null)) || ((xsl != null) && (_xsl == null)) || ((xsl != null) && (_xsl != null) && !xsl.equals(_xsl))) { if (!XSS_ALLOW_XSL) { xsl = XSSUtil.strip(xsl); } _xsl = xsl; setModified(true); } }
FVector dirFromCenterToSide = FVector.crossProduct(dirFromCenterToPos, new FVector(0,0,1));
FVector dirFromCenterToSide = FVector.crossProduct(dirFromCenterToPos, new FVector(0,0,1)).normalize();
public FVector flyIntoCircleView(FVector centerPoint, float radius, float degree, int duration) { FVector currentPos = getPos(); FVector dirFromCenterToPos = FVector.subtract(centerPoint, currentPos).normalize(); FVector dirFromCenterToSide = FVector.crossProduct(dirFromCenterToPos, new FVector(0,0,1)); FVector ne...
Group group = GroupLocalServiceUtil.getGroup(groupId);
Group group = GroupServiceUtil.getGroup(groupId);
protected boolean isCommunityAdmin( String companyId, String groupId, String name) throws PortalException, SystemException { if (groupId == null) { return false; } try { Role communityAdminRole = RoleServiceUtil.getGroupRole( companyId, groupId); if (UserServiceUtil.hasRoleUser( communityAdminRole.g...
public com.liferay.portal.model.Group addGroup(java.lang.String companyId,
public com.liferay.portal.model.Group addGroup(java.lang.String userId,
public 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 { return getService().addGroup(companyId, className,...
return getService().addGroup(companyId, className, classPK, name,
return getService().addGroup(userId, className, classPK, name,
public 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 { return getService().addGroup(companyId, className,...
roster.setSubscriptionMode(Roster.SUBSCRIPTION_ACCEPT_ALL);
public static void createXMPPConnection(HttpSession ses, String userId) throws XMPPException { if (isJabberEnabled()) { XMPPConnection con = null; try { con = new XMPPConnection(SERVER_ADDRESS, SERVER_PORT); } catch (XMPPException e) { return; } try { con.login(userId, USER_PASSWORD, ses.getId()...
Roster roster = MessagingUtil.getRoster(ses);
Roster roster = getRoster(ses);
public static void deleteRosterEntries(HttpSession ses, String[] userId) throws XMPPException { Roster roster = MessagingUtil.getRoster(ses); for (int i = 0; i < userId.length; i++) { RosterEntry entry = roster.getEntry(getXmppId(userId[i])); roster.removeEntry(entry); } }
Query q = session.createQuery( "FROM Counter IN CLASS " + CounterHBM.class.getName());
Query q = session.createQuery("FROM " + Counter.class.getName());
public List getNames() throws SystemException { Session session = null; try { session = openSession(); List list = new ArrayList(); Query q = session.createQuery( "FROM Counter IN CLASS " + CounterHBM.class.getName()); Iterator itr = q.iterate(); while (itr.hasNext()) { CounterHBM counterHBM = (Count...
CounterHBM counterHBM = (CounterHBM)itr.next();
Counter counter = (Counter)itr.next();
public List getNames() throws SystemException { Session session = null; try { session = openSession(); List list = new ArrayList(); Query q = session.createQuery( "FROM Counter IN CLASS " + CounterHBM.class.getName()); Iterator itr = q.iterate(); while (itr.hasNext()) { CounterHBM counterHBM = (Count...
list.add(counterHBM.getName());
list.add(counter.getName());
public List getNames() throws SystemException { Session session = null; try { session = openSession(); List list = new ArrayList(); Query q = session.createQuery( "FROM Counter IN CLASS " + CounterHBM.class.getName()); Iterator itr = q.iterate(); while (itr.hasNext()) { CounterHBM counterHBM = (Count...
CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, oldName);
Counter counter = (Counter)session.load(Counter.class, oldName);
public synchronized void rename(String oldName, String newName) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, oldName); long currentId = counterHBM.getCurrentId(); session.delete(counterHBM); counterHBM...
long currentId = counterHBM.getCurrentId();
long currentId = counter.getCurrentId();
public synchronized void rename(String oldName, String newName) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, oldName); long currentId = counterHBM.getCurrentId(); session.delete(counterHBM); counterHBM...
session.delete(counterHBM);
session.delete(counter);
public synchronized void rename(String oldName, String newName) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, oldName); long currentId = counterHBM.getCurrentId(); session.delete(counterHBM); counterHBM...
counterHBM = new CounterHBM();
counter = new Counter();
public synchronized void rename(String oldName, String newName) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, oldName); long currentId = counterHBM.getCurrentId(); session.delete(counterHBM); counterHBM...
counterHBM.setName(newName); counterHBM.setCurrentId(currentId);
counter.setName(newName); counter.setCurrentId(currentId);
public synchronized void rename(String oldName, String newName) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, oldName); long currentId = counterHBM.getCurrentId(); session.delete(counterHBM); counterHBM...
session.save(counterHBM);
session.save(counter);
public synchronized void rename(String oldName, String newName) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, oldName); long currentId = counterHBM.getCurrentId(); session.delete(counterHBM); counterHBM...
CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, name);
Counter counter = (Counter)session.load(Counter.class, name);
public synchronized void reset(String name) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, name); session.delete(counterHBM); session.flush(); } catch (ObjectNotFoundException onfe) { } catch (Hibernate...
session.delete(counterHBM);
session.delete(counter);
public synchronized void reset(String name) throws SystemException { Session session = null; try { session = openSession(); CounterHBM counterHBM = (CounterHBM)session.load(CounterHBM.class, name); session.delete(counterHBM); session.flush(); } catch (ObjectNotFoundException onfe) { } catch (Hibernate...