Skip to content

HTMLDOCS-161 update getLocale() calls in the Xpages statements #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>lutece-global-pom</artifactId>
<groupId>fr.paris.lutece.tools</groupId>
<version>5.1.0</version>
<version>5.1.1</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -52,7 +52,7 @@
<!-- Needed by daisydiff -->
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
<version>2.12.0</version>
</dependency>
</dependencies>

Expand Down
32 changes: 15 additions & 17 deletions src/java/fr/paris/lutece/plugins/blog/business/Blog.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class Blog extends ReferenceItem implements Serializable, IExtendableReso
private List<Tag> _tag = new ArrayList<>( );

private List<BlogPublication> _blogPubilcation = new ArrayList<>( );

/**
* Returns the Id
*
Expand Down Expand Up @@ -187,7 +187,7 @@ public void setContentLabel( String strContentLabel )
*/
public Timestamp getCreationDate( )
{
return _dateCreationDate;
return (Timestamp) _dateCreationDate.clone( );
}

/**
Expand All @@ -198,7 +198,7 @@ public Timestamp getCreationDate( )
*/
public void setCreationDate( Timestamp dateCreationDate )
{
_dateCreationDate = dateCreationDate;
_dateCreationDate = (Timestamp) dateCreationDate.clone( );
}

/**
Expand All @@ -208,7 +208,7 @@ public void setCreationDate( Timestamp dateCreationDate )
*/
public Timestamp getUpdateDate( )
{
return _dateUpdateDate;
return (Timestamp) _dateUpdateDate.clone( );
}

/**
Expand All @@ -219,7 +219,7 @@ public Timestamp getUpdateDate( )
*/
public void setUpdateDate( Timestamp dateUpdateDate )
{
_dateUpdateDate = dateUpdateDate;
_dateUpdateDate = (Timestamp) dateUpdateDate.clone( );
}

/**
Expand Down Expand Up @@ -344,7 +344,7 @@ public void setDescription( String strDescription )
*/
public List<DocContent> getDocContent( )
{
return _docContent;
return (List<DocContent>) ( (ArrayList<DocContent>) _docContent ).clone( );
}

/**
Expand All @@ -355,7 +355,7 @@ public List<DocContent> getDocContent( )
*/
public void setDocContent( List<DocContent> docContent )
{
_docContent = docContent;
_docContent = (List<DocContent>) ( (ArrayList<DocContent>) docContent ).clone( );
}

/**
Expand Down Expand Up @@ -451,7 +451,7 @@ public void setLocked( boolean locked )
*/
public List<Tag> getTag( )
{
return _tag;
return (List<Tag>) ( (ArrayList<Tag>) _tag ).clone( );
}

/**
Expand All @@ -462,7 +462,7 @@ public List<Tag> getTag( )
*/
public void setTag( List<Tag> tag )
{
_tag = tag;
_tag = (List<Tag>) ( (ArrayList<Tag>) tag ).clone( );
}

/**
Expand Down Expand Up @@ -499,7 +499,7 @@ public void deleteTag( Tag tag )
*/
public List<BlogPublication> getBlogPubilcation( )
{
return _blogPubilcation;
return (List<BlogPublication>) ( (ArrayList<BlogPublication>) _blogPubilcation ).clone( );
}

/**
Expand All @@ -510,7 +510,7 @@ public List<BlogPublication> getBlogPubilcation( )
*/
public void setBlogPubilcation( List<BlogPublication> blogPublication )
{
_blogPubilcation = blogPublication;
_blogPubilcation = (List<BlogPublication>) ( (ArrayList<BlogPublication>) blogPublication ).clone( );
}

/**
Expand Down Expand Up @@ -612,18 +612,17 @@ public String getResourceTypeCode( )

return PROPERTY_RESOURCE_TYPE;
}



/**
* Return the user informations
*
* @return AdminUser
*/
public AdminUser getUserInfos( )
public AdminUser getUserInfos( )
{
return AdminUserHome.findUserByLogin( _strUser );
}

/**
* Return the user creator informations
*
Expand All @@ -633,6 +632,5 @@ public AdminUser getUserCreatorInfos( )
{
return AdminUserHome.findUserByLogin( _strUserCreator );
}

}

4 changes: 2 additions & 2 deletions src/java/fr/paris/lutece/plugins/blog/business/BlogDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public List<Blog> selectBlogsVersionsList( int nId, Plugin plugin )
}
return blogVersionsList;
}

/**
* {@inheritDoc }
*/
Expand All @@ -480,7 +480,7 @@ public List<String> selectAllUsersEditedBlog( int nId, Plugin plugin )

while ( daoUtil.next( ) )
{
blogUsersVersionsList.add( daoUtil.getString( 1 ) );
blogUsersVersionsList.add( daoUtil.getString( 1 ) );
}
}
return blogUsersVersionsList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class BlogFilter
*/
public Integer [ ] getTagsId( )
{
return _arrayTagsId;
return _arrayTagsId.clone( );
}

/**
Expand All @@ -65,7 +65,7 @@ public class BlogFilter
*/
public void setTagsId( Integer [ ] arrayTagsId )
{
_arrayTagsId = arrayTagsId;
_arrayTagsId = arrayTagsId.clone( );
}

/**
Expand Down Expand Up @@ -93,7 +93,7 @@ public boolean containsIdsCriteria( )
*/
public Integer [ ] getIds( )
{
return _arrayId;
return _arrayId.clone( );
}

