rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
categoryId, topicId, messageId, addCommunityPermissions,
categoryId, messageId, addCommunityPermissions,
private void _upgradeMessage(String categoryId, String topicId) throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_MESSAGE_1); ps.setString(1, topicId); rs = ps.executeQ...
String topicId = message.getTopicId();
public void reIndex(String[] ids) throws SystemException { try { String companyId = ids[0]; Iterator itr1 = MBCategoryUtil.findByCompanyId( companyId).iterator(); while (itr1.hasNext()) { MBCategory category = (MBCategory)itr1.next(); String categoryId = category.getCategoryId(); Iterator itr2 = MBM...
companyId, groupId, categoryId, topicId, threadId, messageId, title, content);
companyId, groupId, categoryId, threadId, messageId, title, content);
public void reIndex(String[] ids) throws SystemException { try { String companyId = ids[0]; Iterator itr1 = MBCategoryUtil.findByCompanyId( companyId).iterator(); while (itr1.hasNext()) { MBCategory category = (MBCategory)itr1.next(); String categoryId = category.getCategoryId(); Iterator itr2 = MBM...
catch (NoSuchGroupException nsge) { _log.error( "Upgrade failed because data does not have a valid group id. " + "Manually assign a group id in the database."); }
private void _upgradeCategory() throws Exception { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { con = DataAccess.getConnection(Constants.DATA_SOURCE); ps = con.prepareStatement(_UPGRADE_CATEGORY); ps.setString(1, Group.DEFAULT_PARENT_GROUP_ID); rs = ps.executeQuery(); wh...
private void getTextForInput(URL input)
public void getTextForInput(URL input, boolean lookForCoords)
private void getTextForInput(URL input) { System.out.println(input); actualText = new String(); env.showLoadingLayer("please wait while loading new text-content"); try{ textDisplay.setContentType("text/html"); in = new BufferedReader(new InputStreamReader(input.openStream())); buffer =...
if(!found){
if(!found && buffer!=""){
public void run(){ boolean found=false; try{ while((buffer = in.readLine())!=null){ actualText+=buffer; env.increaseLoadingBar(); matchString = coordFinder.matcher(buffer); if(!found){ found = matchString.find(); if(found){ System.out.println("gefunden:"+matchString.group(0)); ...
jbossPrefix = OmniadminUtil.getAutoDeployJbossPrefix();
public AutoThemeDeployer() { try { baseDir = OmniadminUtil.getAutoDeployDeployDir(); destDir = OmniadminUtil.getAutoDeployDestDir(); appServerType = ServerDetector.getServerId(); themeTaglibDTD = DeployUtil.getResourcePath("liferay-theme.tld"); utilTaglibDTD = DeployUtil.getResourcePath("liferay-util.tld");...
return DLServiceUtil.search(
return DLLocalServiceUtil.search(
public Hits search( String companyId, String groupId, String[] folderIds, String keywords) throws PortalException, SystemException { return DLServiceUtil.search( companyId, PortletKeys.DOCUMENT_LIBRARY, groupId, folderIds, keywords); }
ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null;
PermissionChecker permissionChecker = null;
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null; try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject(); HttpPrincipal httpPrincipal = (HttpPrincipal)ov...
ObjectValuePair ovp = (ObjectValuePair)ois.readObject();
ObjectInputStream ois = new ObjectInputStream(req.getInputStream());
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null; try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject(); HttpPrincipal httpPrincipal = (HttpPrincipal)ov...
HttpPrincipal httpPrincipal = (HttpPrincipal)ovp.getKey(); MethodWrapper methodWrapper = (MethodWrapper)ovp.getValue();
Object returnObj = null;
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null; try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject(); HttpPrincipal httpPrincipal = (HttpPrincipal)ov...
PrincipalThreadLocal.setName(httpPrincipal.getUserId());
try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject();
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null; try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject(); HttpPrincipal httpPrincipal = (HttpPrincipal)ov...
if (returnObj == null) { returnObj = MethodInvoker.invoke(methodWrapper);
HttpPrincipal httpPrincipal = (HttpPrincipal)ovp.getKey(); MethodWrapper methodWrapper = (MethodWrapper)ovp.getValue(); if (httpPrincipal.getUserId() != null) { PrincipalThreadLocal.setName(httpPrincipal.getUserId()); User user = UserLocalServiceUtil.getUserById( httpPrincipal.getUserId()); permissionChecker = Permi...
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null; try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject(); HttpPrincipal httpPrincipal = (HttpPrincipal)ov...
catch (InvocationTargetException ite) { returnObj = ite.getCause(); if (!(returnObj instanceof PortalException)) { ite.printStackTrace(); returnObj = new SystemException();
finally { try { PermissionCheckerFactory.recycle(permissionChecker); } catch (Exception e) {
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null; try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject(); HttpPrincipal httpPrincipal = (HttpPrincipal)ov...
catch (Exception e) { e.printStackTrace(); } if (returnObj != null) { ObjectOutputStream oos = new ObjectOutputStream(res.getOutputStream()); oos.writeObject(returnObj); oos.flush(); oos.close(); }
public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); Object returnObj = null; try { ObjectValuePair ovp = (ObjectValuePair)ois.readObject(); HttpPrincipal httpPrincipal = (HttpPrincipal)ov...
getUserId(), categoryId, name, description);
topicId, categoryId, name, description);
public MBTopic updateTopic( String topicId, String categoryId, String name, String description) throws PortalException, SystemException { MBTopicPermission.check( getPermissionChecker(), topicId, ActionKeys.UPDATE); return MBTopicLocalServiceUtil.updateTopic( getUserId(), categoryId, name, description); }
List groups = GroupLocalServiceUtil.getPublicGroups( arg.getCompanyId());
Map groupParams = new HashMap(); groupParams.put("layoutSet", Boolean.FALSE); List groups = GroupLocalServiceUtil.search( arg.getCompanyId(), null, null, groupParams, -1, -1);
private void _getFolders(CommandArgument arg, Node root, Document doc) throws Exception { Element foldersEl = doc.createElement("Folders"); root.appendChild(foldersEl); if (arg.getCurrentFolder().equals("/")) { List groups = GroupLocalServiceUtil.getPublicGroups( arg.getCompanyId()); for (int i = 0; i < gro...
HttpPrincipal httpPrincipal, java.lang.String companyId, java.lang.String name)
HttpPrincipal httpPrincipal, java.lang.String groupId)
public static com.liferay.portal.model.Group getGroup( HttpPrincipal httpPrincipal, java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = companyId; if (companyId == null) { paramObj0 = new NullWrapper("...
Object paramObj0 = companyId;
Object paramObj0 = groupId;
public static com.liferay.portal.model.Group getGroup( HttpPrincipal httpPrincipal, java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = companyId; if (companyId == null) { paramObj0 = new NullWrapper("...
if (companyId == null) {
if (groupId == null) {
public static com.liferay.portal.model.Group getGroup( HttpPrincipal httpPrincipal, java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = companyId; if (companyId == null) { paramObj0 = new NullWrapper("...
Object paramObj1 = name; if (name == null) { paramObj1 = new NullWrapper("java.lang.String"); }
public static com.liferay.portal.model.Group getGroup( HttpPrincipal httpPrincipal, java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = companyId; if (companyId == null) { paramObj0 = new NullWrapper("...
"getGroup", new Object[] { paramObj0, paramObj1 });
"getGroup", new Object[] { paramObj0 });
public static com.liferay.portal.model.Group getGroup( HttpPrincipal httpPrincipal, java.lang.String companyId, java.lang.String name) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { try { Object paramObj0 = companyId; if (companyId == null) { paramObj0 = new NullWrapper("...
java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions)
java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions)
public void addMessageResources(java.lang.String categoryId, java.lang.String topicId, java.lang.String messageId, boolean addCommunityPermissions, boolean addGuestPermissions) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
public void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId)
public void deleteDiscussionMessage(java.lang.String messageId)
public void deleteDiscussionMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
public void deleteMessage(java.lang.String topicId, java.lang.String messageId)
public void deleteMessage(java.lang.String messageId)
public void deleteMessage(java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public com.liferay.portlet.messageboards.model.MBMessage getMessage( java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
java.lang.String topicId, java.lang.String messageId, java.lang.String userId)
java.lang.String messageId, java.lang.String userId)
public com.liferay.portlet.messageboards.model.MBMessageDisplay getMessageDisplay( java.lang.String topicId, java.lang.String messageId, java.lang.String userId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public void subscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
java.lang.String topicId, java.lang.String messageId)
java.lang.String messageId)
public void unsubscribeMessage(java.lang.String userId, java.lang.String topicId, java.lang.String messageId) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body)
java.lang.String messageId, java.lang.String subject, java.lang.String body)
public com.liferay.portlet.messageboards.model.MBMessage updateDiscussionMessage( java.lang.String topicId, java.lang.String messageId, java.lang.String subject, java.lang.String body) throws com.liferay.portal.PortalException, com.liferay.portal.SystemException;
java.lang.String topicId, java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files,
java.lang.String messageId, java.lang.String categoryId, java.lang.String subject, java.lang.String body, java.util.List files,
public com.liferay.portlet.messageboards.model.MBMessage 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, javax.portlet.PortletPreferences prefs) throws com.liferay.portal.PortalException, co...
if (dlFileEntry.isNew() || dlFileEntry.isModified()) { session = openSession(); if (dlFileEntry.isNew()) { DLFileEntry dlFileEntryModel = new DLFileEntry(); dlFileEntryModel.setFolderId(dlFileEntry.getFolderId()); dlFileEntryModel.setName(dlFileEntry.getName()); dlFileEntryModel.setCompanyId(dlFileEntry.getCompanyId()...
session = openSession(); session.saveOrUpdate(dlFileEntry); session.flush(); dlFileEntry.setNew(false);
public com.liferay.portlet.documentlibrary.model.DLFileEntry update( com.liferay.portlet.documentlibrary.model.DLFileEntry dlFileEntry) throws SystemException { Session session = null; try { if (dlFileEntry.isNew() || dlFileEntry.isModified()) { session = openSession(); if (dlFileEntry.isNew()) { DLFil...
boolean success = true; if (success) { User user = null; try { user = UserLocalServiceUtil.getUserByEmailAddress( companyId, emailAddress); } catch (NoSuchUserException nsue) { boolean autoUserId = true; String userId = ""; boolean autoPassword = false; String password1 = password; String password2 = password; ...
return authenticate( companyId, emailAddress, StringPool.BLANK, password);
public int authenticateByEmailAddress( String companyId, String emailAddress, String password) throws AuthException { try { // Check the LDAP server to ensure the company id, email address, // and password is valid boolean success = true; if (success) { // Make sure the user has a portal account User...
_log.error(StackTraceUtil.getStackTrace(e));
public int authenticateByEmailAddress( String companyId, String emailAddress, String password) throws AuthException { try { // Check the LDAP server to ensure the company id, email address, // and password is valid boolean success = true; if (success) { // Make sure the user has a portal account User...
boolean success = true; if (success) { User user = null; try { user = UserLocalServiceUtil.getUserById(companyId, userId); } catch (NoSuchUserException nsue) { boolean autoUserId = true; boolean autoPassword = false; String password1 = password; String password2 = password; boolean passwordReset = false; String...
return authenticate(companyId, StringPool.BLANK, userId, password);
public int authenticateByUserId( String companyId, String userId, String password) throws AuthException { try { // Check the LDAP server to ensure the company id, user id, and // password is valid boolean success = true; if (success) { // Make sure the user has a portal account User user = null; t...
_log.error(StackTraceUtil.getStackTrace(e));
public int authenticateByUserId( String companyId, String userId, String password) throws AuthException { try { // Check the LDAP server to ensure the company id, user id, and // password is valid boolean success = true; if (success) { // Make sure the user has a portal account User user = null; t...
setModified(true);
public void setCouponId(String couponId) { if (((couponId == null) && (_couponId != null)) || ((couponId != null) && (_couponId == null)) || ((couponId != null) && (_couponId != null) && !couponId.equals(_couponId))) { if (!XSS_ALLOW_COUPONID) { couponId = XSSUtil.strip(couponId); } _couponId = coup...
setModified(true);
public void setDiscountType(String discountType) { if (((discountType == null) && (_discountType != null)) || ((discountType != null) && (_discountType == null)) || ((discountType != null) && (_discountType != null) && !discountType.equals(_discountType))) { if (!XSS_ALLOW_DISCOUNTTYPE) { discountType =...
setModified(true);
public void setLimitCategories(String limitCategories) { if (((limitCategories == null) && (_limitCategories != null)) || ((limitCategories != null) && (_limitCategories == null)) || ((limitCategories != null) && (_limitCategories != null) && !limitCategories.equals(_limitCategories))) { if (!XSS_ALLOW_LIM...
setModified(true);
public void setLimitSkus(String limitSkus) { if (((limitSkus == null) && (_limitSkus != null)) || ((limitSkus != null) && (_limitSkus == null)) || ((limitSkus != null) && (_limitSkus != null) && !limitSkus.equals(_limitSkus))) { if (!XSS_ALLOW_LIMITSKUS) { limitSkus = XSSUtil.strip(limitSkus); } _li...
setModified(true);
public void setMinOrder(double minOrder) { if (minOrder != _minOrder) { _minOrder = minOrder; setModified(true); } }
clone.setClassName(getClassName()); clone.setClassPK(getClassPK());
public Object clone() { Role clone = new Role(); clone.setRoleId(getRoleId()); clone.setCompanyId(getCompanyId()); clone.setName(getName()); return clone; }
Indexer.addMessage(
IndexerImpl.addMessage(
public void reIndex(String[] ids) throws SystemException { try { String companyId = ids[0]; Iterator itr1 = MBCategoryUtil.findByCompanyId( companyId).iterator(); while (itr1.hasNext()) { MBCategory category = (MBCategory)itr1.next(); String categoryId = category.getCategoryId(); Iterator itr2 = MBM...
throws com.liferay.portal.SystemException {
throws com.liferay.portal.PortalException, com.liferay.portal.SystemException {
public static java.util.List getOrgLabors(java.lang.String organizationId) throws com.liferay.portal.SystemException { try { OrgLaborService orgLaborService = OrgLaborServiceFactory.getService(); return orgLaborService.getOrgLabors(organizationId); } catch (com.liferay.portal.SystemException se) { throw se; ...
} catch (com.liferay.portal.PortalException pe) { throw pe;
public static java.util.List getOrgLabors(java.lang.String organizationId) throws com.liferay.portal.SystemException { try { OrgLaborService orgLaborService = OrgLaborServiceFactory.getService(); return orgLaborService.getOrgLabors(organizationId); } catch (com.liferay.portal.SystemException se) { throw se; ...
throw new GroovyException( "attribute \"key\" is " + key );
throw new GroovyException( "attribute \"key\" is null" );
private Object getFormWidget( final Composite parentComposite, final Map properties, final int style, final String text ) throws GroovyException { if( "form".equals( type ) ) { final...
if (journalArticle.isNew() || journalArticle.isModified()) { session = openSession(); if (journalArticle.isNew()) { JournalArticle journalArticleModel = new JournalArticle(); journalArticleModel.setCompanyId(journalArticle.getCompanyId()); journalArticleModel.setArticleId(journalArticle.getArticleId()); journalArticle...
session = openSession(); session.saveOrUpdate(journalArticle); session.flush(); journalArticle.setNew(false);
public com.liferay.portlet.journal.model.JournalArticle update( com.liferay.portlet.journal.model.JournalArticle journalArticle) throws SystemException { Session session = null; try { if (journalArticle.isNew() || journalArticle.isModified()) { session = openSession(); if (journalArticle.isNew()) { Jou...
value = getCreateDate().compareTo(passwordTracker.getCreateDate());
value = DateUtil.compareTo(getCreateDate(), passwordTracker.getCreateDate());
public int compareTo(Object obj) { if (obj == null) { return -1; } PasswordTracker passwordTracker = (PasswordTracker)obj; int value = 0; value = getUserId().compareTo(passwordTracker.getUserId()); value = value * -1; if (value != 0) { return value; } value = getCreateDate().compareTo(passwordTracker.getC...
_initialized = true;
public void initialize() throws RepositoryException { Session session = null; try { session = createSession(null); } catch (RepositoryException e) { _log.error("Could not initialize Jackrabbit"); throw e; } finally { if (session != null) { session.logout(); } } }
Session session = null;
if (_initialized) { Session session = null;
public void shutdown() throws RepositoryException { Session session = null; try { session = createSession(null); JackrabbitRepository repository = (JackrabbitRepository)session.getRepository(); repository.shutdown(); } catch (RepositoryException e) { _log.error("Could not shutdown Jackrabbit"); throw ...
repository.shutdown();
repository.shutdown(); } catch (RepositoryException e) { _log.error("Could not shutdown Jackrabbit"); throw e; }
public void shutdown() throws RepositoryException { Session session = null; try { session = createSession(null); JackrabbitRepository repository = (JackrabbitRepository)session.getRepository(); repository.shutdown(); } catch (RepositoryException e) { _log.error("Could not shutdown Jackrabbit"); throw ...
catch (RepositoryException e) { _log.error("Could not shutdown Jackrabbit");
public void shutdown() throws RepositoryException { Session session = null; try { session = createSession(null); JackrabbitRepository repository = (JackrabbitRepository)session.getRepository(); repository.shutdown(); } catch (RepositoryException e) { _log.error("Could not shutdown Jackrabbit"); throw ...
throw e; }
_initialized = false;
public void shutdown() throws RepositoryException { Session session = null; try { session = createSession(null); JackrabbitRepository repository = (JackrabbitRepository)session.getRepository(); repository.shutdown(); } catch (RepositoryException e) { _log.error("Could not shutdown Jackrabbit"); throw ...
Iterator itr = ImageServiceUtil.getImageById("%.ig.%").iterator();
Iterator itr = ImageLocalServiceUtil.search("%.ig.%").iterator();
private void _updateImage() throws PortalException, SystemException { // Image gallery Iterator itr = ImageServiceUtil.getImageById("%.ig.%").iterator(); while (itr.hasNext()) { Image image = (Image)itr.next(); String oldImageId = image.getImageId(); String newImageId = StringUtil.replace( oldImageId, ".ig...
ImageServiceUtil.updateImage(newImageId, image.getTextObj()); ImageServiceUtil.deleteImage(oldImageId);
ImageLocalServiceUtil.updateImage(newImageId, image.getTextObj()); ImageLocalServiceUtil.deleteImage(oldImageId);
private void _updateImage() throws PortalException, SystemException { // Image gallery Iterator itr = ImageServiceUtil.getImageById("%.ig.%").iterator(); while (itr.hasNext()) { Image image = (Image)itr.next(); String oldImageId = image.getImageId(); String newImageId = StringUtil.replace( oldImageId, ".ig...
itr = ImageServiceUtil.getImageById("%.s.%").iterator();
itr = ImageLocalServiceUtil.search("%.s.%").iterator();
private void _updateImage() throws PortalException, SystemException { // Image gallery Iterator itr = ImageServiceUtil.getImageById("%.ig.%").iterator(); while (itr.hasNext()) { Image image = (Image)itr.next(); String oldImageId = image.getImageId(); String newImageId = StringUtil.replace( oldImageId, ".ig...
if (y == -1) { queryString += "&_19_struts_action=%2Fmessage_boards%2Fview&_19_categoryId=" + MBCategory.DEFAULT_PARENT_CATEGORY_ID; return new String[] {friendlyURL, queryString}; }
public String[] getValues(String url, int pos) { String friendlyURL = url.substring(0, pos); String queryString = "&p_p_id=19&p_p_action=0&p_p_state=maximized"; int x = url.indexOf("/", pos + 1); int y = url.indexOf("/", x + 1); String type = url.substring(x + 1, y); if (type.equals("category")) { String categ...
if (title.equals(StringPool.BLANK)) {
if (Validator.isNull(title)) {
public DLFileEntry addFileEntry( String userId, String folderId, String name, String title, String description, byte[] byteArray, boolean addCommunityPermissions, boolean addGuestPermissions) throws PortalException, SystemException { // File entry User user = UserUtil.findByPrimaryKey(userId); folderId = get...
public List getFileEntries(String folderId, int begin, int end) throws SystemException { return DLFileEntryUtil.findByFolderId(folderId, begin, end);
public List getFileEntries(String folderId) throws SystemException { return DLFileEntryUtil.findByFolderId(folderId);
public List getFileEntries(String folderId, int begin, int end) throws SystemException { return DLFileEntryUtil.findByFolderId(folderId, begin, end); }
if (title.equals(StringPool.BLANK)) {
if (Validator.isNull(title)) {
public DLFileEntry updateFileEntry( String folderId, String name, String title, String description) throws PortalException, SystemException { if (title.equals(StringPool.BLANK)) { title = name; } DLFileEntryPK pk = new DLFileEntryPK(folderId, name); DLFileEntry fileEntry = DLFileEntryUtil.findByPrimaryKey(pk)...
if (mbMessage.isNew() || mbMessage.isModified()) { session = openSession(); if (mbMessage.isNew()) { MBMessage mbMessageModel = new MBMessage(); mbMessageModel.setTopicId(mbMessage.getTopicId()); mbMessageModel.setMessageId(mbMessage.getMessageId()); mbMessageModel.setCompanyId(mbMessage.getCompanyId()); mbMessageMode...
session = openSession(); session.saveOrUpdate(mbMessage); session.flush(); mbMessage.setNew(false);
public com.liferay.portlet.messageboards.model.MBMessage update( com.liferay.portlet.messageboards.model.MBMessage mbMessage) throws SystemException { Session session = null; try { if (mbMessage.isNew() || mbMessage.isModified()) { session = openSession(); if (mbMessage.isNew()) { MBMessage mbMessageMo...
HttpServletRequest req, String paramName, Company company) {
HttpServletRequest req, String paramName, Company company) throws PortalException, SystemException {
public static String getLogin( HttpServletRequest req, String paramName, Company company) { String login = req.getParameter(paramName); if ((login == null) || (login.equals(StringPool.NULL))) { login = GetterUtil.getString( CookieUtil.get(req.getCookies(), CookieKeys.LOGIN)); if (Validator.isNull(login) && ...
q.setCacheable(true);
q.setCacheable(false);
public int getGroupsSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETGROUPSSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInstance(q); qPos...
q.setCacheable(true);
q.setCacheable(false);
public int getUsersSize(String pk) throws SystemException { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETUSERSSIZE); q.setCacheable(true); q.addScalar(HibernateUtil.getCountColumnName(), Hibernate.LONG); QueryPos qPos = QueryPos.getInstance(q); qPos.a...
java.lang.String className, java.lang.String classPK,
public static com.liferay.portal.model.GroupModel addGroup( java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws RemoteException { try { com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(className, classPK, name, friendlyURL); ...
com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(className, classPK, name, friendlyURL);
com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(name, friendlyURL);
public static com.liferay.portal.model.GroupModel addGroup( java.lang.String className, java.lang.String classPK, java.lang.String name, java.lang.String friendlyURL) throws RemoteException { try { com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(className, classPK, name, friendlyURL); ...
getDefault().addScript( name, metadata );
addScript( name, metadata );
private void processNewOrChangedScript( final String name, final IFile file ) { ScriptMetadata metadata; try { metadata = getMetadataFrom( file ); } catch( final CoreException x ) { metadata = new ScriptMe...
getDefault().removeScript( name );
removeScript( name );
private void processRemovedScript( final String name, final IFile file ) { getDefault().removeScript( name ); for( final IMonkeyScriptFactory factory : getScriptFactories().values() ) factory.changed( file ); }
getDefault().clearScripts();
clearScripts();
public void rescanAllFiles() { getDefault().clearScripts(); for( final IMonkeyScriptFactory factory : getScriptFactories().values() ) factory.clearCachedScripts(); final IWorkspace workspace = getWorkspace(); for( final IProject project : workspace.getRoot().getProjects() )...
String plid = ParamUtil.getString(request, "p_l_id");
String plid = _getPlid(request.getPathInfo(), ParamUtil.getString(request, "p_l_id"));
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...
synchronized (FriendlyURLServlet.class) { ServletContext ctx = filterConfig.getServletContext(); _companyId = ctx.getInitParameter("company_id"); _friendly = GetterUtil.getBoolean(filterConfig.getInitParameter( "friendly")); }
public void init(FilterConfig filterConfig) { }
return getClass().getResource( "dependencies/" + resource).getPath().substring(1);
resource = "com/liferay/portal/deploy/dependencies/" + resource; return getClass().getResource(resource).getPath().substring(1);
protected String getResourcePath(String resource) { return getClass().getResource( "dependencies/" + resource).getPath().substring(1); }
if (orgGroupPermission.isNew() || orgGroupPermission.isModified()) { session = openSession(); if (orgGroupPermission.isNew()) { OrgGroupPermission orgGroupPermissionModel = new OrgGroupPermission(); orgGroupPermissionModel.setOrganizationId(orgGroupPermission.getOrganizationId()); orgGroupPermissionModel.setGroupId(or...
session = openSession(); session.saveOrUpdate(orgGroupPermission); session.flush(); orgGroupPermission.setNew(false);
public com.liferay.portal.model.OrgGroupPermission update( com.liferay.portal.model.OrgGroupPermission orgGroupPermission) throws SystemException { Session session = null; try { if (orgGroupPermission.isNew() || orgGroupPermission.isModified()) { session = openSession(); if (orgGroupPermission.isNew()) { ...
if (tmpf.tindexes.size() > 0) {
if (tmpf.intTIndexes.length > 0) {
public void drawModel(float matAlphaMultiplier, boolean greyed) { float alphaMultiplier = 1; try { Vertex v = null, vt = null, vn = null, endV = null; int vtidx = 0, vnidx = 0, vidx = 0, vidx2=0; PImage imgtex = null; boolean bTexture = false; // render all triangles for (int g = 0; g < groups.size(); g+...
getForward(req, "portlet.mailx.edit_message"));
getForward(req, "portlet.mailbox.edit_message"));
public ActionForward render( ActionMapping mapping, ActionForm form, PortletConfig config, RenderRequest req, RenderResponse res) throws Exception { try { } catch (Exception e) { } return mapping.findForward( getForward(req, "portlet.mailx.edit_message")); }
private static void _closeFolder(String userId) throws Exception {
private static void _closeFolder(String userId) {
private static void _closeFolder(String userId) throws Exception { Folder folder = (Folder)_folder.get(userId); if (folder != null && folder.isOpen()) { folder.close(false); _folder.remove(userId); } }
folder.close(false);
try { folder.close(false); } catch (MessagingException me) { _log.error("Unknown error while closing current folder"); }
private static void _closeFolder(String userId) throws Exception { Folder folder = (Folder)_folder.get(userId); if (folder != null && folder.isOpen()) { folder.close(false); _folder.remove(userId); } }
throw new Exception();
throw new Exception("A folder must first be selected");
private static Folder _getCurrentFolder(String userId) throws Exception { Folder folder = (Folder)_folder.get(userId); if (folder != null) { return folder; } throw new Exception(); }
if (!_getCurrentFolder(userId).getName().equals(MAIL_TRASH_NAME)) {
Folder folder = _getCurrentFolder(userId); if (!folder.getName().equals(MAIL_TRASH_NAME)) {
public static void deleteMessages( String userId, String password, int [] messageUIDs) throws Exception { if (!_getCurrentFolder(userId).getName().equals(MAIL_TRASH_NAME)) { moveMessages(userId, password, messageUIDs, MAIL_TRASH_NAME); } else { Message [] msgs = _getCurrentFolder(userId).getMessages(message...
_getCurrentFolder(userId).expunge();
public static void deleteMessages( String userId, String password, int [] messageUIDs) throws Exception { if (!_getCurrentFolder(userId).getName().equals(MAIL_TRASH_NAME)) { moveMessages(userId, password, messageUIDs, MAIL_TRASH_NAME); } else { Message [] msgs = _getCurrentFolder(userId).getMessages(message...
for (int i = 0; i < msgs.length; i++) { if (msgs[i].isExpunged()) {
for (int ii = msgs.length - 1; ii >= 0; ii--) { if (msgs[ii].isExpunged()) {
public static List getEnvelopes(String userId) throws Exception { List envelopes = new ArrayList(); Message [] msgs = _getCurrentFolder(userId).getMessages(); FetchProfile fp = new FetchProfile(); fp.add(FetchProfile.Item.ENVELOPE); fp.add(FetchProfile.Item.FLAGS); _getCurrentFold...
Address [] recipients = msgs[i].getAllRecipients();
Address [] recipients = msgs[ii].getAllRecipients();
public static List getEnvelopes(String userId) throws Exception { List envelopes = new ArrayList(); Message [] msgs = _getCurrentFolder(userId).getMessages(); FetchProfile fp = new FetchProfile(); fp.add(FetchProfile.Item.ENVELOPE); fp.add(FetchProfile.Item.FLAGS); _getCurrentFold...
Address [] from = msgs[i].getFrom();
Address [] from = msgs[ii].getFrom();
public static List getEnvelopes(String userId) throws Exception { List envelopes = new ArrayList(); Message [] msgs = _getCurrentFolder(userId).getMessages(); FetchProfile fp = new FetchProfile(); fp.add(FetchProfile.Item.ENVELOPE); fp.add(FetchProfile.Item.FLAGS); _getCurrentFold...
me.setDate(msgs[i].getSentDate()); me.setSubject(msgs[i].getSubject()); me.setUID(((IMAPFolder)_getCurrentFolder(userId)).getUID(msgs[i])); me.setRecent(msgs[i].isSet(Flag.RECENT)); me.setFlagged(msgs[i].isSet(Flag.FLAGGED)); me.setAnswered(msgs[i].isSet(Flag.ANSWERED));
me.setDate(msgs[ii].getSentDate()); me.setSubject(msgs[ii].getSubject()); me.setMsgNum(msgs[ii].getMessageNumber()); me.setRecent(msgs[ii].isSet(Flag.RECENT)); me.setFlagged(msgs[ii].isSet(Flag.FLAGGED)); me.setAnswered(msgs[ii].isSet(Flag.ANSWERED));
public static List getEnvelopes(String userId) throws Exception { List envelopes = new ArrayList(); Message [] msgs = _getCurrentFolder(userId).getMessages(); FetchProfile fp = new FetchProfile(); fp.add(FetchProfile.Item.ENVELOPE); fp.add(FetchProfile.Item.FLAGS); _getCurrentFold...
Message message = _getCurrentFolder(userId).getMessage(messageUID); MailMessage mm = new MailMessage(); mm.setSubject(message.getSubject()); mm.setFrom(message.getFrom()[0]); mm.setTo(message.getRecipients(RecipientType.TO)); mm.setCc(message.getRecipients(RecipientType.CC)); mm.setBcc(message.getRecipients(RecipientT...
MailMessage mm = null;
public static MailMessage getMessage(String userId, int messageUID) throws Exception { Message message = _getCurrentFolder(userId).getMessage(messageUID); MailMessage mm = new MailMessage(); mm.setSubject(message.getSubject()); mm.setFrom(message.getFrom()[0]); mm.setTo(message.getRecipients(RecipientType.TO))...
try { Message message = _getCurrentFolder(userId).getMessage(messageUID); mm = new MailMessage(); mm.setSubject(message.getSubject()); mm.setFrom(message.getFrom()[0]); mm.setTo(message.getRecipients(RecipientType.TO)); mm.setCc(message.getRecipients(RecipientType.CC)); mm.setBcc(message.getRecipients(RecipientType.BC...
public static MailMessage getMessage(String userId, int messageUID) throws Exception { Message message = _getCurrentFolder(userId).getMessage(messageUID); MailMessage mm = new MailMessage(); mm.setSubject(message.getSubject()); mm.setFrom(message.getFrom()[0]); mm.setTo(message.getRecipients(RecipientType.TO))...
_getCurrentFolder(userId).expunge();
} catch(Exception e) { _log.error(e); throw e;
public static void moveMessages(String userId, String password, int [] messageUIDs, String toFolderName) throws Exception { if (_getCurrentFolder(userId).getName().equals(toFolderName)) { return; } Folder toFolder = null; try { toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.op...
toFolder.close(false);
toFolder.close(true);
public static void moveMessages(String userId, String password, int [] messageUIDs, String toFolderName) throws Exception { if (_getCurrentFolder(userId).getName().equals(toFolderName)) { return; } Folder toFolder = null; try { toFolder = _getStore(userId, password).getFolder(toFolderName); toFolder.op...
try { DataSource ds = new ByteArrayDataSource( ma.getContent(), ma.getContentType()); he.attach(ds, ma.getFilename(), ma.getFilename()); } catch (Exception ex) { ex.printStackTrace(); }
DataSource ds = new ByteArrayDataSource( ma.getContent(), ma.getContentType()); he.attach(ds, ma.getFilename(), ma.getFilename());
public static void sendMessage( String userId, String password, MailMessage mm) throws Exception { Email email = null; if (mm.isSimple()) { SimpleEmail se = new SimpleEmail(); se.setMsg(mm.getPlainBody()); email = se; } else { HtmlEmail he = new HtmlEmail(); he.setMsg(mm.getPlainBody()); he.setHtml...
if ((portlet == null) && (!portletId.equals(PortletKeys.LIFERAY_PORTAL))) { if (_log.isErrorEnabled()) { _log.error( "Portlet not found for " + companyId + " " + portletId); } }
public Portlet getPortletById(String companyId, String portletId) throws SystemException { if (companyId.equals(User.DEFAULT)) { throw new SystemException(); } Portlet portlet = null; Map companyPortletsPool = _getPortletsPool(companyId); String rootPortletId = Portlet.getRootPortletId(portletId); if (portlet...
this.loader = doPrivileged( new PrivilegedAction< MonkeyClassLoader >() { public MonkeyClassLoader run() { return new MonkeyClassLoader(); } } );
public MonkeyScript( final String languageName, final String fileNameExtension, final IFile scriptFile, final boolean stripMetadata ) { noNullElements( new Object[] { languageName, fileNameExtension, scriptFile } ); this.langua...
loader.add( new URLClassLoader( includes.toArray( new URL[ 0 ] ), loader ) );
{ loader.add( doPrivileged( new PrivilegedAction< URLClassLoader > () { public URLClassLoader run() { return new URLClassLoader( includes.toArray( new URL[ 0 ] ), loader ); } } ) ); }
public static void addIncludes( final MonkeyClassLoader loader, final ScriptMetadata metadata ) { final List< URL > includes = getIncludes( metadata ); if( includes.size() > 0 ) loader.add( new URLClassLoader( includes.toArray( new URL[ 0 ] ), loader )...
loader.add( new BundleClassLoaderAdapter( loader, includedBundles.toArray( new Bundle[ 0 ] ) ) );
{ loader.add( doPrivileged( new PrivilegedAction< BundleClassLoaderAdapter > () { public BundleClassLoaderAdapter run() { return new BundleClassLoaderAdapter( loader, includedBundles.toArray( new Bundle[ 0 ] ) ); } } ) ); }
public static void addIncludes( final MonkeyClassLoader loader, final ScriptMetadata metadata ) { final List< URL > includes = getIncludes( metadata ); if( includes.size() > 0 ) loader.add( new URLClassLoader( includes.toArray( new URL[ 0 ] ), loader )...
for( final String varName : map.keySet() )
for( final Entry< String, Object > entry : map.entrySet() )
public IMonkeyScript setBinding( final ScriptMetadata metadata, final Map< String, Object > map ) { notNull( metadata ); this.metadata = metadata; this.map.clear(); if( map != null ) { for( final String varName : map.keySet() ) ...
String resolvedName = varName;
String resolvedName = entry.getKey();
public IMonkeyScript setBinding( final ScriptMetadata metadata, final Map< String, Object > map ) { notNull( metadata ); this.metadata = metadata; this.map.clear(); if( map != null ) { for( final String varName : map.keySet() ) ...
if( descriptor.map.containsKey( varName ) ) resolvedName = descriptor.map.get( varName );
if( descriptor.map.containsKey( entry.getKey() ) ) resolvedName = descriptor.map.get( entry.getKey() );
public IMonkeyScript setBinding( final ScriptMetadata metadata, final Map< String, Object > map ) { notNull( metadata ); this.metadata = metadata; this.map.clear(); if( map != null ) { for( final String varName : map.keySet() ) ...
this.map.put( resolvedName, map.get( varName ) );
this.map.put( resolvedName, entry.getValue() );
public IMonkeyScript setBinding( final ScriptMetadata metadata, final Map< String, Object > map ) { notNull( metadata ); this.metadata = metadata; this.map.clear(); if( map != null ) { for( final String varName : map.keySet() ) ...
sb.append("setModified(true);");
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("if (" + entity.getVarName() + ".isNew() || " + entity.getVarName() + ".isModified()) {");
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("if (" + entity.getVarName() + ".isNew()) {"); sb.append(entity.getName() + " " + entity.getVarName() + "Model = new " + entity.getName() + "();"); for (int i = 0; i < columnList.size(); i++) { EntityColumn col = (EntityColumn)columnList.get(i); if (!col.isCollection() && (col.getEJBName() == null)) { sb.ap...
sb.append("session.saveOrUpdate(" + entity.getVarName() + ");");
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 " + ...