CPD Results
The following document contains the results of PMD's CPD 6.13.0.
Duplications
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeCheckBox.java |
210 |
fr/paris/lutece/portal/business/user/attribute/AttributeComboBox.java |
219 |
attributeType.setLabelType( PROPERTY_TYPE_CHECKBOX );
setAttributeType( attributeType );
}
/**
* Get the data of the user fields
*
* @param request
* HttpServletRequest
* @param user
* user
* @return user field data
*/
@Override
public List<AdminUserField> getUserFieldsData( HttpServletRequest request, AdminUser user )
{
String [ ] strValues = request.getParameterValues( PARAMETER_ATTRIBUTE + CONSTANT_UNDERSCORE + getIdAttribute( ) );
return getUserFieldsData( strValues, user );
}
/**
* Get the data of the user fields
*
* @param strValues
* Values
* @param user
* user
* @return user field data
*/
@Override
public List<AdminUserField> getUserFieldsData( String [ ] strValues, AdminUser user )
{
List<AdminUserField> listUserFields = new ArrayList<>( );
if ( strValues != null )
{
for ( String strValue : strValues )
{
AdminUserField userField = new AdminUserField( );
AttributeField attributeField;
if ( StringUtils.isNotBlank( strValue ) && StringUtils.isNumeric( strValue ) )
{
int nIdField = Integer.parseInt( strValue );
attributeField = AttributeFieldService.getInstance( ).getAttributeField( nIdField );
}
else
{
attributeField = new AttributeField( );
attributeField.setAttribute( this );
attributeField.setTitle( strValue );
attributeField.setValue( strValue );
}
userField.setUser( user );
userField.setAttribute( this );
userField.setAttributeField( attributeField );
userField.setValue( attributeField.getTitle( ) );
listUserFields.add( userField );
}
}
// If no checkbox is selected, the request will have no parameter at all
else
{
AdminUserField userField = new AdminUserField( );
AttributeField attributeField;
attributeField = new AttributeField( );
attributeField.setAttribute( this );
attributeField.setTitle( "" );
attributeField.setValue( "" );
userField.setUser( user );
userField.setAttribute( this );
userField.setAttributeField( attributeField );
userField.setValue( attributeField.getTitle( ) );
listUserFields.add( userField );
}
return listUserFields;
}
/**
* Get whether the attribute is anonymizable.
*
* @return True if the attribute can be anonymized, false otherwise.
*/
@Override
public boolean isAnonymizable( )
{
return false;
}
} |
File |
Line |
fr/paris/lutece/portal/business/page/PageDAO.java |
520 |
fr/paris/lutece/portal/business/page/PageDAO.java |
608 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
Page page = new Page( );
page.setId( daoUtil.getInt( 1 ) );
page.setParentPageId( daoUtil.getInt( 2 ) );
page.setOrigParentPageId( daoUtil.getInt( 2 ) );
page.setName( daoUtil.getString( 3 ) );
page.setDescription( daoUtil.getString( 4 ) );
page.setDateUpdate( daoUtil.getTimestamp( 5 ) );
page.setOrder( daoUtil.getInt( 6 ) );
page.setStatus( daoUtil.getInt( 7 ) );
page.setRole( daoUtil.getString( 8 ) );
page.setCodeTheme( daoUtil.getString( 9 ) );
page.setImageContent( daoUtil.getBytes( 10 ) );
page.setMimeType( daoUtil.getString( 11 ) );
page.setMetaKeywords( daoUtil.getString( 12 ) );
page.setMetaDescription( daoUtil.getString( 13 ) );
if ( daoUtil.getObject( 14 ) != null )
{
page.setIdAuthorizationNode( daoUtil.getInt( 14 ) );
}
page.setDisplayDateUpdate( daoUtil.getBoolean( 15 ) );
page.setIsManualDateUpdate( daoUtil.getBoolean( 16 ) );
pageList.add( page );
}
}
return pageList;
}
/**
* {@inheritDoc}
*/
public void invalidatePage( int nPageId ) |
File |
Line |
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java |
269 |
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java |
329 |
String strPortletId = request.getParameter( Parameters.PORTLET_ID );
String strStatus = request.getParameter( PORTLET_STATUS );
if ( !StringUtils.isNumeric( strPortletId ) || !StringUtils.isNumeric( strStatus ) )
{
return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_ERROR );
}
int nPortletId = Integer.parseInt( strPortletId );
Portlet portlet = null;
try
{
portlet = PortletHome.findByPrimaryKey( nPortletId );
}
catch( NullPointerException e )
{
AppLogService.error( MSG_ERROR_PORTLET, nPortletId, e );
}
if ( portlet == null || portlet.getId( ) != nPortletId )
{
return AdminMessageService.getMessageUrl( request, Messages.MESSAGE_INVALID_ENTRY, new Object [ ] {
nPortletId
}, AdminMessage.TYPE_ERROR );
}
int nStatus = Integer.parseInt( strStatus );
if ( nStatus != Portlet.STATUS_PUBLISHED && nStatus != Portlet.STATUS_UNPUBLISHED )
{
return AdminMessageService.getMessageUrl( request, Messages.MESSAGE_INVALID_ENTRY, new Object [ ] {
nStatus
}, AdminMessage.TYPE_ERROR );
}
AdminUser user = AdminUserService.getAdminUser( request );
if ( !RBACService.isAuthorized( PortletType.RESOURCE_TYPE, portlet.getPortletTypeId( ), PortletResourceIdService.PERMISSION_MANAGE, user ) )
{
throw new AccessDeniedException( getMessageErrorAuthorization( user, PortletResourceIdService.PERMISSION_MANAGE, nPortletId ) );
} |
File |
Line |
fr/paris/lutece/portal/business/dashboard/AdminDashboardDAO.java |
293 |
fr/paris/lutece/portal/business/dashboard/DashboardDAO.java |
291 |
public void store( IAdminDashboardComponent dashboardComponent )
{
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE ) )
{
int nIndex = setInsertOrUpdateValues( 1, dashboardComponent, daoUtil );
daoUtil.setString( nIndex, dashboardComponent.getName( ) );
daoUtil.executeUpdate( );
}
}
/**
* {@inheritDoc}
*/
@Override
public List<Integer> selectColumns( )
{
List<Integer> listColumns = new ArrayList<>( );
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_COLUMNS ) )
{
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
listColumns.add( daoUtil.getInt( 1 ) );
}
}
return listColumns;
}
/**
* Loads component data from daoUtil
*
* @param component
* the component
* @param daoUtil
* the daoutil
*/
private void load( IDashboardComponent component, DAOUtil daoUtil )
{
int nIndex = 1;
component.setName( daoUtil.getString( nIndex++ ) );
component.setOrder( daoUtil.getInt( nIndex++ ) );
component.setZone( daoUtil.getInt( nIndex++ ) );
}
/**
* Sets daoUtil values from component
*
* @param nStartIndex
* the start index
* @param component
* the component
* @param daoUtil
* daoutil
* @return the end index
*/
private int setInsertOrUpdateValues( int nStartIndex, IDashboardComponent component, DAOUtil daoUtil )
{
int nIndex = nStartIndex;
daoUtil.setInt( nIndex++, component.getOrder( ) );
daoUtil.setInt( nIndex++, component.getZone( ) );
return nIndex;
}
/**
* Builds sql filter
*
* @param sbSQL
* the buffer
* @param filter
* the filter
*/
private void buildSQLFilter( StringBuilder sbSQL, AdminDashboardFilter filter ) |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeCheckBox.java |
164 |
fr/paris/lutece/portal/business/user/attribute/AttributeRadioButton.java |
164 |
}
/**
* Set the data of the attribute
*
* @param request
* HttpServletRequest
* @return null if there are no errors
*/
@Override
public String setAttributeData( HttpServletRequest request )
{
String strTitle = request.getParameter( PARAMETER_TITLE );
String strHelpMessage = ( request.getParameter( PARAMETER_HELP_MESSAGE ) != null ) ? request.getParameter( PARAMETER_HELP_MESSAGE ).trim( ) : null;
String strIsShownInSearch = request.getParameter( PARAMETER_IS_SHOWN_IN_SEARCH );
String strIsShownInResultList = request.getParameter( PARAMETER_IS_SHOWN_IN_RESULT_LIST );
String strMandatory = request.getParameter( PARAMETER_MANDATORY );
String strFieldInLine = request.getParameter( PARAMETER_IS_FIELD_IN_LINE );
if ( StringUtils.isNotBlank( strTitle ) )
{
setTitle( strTitle );
setHelpMessage( strHelpMessage );
setMandatory( strMandatory != null );
setShownInSearch( strIsShownInSearch != null );
setShownInResultList( strIsShownInResultList != null );
setFieldInLine( strFieldInLine != null );
return null;
}
return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
}
/**
* Set attribute type
*
* @param locale
* locale
*/
@Override
public void setAttributeType( Locale locale )
{
AttributeType attributeType = new AttributeType( );
attributeType.setLocale( locale );
attributeType.setClassName( this.getClass( ).getName( ) );
attributeType.setLabelType( PROPERTY_TYPE_CHECKBOX ); |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
236 |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
346 |
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ALL ) )
{
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
int nIndex = 1;
IAttribute attribute = null;
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance( );
}
catch( InstantiationException | IllegalAccessException | ClassNotFoundException e )
{
AppLogService.error( e.getMessage( ), e );
}
if ( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
attribute.setTitle( daoUtil.getString( nIndex++ ) );
attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
attribute.setPosition( daoUtil.getInt( nIndex++ ) );
attribute.setAnonymize( daoUtil.getBoolean( nIndex++ ) ); |
File |
Line |
fr/paris/lutece/portal/business/dashboard/AdminDashboardDAO.java |
179 |
fr/paris/lutece/portal/business/dashboard/DashboardDAO.java |
179 |
IAdminDashboardComponent dashboardComponent = null;
String strBeanName = daoUtil.getString( 1 );
dashboardComponent = findDashboardFromFactory( strBeanName );
if ( dashboardComponent != null )
{
load( dashboardComponent, daoUtil );
listDashboards.add( dashboardComponent );
}
else
{
AppLogService.error( LOG_ERROR_NOT_FOUND, strBeanName );
}
}
}
return listDashboards;
}
/**
* {@inheritDoc}
*/
@Override
public int selectMaxOrder( )
{
int nMaxOrder = 0;
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_MAX_ORDER ) )
{
daoUtil.executeQuery( );
if ( daoUtil.next( ) )
{
nMaxOrder = daoUtil.getInt( 1 );
}
}
return nMaxOrder;
}
/**
* {@inheritDoc}
*/
@Override
public int selectMaxOrder( int nColumn )
{
int nMaxOrder = 0;
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_MAX_ORDER_COLUMN ) )
{
daoUtil.setInt( 1, nColumn );
daoUtil.executeQuery( );
if ( daoUtil.next( ) )
{
nMaxOrder = daoUtil.getInt( 1 );
}
}
return nMaxOrder;
}
/**
* {@inheritDoc}
*/
@Override
public List<IAdminDashboardComponent> selectDashboardComponents( AdminDashboardFilter filter ) |
File |
Line |
fr/paris/lutece/portal/service/plugin/Plugin.java |
727 |
fr/paris/lutece/portal/service/plugin/PluginFile.java |
158 |
}
/**
* Returns the name of the plugin
*
* @return the plugin name as a String
*/
public String getName( )
{
return _strName;
}
/**
* Sets the name of the plugin
*
* @param strName
* The plugin name
*/
public void setName( String strName )
{
_strName = strName;
}
/**
* Returns the version of the plugin
*
* @return the plugin version as a String
*/
public String getVersion( )
{
return _strVersion;
}
/**
* Sets the version plugin name
*
* @param strVersion
* The version
*/
public void setVersion( String strVersion )
{
_strVersion = strVersion;
}
/**
* Returns the description of the plugin
*
* @return the plugin description as a String
*/
public String getDescription( )
{
return _strDescription;
}
/**
* Sets the description of the plugin
*
* @param strDescription
* The description
*/
public void setDescription( String strDescription )
{
_strDescription = strDescription;
}
/**
* Returns the Provider of the plugin
*
* @return the plugin Provider as a String
*/
public String getProvider( )
{
return _strProvider;
}
/**
* Sets the provider name
*
* @param strProvider
* The provider name
*/
public void setProvider( String strProvider )
{
_strProvider = strProvider;
}
/**
* Returns the Provider's URL of the plugin
*
* @return the plugin Provider's URL as a String
*/
public String getProviderUrl( )
{
return _strProviderUrl;
}
/**
* Sets the provider url
*
* @param strProviderUrl
* the name of the provider
*/
public void setProviderUrl( String strProviderUrl )
{
_strProviderUrl = strProviderUrl;
}
/**
* Returns the Icon's URL of the plugin
*
* @return the plugin Icon's URL as a String
*/
public String getIconUrl( )
{
return _strIconUrl;
}
/**
* Sets the url of the plugin's icon
*
* @param strIconUrl
* The url of icon
*/
public void setIconUrl( String strIconUrl )
{
_strIconUrl = strIconUrl;
}
/**
* Returns the Documentation's URL of the plugin
*
* @return the plugin Documentation's URL as a String
*/
public String getDocumentationUrl( )
{
return _strDocumentationUrl;
}
/**
* Sets the url of the plugin's Documentation
*
* @param strDocumentationUrl
* The documentation Url
*/
public void setDocumentationUrl( String strDocumentationUrl )
{
_strDocumentationUrl = strDocumentationUrl;
}
/**
* Returns the Copyright of the plugin
*
* @return the plugin Copyright as a String
*/
public String getCopyright( )
{
return _strCopyright;
}
/**
* Sets the copyright
*
* @param strCopyright
* The copyright
*/
public void setCopyright( String strCopyright )
{
_strCopyright = strCopyright;
}
/**
* Returns the main Class of the plugin
*
* @return the Class as a String
*/
public String getServiceClass( ) |
File |
Line |
fr/paris/lutece/portal/business/right/RightDAO.java |
203 |
fr/paris/lutece/portal/business/right/RightDAO.java |
253 |
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL ) )
{
daoUtil.setInt( 1, nLevel );
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
Right right = new Right( );
right.setId( daoUtil.getString( 1 ) );
right.setNameKey( daoUtil.getString( 2 ) );
right.setLevel( daoUtil.getInt( 3 ) );
right.setUrl( daoUtil.getString( 4 ) );
right.setDescriptionKey( daoUtil.getString( 5 ) );
right.setPluginName( daoUtil.getString( 6 ) );
right.setFeatureGroup( daoUtil.getString( 7 ) );
right.setIconUrl( daoUtil.getString( 8 ) );
right.setDocumentationUrl( daoUtil.getString( 9 ) );
right.setOrder( daoUtil.getInt( 10 ) );
right.setExternalFeature( daoUtil.getBoolean( 11 ) );
rightList.add( right );
}
}
return rightList;
}
/**
* Loads the data of all the external admin features and returns them in form of a collection
*
* @return the collection which contains the data of all the external admin features
*/
public Collection<Right> selectExternalRightsList( ) |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeCheckBox.java |
210 |
fr/paris/lutece/portal/business/user/attribute/AttributeComboBox.java |
219 |
fr/paris/lutece/portal/business/user/attribute/AttributeRadioButton.java |
210 |
attributeType.setLabelType( PROPERTY_TYPE_CHECKBOX );
setAttributeType( attributeType );
}
/**
* Get the data of the user fields
*
* @param request
* HttpServletRequest
* @param user
* user
* @return user field data
*/
@Override
public List<AdminUserField> getUserFieldsData( HttpServletRequest request, AdminUser user )
{
String [ ] strValues = request.getParameterValues( PARAMETER_ATTRIBUTE + CONSTANT_UNDERSCORE + getIdAttribute( ) );
return getUserFieldsData( strValues, user );
}
/**
* Get the data of the user fields
*
* @param strValues
* Values
* @param user
* user
* @return user field data
*/
@Override
public List<AdminUserField> getUserFieldsData( String [ ] strValues, AdminUser user )
{
List<AdminUserField> listUserFields = new ArrayList<>( );
if ( strValues != null )
{
for ( String strValue : strValues )
{
AdminUserField userField = new AdminUserField( );
AttributeField attributeField;
if ( StringUtils.isNotBlank( strValue ) && StringUtils.isNumeric( strValue ) )
{
int nIdField = Integer.parseInt( strValue );
attributeField = AttributeFieldService.getInstance( ).getAttributeField( nIdField );
}
else
{
attributeField = new AttributeField( );
attributeField.setAttribute( this );
attributeField.setTitle( strValue );
attributeField.setValue( strValue );
} |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
123 |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
303 |
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance( );
}
catch( InstantiationException | IllegalAccessException | ClassNotFoundException e )
{
AppLogService.error( e.getMessage( ), e );
}
if ( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
attribute.setTitle( daoUtil.getString( nIndex++ ) );
attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
attribute.setPosition( daoUtil.getInt( nIndex++ ) );
attribute.setAttributeType( locale );
Plugin plugin = PluginService.getPlugin( daoUtil.getString( nIndex++ ) ); |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
299 |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
352 |
nIndex = 1;
IAttribute attribute = null;
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance( );
}
catch( InstantiationException | IllegalAccessException | ClassNotFoundException e )
{
AppLogService.error( e.getMessage( ), e );
}
if ( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
attribute.setTitle( daoUtil.getString( nIndex++ ) );
attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
attribute.setPosition( daoUtil.getInt( nIndex++ ) );
attribute.setAttributeType( locale ); |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
242 |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
299 |
int nIndex = 1;
IAttribute attribute = null;
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance( );
}
catch( InstantiationException | IllegalAccessException | ClassNotFoundException e )
{
AppLogService.error( e.getMessage( ), e );
}
if ( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
attribute.setTitle( daoUtil.getString( nIndex++ ) );
attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
attribute.setPosition( daoUtil.getInt( nIndex++ ) );
attribute.setAnonymize( daoUtil.getBoolean( nIndex++ ) ); |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
123 |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
355 |
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance( );
}
catch( InstantiationException | IllegalAccessException | ClassNotFoundException e )
{
AppLogService.error( e.getMessage( ), e );
}
if ( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
attribute.setTitle( daoUtil.getString( nIndex++ ) );
attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
attribute.setPosition( daoUtil.getInt( nIndex++ ) );
attribute.setAttributeType( locale ); |
File |
Line |
fr/paris/lutece/portal/business/page/PageDAO.java |
172 |
fr/paris/lutece/portal/business/page/PageDAO.java |
227 |
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT ) )
{
daoUtil.setInt( 1, nPageId );
daoUtil.executeQuery( );
if ( daoUtil.next( ) )
{
page.setId( nPageId );
page.setParentPageId( daoUtil.getInt( 1 ) );
page.setOrigParentPageId( daoUtil.getInt( 1 ) );
page.setName( daoUtil.getString( 2 ) );
page.setDescription( daoUtil.getString( 3 ) );
page.setPageTemplateId( daoUtil.getInt( 4 ) );
page.setTemplate( daoUtil.getString( 5 ) );
page.setOrder( daoUtil.getInt( 6 ) );
page.setStatus( daoUtil.getInt( 7 ) );
page.setRole( daoUtil.getString( 8 ) );
page.setCodeTheme( daoUtil.getString( 9 ) );
page.setNodeStatus( daoUtil.getInt( 10 ) );
page.setImageContent( daoUtil.getBytes( 11 ) ); |
File |
Line |
fr/paris/lutece/portal/business/right/RightDAO.java |
206 |
fr/paris/lutece/portal/business/right/RightDAO.java |
256 |
fr/paris/lutece/portal/business/right/RightDAO.java |
307 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
Right right = new Right( );
right.setId( daoUtil.getString( 1 ) );
right.setNameKey( daoUtil.getString( 2 ) );
right.setLevel( daoUtil.getInt( 3 ) );
right.setUrl( daoUtil.getString( 4 ) );
right.setDescriptionKey( daoUtil.getString( 5 ) );
right.setPluginName( daoUtil.getString( 6 ) );
right.setFeatureGroup( daoUtil.getString( 7 ) );
right.setIconUrl( daoUtil.getString( 8 ) );
right.setDocumentationUrl( daoUtil.getString( 9 ) );
right.setOrder( daoUtil.getInt( 10 ) );
right.setExternalFeature( daoUtil.getBoolean( 11 ) );
rightList.add( right );
}
}
return rightList;
} |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
123 |
fr/paris/lutece/portal/business/user/attribute/AttributeDAO.java |
245 |
try
{
attribute = (IAttribute) Class.forName( daoUtil.getString( nIndex++ ) ).newInstance( );
}
catch( InstantiationException | IllegalAccessException | ClassNotFoundException e )
{
AppLogService.error( e.getMessage( ), e );
}
if ( attribute != null )
{
attribute.setIdAttribute( daoUtil.getInt( nIndex++ ) );
attribute.setTitle( daoUtil.getString( nIndex++ ) );
attribute.setHelpMessage( daoUtil.getString( nIndex++ ) );
attribute.setMandatory( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInSearch( daoUtil.getBoolean( nIndex++ ) );
attribute.setShownInResultList( daoUtil.getBoolean( nIndex++ ) );
attribute.setFieldInLine( daoUtil.getBoolean( nIndex++ ) );
attribute.setPosition( daoUtil.getInt( nIndex++ ) );
attribute.setAttributeType( locale ); |
File |
Line |
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java |
244 |
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java |
321 |
public String getForgotPassword( HttpServletRequest request )
{
Map<String, Object> model = new HashMap<>( );
// Invalidate a previous session
HttpSession session = request.getSession( );
if ( session != null )
{
session.removeAttribute( SESSION_ATTRIBUTE_USER );
}
Locale locale = AdminUserService.getLocale( request );
Enumeration<String> enumParams = request.getParameterNames( );
ReferenceList listParams = new ReferenceList( );
String strParamName;
while ( enumParams.hasMoreElements( ) )
{
strParamName = enumParams.nextElement( );
String strParamValue = request.getParameter( strParamName );
listParams.addItem( strParamName, strParamValue );
}
model.put( MARK_PARAM_VERSION, AppInfo.getVersion( ) );
model.put( MARK_PARAMS_LIST, listParams );
model.put( MARK_SITE_NAME, PortalService.getSiteName( ) );
HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_ADMIN_FORGOT_PASSWORD, locale, model ); |
File |
Line |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
879 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
911 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
AdminUser user = new AdminUser( );
user.setUserId( daoUtil.getInt( 1 ) );
user.setAccessCode( daoUtil.getString( 2 ) );
user.setLastName( daoUtil.getString( 3 ) );
user.setFirstName( daoUtil.getString( 4 ) );
user.setEmail( daoUtil.getString( 5 ) );
user.setStatus( daoUtil.getInt( 6 ) );
user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
user.setUserLevel( daoUtil.getInt( 8 ) );
user.setAccessibilityMode( daoUtil.getBoolean( 9 ) );
userList.add( user );
}
}
return userList;
}
/**
* {@inheritDoc}
*/
@Override
public Collection<AdminUser> selectUsersByRight( String strIdRight ) |
File |
Line |
fr/paris/lutece/portal/web/user/attribute/AttributeFieldJspBean.java |
313 |
fr/paris/lutece/portal/web/user/attribute/AttributeFieldJspBean.java |
367 |
public String doMoveUpAttributeField( HttpServletRequest request ) throws AccessDeniedException
{
String strIdAttribute = request.getParameter( PARAMETER_ID_ATTRIBUTE );
String strIdField = request.getParameter( PARAMETER_ID_FIELD );
if ( StringUtils.isNotBlank( strIdField ) && StringUtils.isNumeric( strIdField ) && StringUtils.isNotBlank( strIdAttribute )
&& StringUtils.isNumeric( strIdAttribute ) )
{
int nIdAttribute = Integer.parseInt( strIdAttribute );
int nIdField = Integer.parseInt( strIdField );
IAttribute attribute = _attributeService.getAttributeWithFields( nIdAttribute, getLocale( ) );
List<AttributeField> listAttributeFields = attribute.getListAttributeFields( );
if ( !SecurityTokenService.getInstance( ).validate( request, attribute.getTemplateModifyAttribute( ) ) )
{
throw new AccessDeniedException( ERROR_INVALID_TOKEN );
}
if ( CollectionUtils.isNotEmpty( listAttributeFields ) )
{
AttributeField previousField = null; |
File |
Line |
fr/paris/lutece/portal/web/xsl/XslExportJspBean.java |
147 |
fr/paris/lutece/portal/web/xsl/XslExportJspBean.java |
243 |
HashMap<String, Object> model = new HashMap<>( );
Collection<Plugin> listPlugins = PluginService.getPluginList( );
ReferenceList refListPlugins = new ReferenceList( );
ReferenceItem refItem = new ReferenceItem( );
Plugin pluginCore = PluginService.getCore( );
refItem.setCode( pluginCore.getName( ) );
refItem.setName( pluginCore.getName( ) );
refListPlugins.add( refItem );
for ( Plugin plugin : listPlugins )
{
if ( plugin != null )
{
refItem = new ReferenceItem( );
refItem.setCode( plugin.getName( ) );
refItem.setName( plugin.getName( ) );
refListPlugins.add( refItem );
}
}
model.put( MARK_LIST_PLUGINS, refListPlugins );
model.put( SecurityTokenService.MARK_TOKEN, SecurityTokenService.getInstance( ).getToken( request, TEMPLATE_CREATE_XSL_EXPORT ) ); |
File |
Line |
fr/paris/lutece/portal/business/right/RightDAO.java |
114 |
fr/paris/lutece/portal/business/right/RightDAO.java |
210 |
fr/paris/lutece/portal/business/right/RightDAO.java |
260 |
fr/paris/lutece/portal/business/right/RightDAO.java |
311 |
right = new Right( );
right.setId( daoUtil.getString( 1 ) );
right.setNameKey( daoUtil.getString( 2 ) );
right.setLevel( daoUtil.getInt( 3 ) );
right.setUrl( daoUtil.getString( 4 ) );
right.setDescriptionKey( daoUtil.getString( 5 ) );
right.setPluginName( daoUtil.getString( 6 ) );
right.setFeatureGroup( daoUtil.getString( 7 ) );
right.setIconUrl( daoUtil.getString( 8 ) );
right.setDocumentationUrl( daoUtil.getString( 9 ) );
right.setOrder( daoUtil.getInt( 10 ) );
right.setExternalFeature( daoUtil.getBoolean( 11 ) ); |
File |
Line |
fr/paris/lutece/portal/util/mvc/admin/MVCAdminJspBean.java |
218 |
fr/paris/lutece/portal/util/mvc/xpage/MVCApplication.java |
540 |
_listInfos.add( new MVCMessage( strMessage ) );
}
/**
* Add an info message
*
* @param strMessageKey
* The message key
* @param locale
* The locale
*/
protected void addInfo( String strMessageKey, Locale locale )
{
_listInfos.add( new MVCMessage( I18nService.getLocalizedString( strMessageKey, locale ) ) );
}
/**
* Fill the model with commons objects used in templates
*
* @param model
* The model
*/
protected void fillCommons( Map<String, Object> model )
{
List<ErrorMessage> listErrors = new ArrayList<>( _listErrors );
List<ErrorMessage> listInfos = new ArrayList<>( _listInfos );
List<ErrorMessage> listWarnings = new ArrayList<>( _listWarnings );
model.put( MARK_ERRORS, listErrors );
model.put( MARK_INFOS, listInfos );
model.put( MARK_WARNINGS, listWarnings );
_listErrors.clear( );
_listInfos.clear( );
_listWarnings.clear( );
}
/**
* Get a model Object filled with default values
*
* @return The model
*/
protected Map<String, Object> getModel( ) |
File |
Line |
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java |
147 |
fr/paris/lutece/portal/web/admin/AdminPagePortletJspBean.java |
215 |
public String getRemovePortlet( HttpServletRequest request ) throws AccessDeniedException
{
String strPortletId = request.getParameter( Parameters.PORTLET_ID );
if ( !StringUtils.isNumeric( strPortletId ) )
{
return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_ERROR );
}
int nPortletId = Integer.parseInt( strPortletId );
Portlet portlet = null;
try
{
portlet = PortletHome.findByPrimaryKey( nPortletId );
}
catch( NullPointerException e )
{
AppLogService.error( MSG_ERROR_PORTLET, nPortletId, e );
}
if ( portlet == null || portlet.getId( ) != nPortletId )
{
return AdminMessageService.getMessageUrl( request, Messages.MESSAGE_INVALID_ENTRY, new Object [ ] {
nPortletId
}, AdminMessage.TYPE_ERROR );
} |
File |
Line |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
237 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
879 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
911 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
AdminUser user = new AdminUser( );
user.setUserId( daoUtil.getInt( 1 ) );
user.setAccessCode( daoUtil.getString( 2 ) );
user.setLastName( daoUtil.getString( 3 ) );
user.setFirstName( daoUtil.getString( 4 ) );
user.setEmail( daoUtil.getString( 5 ) );
user.setStatus( daoUtil.getInt( 6 ) );
user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
user.setUserLevel( daoUtil.getInt( 8 ) );
user.setAccessibilityMode( daoUtil.getBoolean( 9 ) ); |
File |
Line |
fr/paris/lutece/portal/business/xsl/XslExportDAO.java |
183 |
fr/paris/lutece/portal/business/xsl/XslExportDAO.java |
227 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
xslExport = new XslExport( );
xslExport.setIdXslExport( daoUtil.getInt( 1 ) );
xslExport.setTitle( daoUtil.getString( 2 ) );
xslExport.setDescription( daoUtil.getString( 3 ) );
xslExport.setExtension( daoUtil.getString( 4 ) );
if ( daoUtil.getObject( 5 ) != null )
{
file = new File( );
file.setIdFile( daoUtil.getInt( 5 ) );
xslExport.setFile( file );
}
xslExport.setPlugin( daoUtil.getString( 6 ) );
listXslExport.add( xslExport );
}
}
return listXslExport;
} |
File |
Line |
fr/paris/lutece/portal/web/dashboard/AdminDashboardJspBean.java |
228 |
fr/paris/lutece/portal/web/dashboard/DashboardJspBean.java |
150 |
dashboard = AdminDashboardFactory.getDashboardComponent( strDashboardName );
if ( dashboard == null )
{
return AdminMessageService.getMessageUrl( request, MESSAGE_DASHBOARD_NOT_FOUND, AdminMessage.TYPE_STOP );
}
}
else
{
nOldOrder = dashboard.getOrder( );
nOldColumn = dashboard.getZone( );
}
if ( !SecurityTokenService.getInstance( ).validate( request, TEMPLATE_MANAGE_DASHBOARDS ) )
{
throw new AccessDeniedException( ERROR_INVALID_TOKEN );
}
// set order and column
String strOrder = request.getParameter( PARAMETER_DASHBOARD_ORDER );
String strColumn = request.getParameter( PARAMETER_DASHBOARD_COLUMN );
int nOrder = StringUtil.getIntValue( strOrder, -1 );
int nColumn = StringUtil.getIntValue( strColumn, -1 );
dashboard.setOrder( nOrder );
dashboard.setZone( nColumn ); |
File |
Line |
fr/paris/lutece/portal/web/features/ExternalFeaturesJspBean.java |
101 |
fr/paris/lutece/portal/web/features/ExternalFeaturesJspBean.java |
181 |
Map<String, Object> model = new HashMap<>( );
Collection<FeatureGroup> featureGroups = FeatureGroupHome.getFeatureGroupsList( );
ReferenceList featureGroupsReferenceList = new ReferenceList( );
for ( FeatureGroup featureGroup : featureGroups )
{
featureGroup.setLocale( getUser( ).getLocale( ) );
featureGroupsReferenceList.add( featureGroup.getReferenceItem( ) );
}
model.put( MARK_FEATURES_GROUPS_REFERENCE_LIST, featureGroupsReferenceList );
Collection<Level> rightLevels = LevelHome.getLevelsList( );
ReferenceList rightLevelsReferenceList = new ReferenceList( );
for ( Level rightLevel : rightLevels )
{
rightLevelsReferenceList.add( rightLevel.getReferenceItem( ) );
}
model.put( MARK_RIGHT_LEVELS_REFERENCE_LIST, rightLevelsReferenceList );
model.put( SecurityTokenService.MARK_TOKEN, SecurityTokenService.getInstance( ).getToken( request, TEMPLATE_CREATE_EXTERNAL_FEATURE ) ); |
File |
Line |
fr/paris/lutece/portal/web/features/FeaturesGroupJspBean.java |
240 |
fr/paris/lutece/portal/web/features/FeaturesGroupJspBean.java |
280 |
public String doCreateGroup( HttpServletRequest request ) throws AccessDeniedException
{
String strGroupId = request.getParameter( PARAMETER_GROUP_ID );
String strGroupName = request.getParameter( PARAMETER_GROUP_NAME );
String strGroupDescription = request.getParameter( PARAMETER_GROUP_DESCRIPTION );
String strGroupOrder = request.getParameter( PARAMETER_GROUP_ORDER );
String strGroupIcon = request.getParameter( PARAMETER_GROUP_ICON );
// Mandatory fields
if ( strGroupId.equals( "" ) || strGroupName.equals( "" ) || strGroupDescription.equals( "" ) )
{
return AdminMessageService.getMessageUrl( request, Messages.MANDATORY_FIELDS, AdminMessage.TYPE_STOP );
}
if ( !SecurityTokenService.getInstance( ).validate( request, AdminDashboardJspBean.TEMPLATE_MANAGE_DASHBOARDS ) )
{
throw new AccessDeniedException( ERROR_INVALID_TOKEN );
}
FeatureGroup group = new FeatureGroup( ); |
File |
Line |
fr/paris/lutece/portal/business/user/attribute/SimpleAdminUserFieldListener.java |
100 |
fr/paris/lutece/portal/business/user/attribute/SimpleAdminUserFieldListener.java |
130 |
public void doCreateUserFields( AdminUser user, HttpServletRequest request, Locale locale )
{
List<IAttribute> listAttributes = AttributeService.getInstance( ).getPluginAttributesWithoutFields( getPlugin( ).getName( ), locale );
List<AdminUserField> listUserFields = new ArrayList<>( );
for ( IAttribute attribute : listAttributes )
{
List<AdminUserField> userFields = attribute.getUserFieldsData( request, user );
for ( AdminUserField userField : userFields )
{
if ( ( userField != null ) && StringUtils.isNotBlank( userField.getValue( ) ) )
{
// Change the value of the user field
// Instead of having the ID of the attribute field, we put the attribute field title
// which represents the profile's ID
userField.setValue( userField.getAttributeField( ).getTitle( ) );
AdminUserFieldHome.create( userField );
listUserFields.add( userField );
}
}
} |
File |
Line |
fr/paris/lutece/portal/business/style/ModeDAO.java |
135 |
fr/paris/lutece/portal/business/style/ModeDAO.java |
208 |
mode = new Mode( );
mode.setId( daoUtil.getInt( 1 ) );
mode.setDescription( daoUtil.getString( 2 ) );
mode.setPath( daoUtil.getString( 3 ) );
mode.setOutputXslPropertyMethod( daoUtil.getString( 4 ) );
mode.setOutputXslPropertyVersion( daoUtil.getString( 5 ) );
mode.setOutputXslPropertyMediaType( daoUtil.getString( 6 ) );
mode.setOutputXslPropertyEncoding( daoUtil.getString( 7 ) );
mode.setOutputXslPropertyIndent( daoUtil.getString( 8 ) );
mode.setOutputXslPropertyOmitXmlDeclaration( daoUtil.getString( 9 ) );
mode.setOutputXslPropertyStandalone( daoUtil.getString( 10 ) ); |
File |
Line |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
659 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
691 |
daoUtil.setString( 1, strRoleKey );
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
AdminUser user = new AdminUser( );
user.setUserId( daoUtil.getInt( 1 ) );
user.setAccessCode( daoUtil.getString( 2 ) );
user.setLastName( daoUtil.getString( 3 ) );
user.setFirstName( daoUtil.getString( 4 ) );
user.setEmail( daoUtil.getString( 5 ) );
user.setStatus( daoUtil.getInt( 6 ) );
user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
user.setAccessibilityMode( daoUtil.getBoolean( 8 ) ); |
File |
Line |
fr/paris/lutece/portal/business/dashboard/AdminDashboardDAO.java |
373 |
fr/paris/lutece/portal/business/dashboard/DashboardDAO.java |
371 |
private void buildSQLFilter( StringBuilder sbSQL, AdminDashboardFilter filter )
{
List<String> listFilters = new ArrayList<>( );
if ( filter.containsFilterOrder( ) )
{
listFilters.add( SQL_QUERY_FILTER_ORDER );
}
if ( filter.containsFilterColumn( ) )
{
listFilters.add( SQL_QUERY_FILTER_COLUMN );
}
if ( !listFilters.isEmpty( ) )
{
sbSQL.append( SQL_QUERY_KEYWORD_WHERE );
boolean bFirstFilter = true;
for ( String strFilter : listFilters )
{
sbSQL.append( strFilter );
if ( !bFirstFilter )
{
sbSQL.append( SQL_QUERY_KEYWORD_AND );
}
else
{
bFirstFilter = false;
}
}
}
}
/**
* Add daoUtil parameters
*
* @param daoUtil
* daoUtil
* @param nStartIndex
* start index
* @param filter
* the filter to apply
* @return end index
*/
private int applySQLFilter( DAOUtil daoUtil, int nStartIndex, AdminDashboardFilter filter ) |
File |
Line |
fr/paris/lutece/portal/web/rbac/RoleManagementJspBean.java |
917 |
fr/paris/lutece/portal/web/workgroup/AdminWorkgroupJspBean.java |
447 |
ReferenceList listAvailableUsers = new ReferenceList( );
for ( AdminUser user : AdminUserHome.findUserList( ) )
{
final ReferenceItem itemUser = new ReferenceItem( );
itemUser.setCode( Integer.toString( user.getUserId( ) ) );
itemUser.setName( user.getLastName( ) + " " + user.getFirstName( ) + " (" + user.getAccessCode( ) + ")" );
boolean bAssigned = listAssignedUsers.stream( )
.anyMatch( assignedUser -> Integer.toString( assignedUser.getUserId( ) ).equals( itemUser.getCode( ) ) );
// Add users with higher level then connected user or add all users if connected user is administrator
if ( !bAssigned && isUserHigherThanConnectedUser( user ) )
{ |
File |
Line |
fr/paris/lutece/portal/service/mail/MailUtil.java |
269 |
fr/paris/lutece/portal/service/mail/MailUtil.java |
321 |
if ( mail.getFilesAttachement( ) != null )
{
for ( FileAttachment fileAttachement : mail.getFilesAttachement( ) )
{
String strFileName = fileAttachement.getFileName( );
byte [ ] bContentFile = fileAttachement.getData( );
String strContentType = fileAttachement.getType( );
ByteArrayDataSource dataSource = new ByteArrayDataSource( bContentFile, strContentType );
msgBodyPart = new MimeBodyPart( );
msgBodyPart.setDataHandler( new DataHandler( dataSource ) );
msgBodyPart.setFileName( strFileName );
msgBodyPart.setDisposition( CONSTANT_DISPOSITION_ATTACHMENT );
multipart.addBodyPart( msgBodyPart );
}
}
msg.setContent( multipart );
sendMessage( msg, transport );
}
/**
* Send a Multipart text message with attached files.
*
* @param mail
* The mail to send
* @param transport
* the smtp transport object
* @param session
* the smtp session object
* @throws AddressException
* If invalid address
* @throws SendFailedException
* If an error occured during sending
* @throws MessagingException
* If a messaging error occured
*/
protected static void sendMultipartMessageText( MailItem mail, Transport transport, Session session ) throws MessagingException |
File |
Line |
fr/paris/lutece/portal/web/features/RightJspBean.java |
235 |
fr/paris/lutece/portal/web/workgroup/AdminWorkgroupJspBean.java |
514 |
model.put( MARK_ASSIGNED_USERS_NUMBER, listAssignedUsers.size( ) );
model.put( MARK_ITEM_NAVIGATOR, _itemNavigator );
model.put( MARK_PAGINATOR, paginator );
model.put( MARK_NB_ITEMS_PER_PAGE, Integer.toString( _nItemsPerPage ) );
model.put( SecurityTokenService.MARK_TOKEN, SecurityTokenService.getInstance( ).getToken( request, TEMPLATE_ASSIGN_USERS ) );
HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_ASSIGN_USERS, getLocale( ), model );
return getAdminPage( template.getHtml( ) );
}
/**
* Process the data capture form for assign users to a role
*
* @param request
* The HTTP Request
* @return The Jsp URL of the process result
* @throws AccessDeniedException
* if the security token is invalid
*/
public String doAssignUsers( HttpServletRequest request ) throws AccessDeniedException
{
if ( !SecurityTokenService.getInstance( ).validate( request, TEMPLATE_ASSIGN_USERS ) )
{
throw new AccessDeniedException( ERROR_INVALID_TOKEN );
}
String strIdRight = request.getParameter( PARAMETER_ID_RIGHT ); |
File |
Line |
fr/paris/lutece/portal/web/user/AdminUserJspBean.java |
2210 |
fr/paris/lutece/portal/web/user/AdminUserJspBean.java |
2243 |
public String doInsertRegularExpression( HttpServletRequest request ) throws AccessDeniedException
{
if ( !SecurityTokenService.getInstance( ).validate( request, TOKEN_TECHNICAL_ADMIN ) )
{
throw new AccessDeniedException( ERROR_INVALID_TOKEN );
}
if ( !RBACService.isAuthorized( AdminUser.RESOURCE_TYPE, RBAC.WILDCARD_RESOURCES_ID, AdminUserResourceIdService.PERMISSION_MANAGE_ADVANCED_PARAMETERS,
getUser( ) ) )
{
throw new AccessDeniedException(
CONSTANT_USER_MSG + getUser( ) + CONSTANT_NOT_AUTHORIZED + AdminUserResourceIdService.PERMISSION_MANAGE_ADVANCED_PARAMETERS );
}
String strRegularExpressionId = request.getParameter( PARAMETER_ID_EXPRESSION );
if ( StringUtils.isNotBlank( strRegularExpressionId ) && StringUtils.isNumeric( strRegularExpressionId ) )
{
int nRegularExpressionId = Integer.parseInt( strRegularExpressionId );
AdminUserService.doInsertRegularExpression( nRegularExpressionId ); |
File |
Line |
fr/paris/lutece/portal/web/util/LocalizedDelegatePaginator.java |
83 |
fr/paris/lutece/portal/web/util/LocalizedPaginator.java |
104 |
}
/**
* {@inheritDoc}
*/
@Override
public String getLabelFirst( )
{
return I18nService.getLocalizedString( KEY_FIRST, _locale );
}
/**
* {@inheritDoc }
*/
@Override
public String getLabelPrevious( )
{
return I18nService.getLocalizedString( KEY_PREVIOUS, _locale );
}
/**
* {@inheritDoc }
*/
@Override
public String getLabelNext( )
{
return I18nService.getLocalizedString( KEY_NEXT, _locale );
}
/**
* {@inheritDoc }
*/
@Override
public String getLabelLast( )
{
return I18nService.getLocalizedString( KEY_LAST, _locale );
}
/**
* {@inheritDoc }
*/
@Override
public String getLabelItemCount( )
{
return I18nService.getLocalizedString( KEY_ITEM_COUNT, _locale );
}
/**
* {@inheritDoc }
*/
@Override
public String getLabelItemCountPerPage( )
{
return I18nService.getLocalizedString( KEY_ITEM_COUNT_PER_PAGE, _locale );
}
} |
File |
Line |
fr/paris/lutece/portal/business/dashboard/AdminDashboardFilter.java |
41 |
fr/paris/lutece/portal/business/dashboard/DashboardFilter.java |
41 |
{
private Integer _nFilterColumn;
private Integer _nFilterOrder;
/**
* Filter column
*
* @return Filter column
*/
public Integer getFilterColumn( )
{
return _nFilterColumn;
}
/**
* Filter column
*
* @param nFilterColumn
* the Filter column
*/
public void setFilterColumn( Integer nFilterColumn )
{
_nFilterColumn = nFilterColumn;
}
/**
* Filter order
*
* @return Filter order
*/
public Integer getFilterOrder( )
{
return _nFilterOrder;
}
/**
* Filter order
*
* @param nFilterOrder
* the Filter order
*/
public void setFilterOrder( Integer nFilterOrder )
{
_nFilterOrder = nFilterOrder;
}
/**
* true if {@link #getFilterOrder()} != null
*
* @return <code>true</code> if {@link #getFilterOrder()} != null, <code>false</code> otherwise.
*/
public boolean containsFilterOrder( )
{
return _nFilterOrder != null;
}
/**
* true if {@link #getFilterColumn()} != null
*
* @return <code>true</code> if {@link #getFilterColumn()} != null, <code>false</code> otherwise
*/
public boolean containsFilterColumn( )
{
return _nFilterColumn != null;
}
/**
*
* {@inheritDoc}
*/
@Override
public String toString( )
{
return this.getClass( ).getName( ) + "[column=" + this.getFilterColumn( ) + ", order=" + this.getFilterOrder( ) + "]";
}
} |
File |
Line |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
659 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
691 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
910 |
daoUtil.setString( 1, strRoleKey );
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
AdminUser user = new AdminUser( );
user.setUserId( daoUtil.getInt( 1 ) );
user.setAccessCode( daoUtil.getString( 2 ) );
user.setLastName( daoUtil.getString( 3 ) );
user.setFirstName( daoUtil.getString( 4 ) );
user.setEmail( daoUtil.getString( 5 ) );
user.setStatus( daoUtil.getInt( 6 ) );
user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
user.setAccessibilityMode( daoUtil.getBoolean( 8 ) ); |
File |
Line |
fr/paris/lutece/portal/business/xsl/XslExportDAO.java |
105 |
fr/paris/lutece/portal/business/xsl/XslExportDAO.java |
185 |
fr/paris/lutece/portal/business/xsl/XslExportDAO.java |
229 |
if ( daoUtil.next( ) )
{
xslExport = new XslExport( );
xslExport.setIdXslExport( daoUtil.getInt( 1 ) );
xslExport.setTitle( daoUtil.getString( 2 ) );
xslExport.setDescription( daoUtil.getString( 3 ) );
xslExport.setExtension( daoUtil.getString( 4 ) );
if ( daoUtil.getObject( 5 ) != null )
{
file = new File( );
file.setIdFile( daoUtil.getInt( 5 ) );
xslExport.setFile( file );
}
xslExport.setPlugin( daoUtil.getString( 6 ) ); |
File |
Line |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
237 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
660 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
692 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
879 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
AdminUser user = new AdminUser( );
user.setUserId( daoUtil.getInt( 1 ) );
user.setAccessCode( daoUtil.getString( 2 ) );
user.setLastName( daoUtil.getString( 3 ) );
user.setFirstName( daoUtil.getString( 4 ) );
user.setEmail( daoUtil.getString( 5 ) );
user.setStatus( daoUtil.getInt( 6 ) );
user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
user.setUserLevel( daoUtil.getInt( 8 ) ); |
File |
Line |
fr/paris/lutece/util/xml/XmlUtil.java |
138 |
fr/paris/lutece/util/xml/XmlUtil.java |
217 |
public static void addElement( StringBuffer strXmlBuffer, String strTag, String strValue, Map<?, ?> attrList )
{
if ( SecurityUtil.containsXmlExternalEntityInjectionTerms( strValue ) )
{
return;
}
strXmlBuffer.append( TAG_BEGIN );
strXmlBuffer.append( strTag );
if ( attrList != null )
{
for ( Entry<?, ?> entry : attrList.entrySet( ) )
{
String code = (String) entry.getKey( );
strXmlBuffer.append( TAG_SEPARATOR + code + TAG_ASSIGNMENT + TAG_ENCLOSED + entry.getValue( ) + TAG_ENCLOSED );
}
}
strXmlBuffer.append( ">" ); |
File |
Line |
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java |
256 |
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java |
291 |
fr/paris/lutece/portal/web/user/AdminLoginJspBean.java |
333 |
Locale locale = AdminUserService.getLocale( request );
Enumeration<String> enumParams = request.getParameterNames( );
ReferenceList listParams = new ReferenceList( );
String strParamName;
while ( enumParams.hasMoreElements( ) )
{
strParamName = enumParams.nextElement( );
String strParamValue = request.getParameter( strParamName );
listParams.addItem( strParamName, strParamValue );
}
model.put( MARK_PARAM_VERSION, AppInfo.getVersion( ) );
model.put( MARK_PARAMS_LIST, listParams );
model.put( MARK_SITE_NAME, PortalService.getSiteName( ) );
HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_ADMIN_FORGOT_PASSWORD, locale, model ); |
File |
Line |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
180 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
241 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
883 |
fr/paris/lutece/portal/business/user/AdminUserDAO.java |
915 |
user = new AdminUser( );
user.setUserId( daoUtil.getInt( 1 ) );
user.setAccessCode( daoUtil.getString( 2 ) );
user.setLastName( daoUtil.getString( 3 ) );
user.setFirstName( daoUtil.getString( 4 ) );
user.setEmail( daoUtil.getString( 5 ) );
user.setStatus( daoUtil.getInt( 6 ) );
user.setLocale( new Locale( daoUtil.getString( 7 ) ) );
user.setUserLevel( daoUtil.getInt( 8 ) );
user.setPasswordReset( daoUtil.getBoolean( 9 ) ); |