/**
Expand All @@ -102,7 +102,7 @@ public boolean containsIdsCriteria( )
*/
public void setIds( Integer [ ] arrayId )
{
_arrayId = arrayId;
_arrayId = arrayId.clone( );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static List<Blog> getBlogsVersionsList( int nId )
{
return _dao.selectBlogsVersionsList( nId, _plugin );
}

/**
* Load the data of all users edited the Blog objects and returns them as a list
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void setKeywords( String strKeywords )
*/
public String [ ] getTag( )
{
return _strTag;
return _strTag.clone( );
}

/**
Expand All @@ -109,7 +109,7 @@ public void setKeywords( String strKeywords )
*/
public void setTag( String [ ] strTag )
{
this._strTag = strTag;
this._strTag = strTag.clone( );
}

/**
Expand All @@ -132,7 +132,7 @@ public String getUser( )
{
return _strUser;
}

/**
* Sets the User Edited blog
*
Expand All @@ -141,7 +141,7 @@ public String getUser( )
*/
public void setUserEditedBlogVersion( String userEditedBlogVersion )
{
_strUserEditedBlogVersion = userEditedBlogVersion;
_strUserEditedBlogVersion = userEditedBlogVersion;
}

/**
Expand Down Expand Up @@ -179,7 +179,7 @@ public void setIsUnpulished( boolean isUnpulished )
*/
public Date getUpdateDateAfter( )
{
return _dateUpdateDateAfter;
return (Date) _dateUpdateDateAfter.clone( );
}

/**
Expand All @@ -190,7 +190,7 @@ public Date getUpdateDateAfter( )
*/
public void setUpdateDateAfter( Date dateUpdateDateAfter )
{
_dateUpdateDateAfter = dateUpdateDateAfter;
_dateUpdateDateAfter = (Date) dateUpdateDateAfter.clone( );
}

/**
Expand All @@ -200,7 +200,7 @@ public void setUpdateDateAfter( Date dateUpdateDateAfter )
*/
public Date getUpdateDateBefor( )
{
return _dateUpdateDateBefor;
return (Date) _dateUpdateDateBefor.clone( );
}

/**
Expand All @@ -211,7 +211,7 @@ public Date getUpdateDateBefor( )
*/
public void setUpdateDateBefor( Date dateUpdateDateBefor )
{
_dateUpdateDateBefor = dateUpdateDateBefor;
_dateUpdateDateBefor = (Date) dateUpdateDateBefor.clone( );
}

}
14 changes: 8 additions & 6 deletions src/java/fr/paris/lutece/plugins/blog/business/DocContent.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
package fr.paris.lutece.plugins.blog.business;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
Expand All @@ -46,7 +47,7 @@ public class DocContent implements Serializable
*
*/
private static final long serialVersionUID = 1L;

private int _nIdDocContent;
private String _strTextValue;
private byte [ ] _bytes;
Expand Down Expand Up @@ -105,7 +106,7 @@ public String getTextValue( )
*/
public void setBinaryValue( byte [ ] bytes )
{
_bytes = bytes;
_bytes = bytes.clone( );
}

/**
Expand All @@ -115,7 +116,7 @@ public void setBinaryValue( byte [ ] bytes )
*/
public byte [ ] getBinaryValue( )
{
return _bytes;
return _bytes.clone( );
}

/**
Expand Down Expand Up @@ -167,7 +168,7 @@ public ContentType getContentType( )
*/
public List<Blog> getBlogs( )
{
return _blogs;
return (List<Blog>) ( (ArrayList<Blog>) _blogs ).clone( );
}

/**
Expand All @@ -178,7 +179,7 @@ public List<Blog> getBlogs( )
*/
public void setBlogs( List<Blog> blogs )
{
this._blogs = blogs;
this._blogs = (List<Blog>) ( (ArrayList<Blog>) blogs ).clone( );
}

/**
Expand All @@ -194,7 +195,8 @@ public int getPriority( )
/**
* Sets the priority
*
* @param nPriority the priority to set
* @param nPriority
* the priority to set
*/
public void setPriority( int nPriority )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void insertDocContentInBlog( int nIdBlog, int nIdDocument, int nPriority,
@Override
public List<DocContent> loadDocContentByIdHtemldoc( int idBlog, Plugin plugin )
{
List<DocContent> listDoc = new ArrayList<DocContent>( );
List<DocContent> listDoc = new ArrayList<>( );
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_CONTENT, plugin ) )
{
daoUtil.setInt( 1, idBlog );
Expand Down Expand Up @@ -273,7 +273,7 @@ public ContentType loadContentType( int idType, Plugin plugin )
@Override
public List<ContentType> loadListContentType( Plugin plugin )
{
List<ContentType> listcontentType = new ArrayList<ContentType>( );
List<ContentType> listcontentType = new ArrayList<>( );
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_CONTENT_TYPE, plugin ) )
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public static void create( DocContent docContent )
* the document id
* @param nPriority
* the priority
*
*
*/
public static void insertInBlog( int nIdBlog, int nIdDocument, int nPriority )
{
_dao.insertDocContentInBlog( nIdBlog, nIdDocument, nPriority, _plugin );
_dao.insertDocContentInBlog( nIdBlog, nIdDocument, nPriority, _plugin );
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/java/fr/paris/lutece/plugins/blog/business/IBlogDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public interface IBlogDAO
* @return The list which contains the data of all the blog objects
*/
List<Blog> selectBlogsVersionsList( int nId, Plugin plugin );

/**
* Load the data of all the users edited the blog and returns them as a list
*
Expand All @@ -167,7 +167,6 @@ public interface IBlogDAO
*/
List<String> selectAllUsersEditedBlog( int nId, Plugin plugin );


/**
* Load the id of all the Blog objects and returns them as a list
*
Expand Down
Loading