Changeset 28491

Show
Ignore:
Timestamp:
01/04/08 20:04:30 (1 year ago)
Author:
sfermigier
Message:

Cosmit.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-actions-core/src/main/java/org/nuxeo/ecm/platform/actions/AbstractActionFilter.java

    r28484 r28491  
    2727public abstract class AbstractActionFilter implements ActionFilter { 
    2828 
     29    private static final long serialVersionUID = 6863014001035976681L; 
     30 
    2931    protected String id; 
    3032    protected String[] actions; 
    3133 
    3234 
    33     protected AbstractActionFilter() { 
    34         this(null, null); 
    35     } 
    36  
    3735    protected AbstractActionFilter(String id, String[] actions) { 
    3836        this.id = id; 
    3937        this.actions = actions; 
     38    } 
     39 
     40    protected AbstractActionFilter() { 
     41        this(null, null); 
    4042    } 
    4143 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-forms-layout-client/src/main/java/org/nuxeo/ecm/platform/forms/layout/facelets/plugins/AbstractWidgetTypeHandler.java

    r26053 r28491  
    3737public abstract class AbstractWidgetTypeHandler implements WidgetTypeHandler { 
    3838 
     39    private static final long serialVersionUID = -2933485416045771633L; 
     40 
    3941    Map<String, String> properties; 
    4042 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-io-api/src/main/java/org/nuxeo/ecm/platform/io/api/AbstractIOResourceAdapter.java

    r28456 r28491  
    4242 */ 
    4343public abstract class AbstractIOResourceAdapter implements IOResourceAdapter { 
     44 
     45    private static final long serialVersionUID = 4399167777434048174L; 
    4446 
    4547    private static final Log log = LogFactory.getLog(AbstractIOResourceAdapter.class); 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-login/src/main/java/org/nuxeo/ecm/platform/login/NuxeoLoginModule.java

    r26329 r28491  
    287287    public Principal createIdentity(String name) throws LoginException { 
    288288        log.debug("createIdentity: " + name); 
    289         NuxeoPrincipal principal = null; 
    290         try { 
     289        try { 
     290            NuxeoPrincipal principal = null; 
    291291            if (manager == null) { 
    292292                principal = new NuxeoPrincipalImpl(name); 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-modifier/src/main/java/org/nuxeo/ecm/platform/modifier/DocModifierException.java

    r20593 r28491  
    2222public class DocModifierException extends Exception { 
    2323 
     24    private static final long serialVersionUID = 1268267815417750776L; 
     25 
    2426    public DocModifierException() { 
    25         super(); 
    2627        // TODO Auto-generated constructor stub 
    2728    } 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-notification-core/src/main/java/org/nuxeo/ecm/platform/ec/notification/email/NotificationsRenderingEngine.java

    r28478 r28491  
    5959    class NotifsRenderingJob extends DefaultRenderingResult implements FreemarkerRenderingJob { 
    6060 
     61        private static final long serialVersionUID = -7133062841713259967L; 
     62 
    6163        NotifsRenderingJob(String formatName) { 
    6264            super(formatName); 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-notification-core/src/main/java/org/nuxeo/ecm/platform/ec/notification/service/NotificationDescriptor.java

    r22588 r28491  
    3535public class NotificationDescriptor implements Notification { 
    3636 
     37    private static final long serialVersionUID = -5974825427889204458L; 
     38     
    3739    @XNode("@name") 
    3840    protected String name; 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-placeful-facade/src/main/java/org/nuxeo/ecm/platform/ec/placeful/ejb/SubscriptionConfig.java

    r19072 r28491  
    2727public class SubscriptionConfig extends Annotation { 
    2828 
     29    private static final long serialVersionUID = 4613400919746297593L; 
     30 
    2931    private String event; 
    3032 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-publishing-api/src/main/java/org/nuxeo/ecm/platform/publishing/api/AbstractNuxeoCoreValidatorsRule.java

    r28476 r28491  
    4040public abstract class AbstractNuxeoCoreValidatorsRule implements ValidatorsRule { 
    4141 
     42    private static final long serialVersionUID = -1578337333898362863L; 
     43 
    4244    protected CoreSession session; 
    4345 
     
    4749        loginCtx = Framework.login(); 
    4850        loginCtx.login(); 
    49  
    5051    } 
    5152 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-publishing/src/test/java/org/nuxeo/ecm/platform/publishing/FakeValidatorsRule.java

    r26320 r28491  
    3030public class FakeValidatorsRule implements ValidatorsRule { 
    3131 
     32    private static final long serialVersionUID = 5124173341571522375L; 
     33 
    3234    public String[] computesValidatorsFor(DocumentModel dm) 
    3335            throws PublishingValidatorException { 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-relations-io/src/test/java/org/nuxeo/ecm/platform/relations/io/test/FakeSecurityManager.java

    r27236 r28491  
    3535 
    3636    private final class ACPGrant extends ACPImpl { 
     37 
     38        private static final long serialVersionUID = -5167896851016076928L; 
    3739 
    3840        @Override 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-api/src/main/java/org/nuxeo/ecm/core/search/api/backend/impl/AbstractSearchEngineBackend.java

    r21749 r28491  
    2929/** 
    3030 * Abstract search engine backend. 
    31  * 
    3231 * <p> 
    3332 * Third party code that whish to register a backend must extend this abc. 
     
    3938public abstract class AbstractSearchEngineBackend extends DefaultComponent implements 
    4039        SearchEngineBackend { 
     40 
     41    private static final long serialVersionUID = -430131396562337751L; 
    4142 
    4243    protected String name; 
     
    8990    } 
    9091 
     92    @Override 
    9193    public void registerContribution(Object contribution, 
    9294            String extensionPoint, ComponentInstance contributor) { 
    9395        // do nothing by default. Most backends won't require extra 
    9496        // nxruntime configuration 
    95         return; 
    9697    } 
    9798 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-api/src/main/java/org/nuxeo/ecm/core/search/api/client/indexing/resources/AbstractIndexableResourceFactory.java

    r28476 r28491  
    3737        IndexableResourceFactory { 
    3838 
     39    private static final long serialVersionUID = 7290522094143617159L; 
     40 
    3941    public ResolvedResource resolveResourceFor(Serializable targetResource, 
    4042            IndexableResourceConf conf, String sid) throws IndexingException { 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-api/src/main/java/org/nuxeo/ecm/core/search/api/client/indexing/resources/document/DocumentIndexableResourceFactory.java

    r28480 r28491  
    2828import org.nuxeo.ecm.core.search.api.client.indexing.resources.IndexableResource; 
    2929import org.nuxeo.ecm.core.search.api.client.indexing.resources.document.impl.DocumentIndexableResourceImpl; 
    30 import org.nuxeo.ecm.core.search.api.client.indexing.resources.factory.IndexableResourceFactory; 
    3130import org.nuxeo.ecm.core.search.api.indexing.resources.configuration.IndexableResourceConf; 
    3231 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-api/src/main/java/org/nuxeo/ecm/core/search/api/client/query/AbstractQuery.java

    r28456 r28491  
    2828public abstract class AbstractQuery implements BaseQuery { 
    2929 
     30    private static final long serialVersionUID = -940039025589525163L; 
     31     
    3032    protected SearchPrincipal principal; 
    3133 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-api/src/main/java/org/nuxeo/ecm/core/search/api/client/query/impl/AbstractNativeQuery.java

    r28456 r28491  
    3333        BaseNativeQuery { 
    3434 
     35    private static final long serialVersionUID = -191269286052787249L; 
     36     
    3537    protected String backendName; 
    3638 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-transform-core/src/main/java/org/nuxeo/ecm/platform/transform/plugin/AbstractPlugin.java

    r28476 r28491  
    4141 */ 
    4242public abstract class AbstractPlugin implements Plugin { 
     43 
     44    private static final long serialVersionUID = 8591897901747795662L; 
    4345 
    4446    protected String name = ""; 
     
    133135            trs[i] = new TransformDocumentImpl(blobs[i]); 
    134136        } 
    135         return this.transform(options, trs); 
     137        return transform(options, trs); 
    136138    } 
    137139 
    138140    public boolean isSourceCandidate(TransformDocument doc) { 
    139         boolean candidate = false; 
    140141 
    141142        String smtype; 
     
    146147        } 
    147148 
    148         if (smtype == null || getSourceMimeTypes().contains(smtype)) { 
     149        boolean candidate = false; 
     150        if (smtype == null || sourceMimeTypes.contains(smtype)) { 
    149151            candidate = true; 
    150152        } 
     
    154156 
    155157    public boolean isSourceCandidate(Blob blob) { 
    156         boolean candidate = false; 
    157158 
    158159        String smtype; 
     
    163164        } 
    164165 
    165         if (smtype == null || getSourceMimeTypes().contains(smtype)) { 
     166        boolean candidate = false; 
     167        if (smtype == null || sourceMimeTypes.contains(smtype)) { 
    166168            candidate = true; 
    167169        } 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-transform-core/src/main/java/org/nuxeo/ecm/platform/transform/transformer/AbstractTransformer.java

    r28457 r28491  
    5959 
    6060    protected AbstractTransformer() { 
    61  
    6261    } 
    6362 
     
    106105 
    107106        log.debug("pluginsChain " + pluginsChain); 
    108         Plugin plugin; 
    109107        for (String name : pluginsChain) { 
    110             plugin = nxtransform.getPluginByName(name); 
     108            Plugin plugin = nxtransform.getPluginByName(name); 
    111109            if (plugin != null) { 
    112110                chain.add(plugin); 
     
    143141            } 
    144142        } 
    145         return this.transform(options, trs); 
     143        return transform(options, trs); 
    146144    } 
    147145 
     
    175173                pending = results.toArray(pending); 
    176174            } catch (Exception e) { 
    177                 log.error("An error occured while trying to perform " + "" 
     175                log.error("An error occured while trying to perform " 
    178176                        + "a transformation chain.", e); 
    179177            } finally { 
    180                 log.debug(timer.mark("Plugin transformation terminated name=" 
     178                log.debug(timer.mark("Plugin transformation terminated, name=" 
    181179                        + plugin.getName())); 
    182180            } 
     
    185183        timer.stop(); 
    186184        log.info("Global transformation chain terminated for transformer name=" 
    187                 + getName() + timer); 
     185                + name + timer); 
    188186 
    189187        return results; 
     
    199197     * @return a filtered list of transform documents. 
    200198     */ 
    201     protected TransformDocument[] filterSourcesFor(TransformDocument[] sources, 
     199    protected static TransformDocument[] filterSourcesFor(TransformDocument[] sources, 
    202200            Plugin plugin) { 
    203201        List<TransformDocument> filtered = new ArrayList<TransformDocument>(); 
     
    219217     * @return a filtered list of blobs. 
    220218     */ 
    221     protected Blob[] filterSourcesFor(Blob[] blobs, Plugin plugin) { 
     219    protected static Blob[] filterSourcesFor(Blob[] blobs, Plugin plugin) { 
    222220        List<Blob> filtered = new ArrayList<Blob>(); 
    223221        for (Blob blob : blobs) { 
     
    245243        if (defaultOptions != null 
    246244                && defaultOptions.get(plugin.getName()) != null) { 
    247             mergedOptions.putAll(getDefaultOptions().get(plugin.getName())); 
     245            mergedOptions.putAll(defaultOptions.get(plugin.getName())); 
    248246        } 
    249247 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/auth/NuxeoAuthenticationFilter.java

    r28443 r28491  
    9696    } 
    9797 
    98     protected DocumentMessageProducer getMessageProducer() throws Exception { 
     98    protected static DocumentMessageProducer getMessageProducer() throws Exception { 
    9999        return Framework.getService(DocumentMessageProducer.class); 
    100100    } 
    101101 
    102     protected Boolean sendAuthenticationEvent(UserIdentificationInfo userInfo, String eventId, String comment) { 
     102    protected Boolean sendAuthenticationEvent(UserIdentificationInfo userInfo, 
     103            String eventId, String comment) { 
    103104        SystemSession ss = new SystemSession(); 
    104105        // login 
     
    422423    } 
    423424 
    424     protected CachableUserIdentificationInfo retrieveIdentityFromCache( 
     425    protected static CachableUserIdentificationInfo retrieveIdentityFromCache( 
    425426            HttpServletRequest httpRequest) { 
    426427 
    427428        HttpSession session = httpRequest.getSession(false); 
    428429        if (session != null) { 
    429             CachableUserIdentificationInfo cachableUserInfo = (CachableUserIdentificationInfo) session.getAttribute(NXAuthContants.USERIDENT_KEY); 
     430            CachableUserIdentificationInfo cachableUserInfo 
     431                    = (CachableUserIdentificationInfo) session.getAttribute(NXAuthContants.USERIDENT_KEY); 
    430432            if (cachableUserInfo != null) { 
    431433                return cachableUserInfo; 
     
    495497    } 
    496498 
    497     protected String getSavedRequestedURL(HttpServletRequest httpRequest) { 
     499    protected static String getSavedRequestedURL(HttpServletRequest httpRequest) { 
    498500        HttpSession session = httpRequest.getSession(false); 
    499501        if (session == null) { 
     
    575577    // App Server JAAS SPI 
    576578 
    577     protected void propagateUserIdentificationInformation( 
     579    protected static void propagateUserIdentificationInformation( 
    578580            CachableUserIdentificationInfo cachableUserIdent) { 
    579581 
     
    626628    } 
    627629 
    628     protected String getRequestedPage(HttpServletRequest httpRequest) { 
     630    protected static String getRequestedPage(HttpServletRequest httpRequest) { 
    629631        String requestURI = httpRequest.getRequestURI(); 
    630632        String context = httpRequest.getContextPath() + '/'; 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/auth/plugins/BasicAuthenticator.java

    r20114 r28491  
    5555            HttpServletResponse httpResponse, String baseURL) { 
    5656        try { 
    57             String baHeader = "Basic realm=\"" + realName + "\""
     57            String baHeader = "Basic realm=\"" + realName + '\"'
    5858            httpResponse.addHeader(BA_HEADER_NAME, baHeader); 
    5959            httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED); 
     
    7575            String b64userpassword = auth.substring(idx + 1); 
    7676            BASE64Decoder decoder = new BASE64Decoder(); 
    77             byte[] clearUp; 
    7877            try { 
    79                 clearUp = decoder.decodeBuffer(b64userpassword); 
     78                byte[] clearUp = decoder.decodeBuffer(b64userpassword); 
    8079                String userpassword = new String(clearUp); 
    8180                String username = userpassword.split(":")[0]; 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/binding/DownloadMethodExpression.java

    r20976 r28491  
    8282    @Override 
    8383    public int hashCode() { 
    84         int result; 
    85         result = blobExpression != null ? blobExpression.hashCode() : 0; 
    86         result = 31 
    87                 * result 
     84        int result = blobExpression != null ? blobExpression.hashCode() : 0; 
     85        result = 31 * result 
    8886                + (fileNameExpression != null ? fileNameExpression.hashCode() 
    8987                        : 0); 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/binding/MetaMethodExpression.java

    r19474 r28491  
    113113            res = originalMethodExpression.invoke(context, params); 
    114114            if (res instanceof String) { 
    115                 MethodExpression newMeth; 
    116115                String expression = (String) res; 
    117116                if (ComponentTagUtils.isValueReference(expression)) { 
     
    119118                    Application app = faces.getApplication(); 
    120119                    ExpressionFactory factory = app.getExpressionFactory(); 
    121                     newMeth = factory.createMethodExpression(context, 
    122                             expression, Object.class, new Class[0]); 
     120                    MethodExpression newMeth = factory.createMethodExpression( 
     121                            context, expression, Object.class, new Class[0]); 
    123122                    try { 
    124123                        res = newMeth.invoke(context, null); 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/binding/MetaValueExpression.java

    r24932 r28491  
    107107                String expression = (String) res; 
    108108                if (ComponentTagUtils.isMethodReference(expression)) { 
    109                     MethodExpression newMeth; 
    110109                    FacesContext faces = FacesContext.getCurrentInstance(); 
    111110                    Application app = faces.getApplication(); 
    112111                    ExpressionFactory factory = app.getExpressionFactory(); 
    113                     newMeth = factory.createMethodExpression(context, 
    114                             expression, Object.class, new Class[0]); 
     112                    MethodExpression newMeth = factory.createMethodExpression( 
     113                            context, expression, Object.class, new Class[0]); 
    115114                    try { 
    116115                        res = newMeth.invoke(context, null); 
     
    122121                    } 
    123122                } else if (ComponentTagUtils.isValueReference(expression)) { 
    124                     ValueExpression newExpr; 
    125123                    FacesContext faces = FacesContext.getCurrentInstance(); 
    126124                    Application app = faces.getApplication(); 
    127125                    ExpressionFactory factory = app.getExpressionFactory(); 
    128                     newExpr = factory.createValueExpression(context, 
    129                             expression, Object.class); 
     126                    ValueExpression newExpr = factory.createValueExpression( 
     127                            context, expression, Object.class); 
    130128                    try { 
    131129                        res = newExpr.getValue(context); 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/binding/MethodValueExpression.java

    r23106 r28491  
    104104        // invoke method instead of resolving value 
    105105        Object res; 
    106         try
     106        try
    107107            return methodExpression.invoke(arg0, paramTypesClasses); 
    108108        } 
    109         catch(Throwable t) 
    110         { 
    111             log.error("Error while evaluation MethodValueExpression " + methodExpression.getExpressionString() ); 
     109        catch (Throwable t) { 
     110            log.error( 
     111                    "Error while evaluation MethodValueExpression " + methodExpression.getExpressionString()); 
    112112            log.error("parameters are : " + paramTypesClasses.toString()); 
    113113            return null; 
    114114        } 
    115  
    116115    } 
    117116 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/component/file/UIInputFile.java

    r26925 r28491  
    235235                temp); 
    236236        if (!choices.contains(choice)) { 
    237             ComponentUtils.addErrorMessage(context, this, "" 
    238                     + "error.inputFile.invalidChoice"); 
     237            ComponentUtils.addErrorMessage(context, this, 
     238                    "error.inputFile.invalidChoice"); 
    239239            setValid(false); 
    240240            return; 
     
    302302        // validate filename 
    303303        UIComponent filenameFacet = getFacet(EDIT_FILENAME_FACET_NAME); 
    304         EditableValueHolder filenameComp = null; 
    305304        if (filenameFacet instanceof EditableValueHolder) { 
    306             filenameComp = (EditableValueHolder) filenameFacet; 
     305            EditableValueHolder filenameComp = (EditableValueHolder) filenameFacet; 
    307306            submitted.setFilename(filenameComp.getLocalValue()); 
    308307            String filename; 
     
    330329        // validate blob 
    331330        UIComponent uploadFacet = getFacet(UPLOAD_FACET_NAME); 
    332         EditableValueHolder uploadComp; 
    333331        if (uploadFacet instanceof EditableValueHolder) { 
    334             uploadComp = (EditableValueHold