Changeset 28983

Show
Ignore:
Timestamp:
01/12/08 10:23:29 (11 months ago)
Author:
sfermigier
Message:

Forward port of [28980] (cosmit).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/CoreSession.java

    r28360 r28983  
    941941    /** 
    942942     * @deprecated use SearchService instead. See 
    943      *             {@link http://doc.nuxeo.org/reference/html/search-service.html} 
     943     *             {@url http://doc.nuxeo.org/reference/html/search-service.html} 
    944944     */ 
    945945    @Deprecated 
     
    955955     * 
    956956     * @deprecated use SearchService instead. See 
    957      *             {@link http://doc.nuxeo.org/reference/html/search-service.html} 
     957     *             {@url http://doc.nuxeo.org/reference/html/search-service.html} 
    958958     */ 
    959959    @Deprecated 
     
    970970     * 
    971971     * @deprecated use SearchService instead. See 
    972      *             {@link http://doc.nuxeo.org/reference/html/search-service.html} 
     972     *             {@url http://doc.nuxeo.org/reference/html/search-service.html} 
    973973     */ 
    974974    @Deprecated 
     
    978978    /** 
    979979     * @deprecated use SearchService instead. See 
    980      *             {@link http://doc.nuxeo.org/reference/html/search-service.html} 
     980     *             {@url http://doc.nuxeo.org/reference/html/search-service.html} 
    981981     */ 
    982982    @Deprecated 
     
    986986    /** 
    987987     * @deprecated use SearchService instead. See 
    988      *             {@link http://doc.nuxeo.org/reference/html/search-service.html} 
     988     *             {@url http://doc.nuxeo.org/reference/html/search-service.html} 
    989989     */ 
    990990    @Deprecated 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/Filter.java

    r19250 r28983  
    2020package org.nuxeo.ecm.core.api; 
    2121 
     22import java.io.Serializable; 
     23 
    2224/** 
    2325 * A filtering function for data models. 
     
    2628 * 
    2729 */ 
    28 public interface Filter
     30public interface Filter extends Serializable
    2931 
    3032    /** 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/WrappedException.java

    r28462 r28983  
    4242    public boolean sameAs(String className) { 
    4343        return this.className == null 
    44             ? this.className == className 
    45                 : this.className.equals(className); 
     44            ?  className == null : this.className.equals(className); 
    4645    } 
    4746 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/impl/FacetFilter.java

    r19203 r28983  
    2828 
    2929 
    30 public class FacetFilter implements Filter, Serializable
     30public class FacetFilter implements Filter
    3131 
    3232    private static final long serialVersionUID = 666516084564501480L; 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/model/DocumentPart.java

    r28346 r28983  
    3535 
    3636    /** 
    37      * The document schema 
     37     * The document schema. 
     38     * 
    3839     * @return the schema 
    3940     */ 
    4041    Schema getSchema(); 
    41  
    4242 
    4343    Property createProperty(Property parent, Field field); 
     
    4545    Property createProperty(Property parent, Field field, int flags); 
    4646 
    47  
    4847    /** 
    49      * Export as a map the document values. Only the non phantom properties are exported. 
     48     * Exports as a map the document values. Only the non phantom properties are exported. 
     49     * 
    5050     * @return 
    5151     */ 
     
    5858    void importDiff(PropertyDiff diff) throws PropertyException; 
    5959 
    60  
    6160// 
    6261//    public void setContextData(String key, Object value); 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/model/impl/ComplexProperty.java

    r28331 r28983  
    5050 
    5151    protected ComplexProperty(Property parent) { 
    52         super (parent); 
     52        super(parent); 
    5353        children = new HashMap<String, Property>(); 
    5454    } 
    5555 
    5656    protected ComplexProperty(Property parent, int flags) { 
    57         super (parent, flags); 
     57        super(parent, flags); 
    5858        children = new HashMap<String, Property>(); 
    5959    } 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/model/impl/DocumentPartImpl.java

    r28190 r28983  
    5757 
    5858 
    59     public DocumentPartImpl(Schema schema) { 
    60         this (schema, null); 
    61     } 
    62  
    6359    public DocumentPartImpl(Schema schema, PropertyFactory factory) { 
    64         super (null); 
     60        super(null); 
    6561        this.schema = schema; 
    6662        this.factory = factory == null ? DefaultPropertyFactory.getInstance() : factory; 
     63    } 
     64 
     65    public DocumentPartImpl(Schema schema) { 
     66        this(schema, null); 
    6767    } 
    6868 
     
    112112    } 
    113113 
    114  
    115114    public Map<String, Serializable> exportValues() throws PropertyException { 
    116115        ValueExporter exporter = new ValueExporter(); 
     
    121120        init((Serializable)values); 
    122121    } 
    123  
    124122 
    125123    public void accept(PropertyVisitor visitor, Object arg) throws PropertyException { 
     
    219217            throws ClassNotFoundException, IOException, PropertyException { 
    220218        // read schema 
    221         String schemaName = (String)in.readObject(); 
     219        String schemaName = (String) in.readObject(); 
    222220        //schema = TypeService.getSchemaManager().getSchema(schemaName); 
    223221        schema = Framework.getLocalService(SchemaManager.class).getSchema(schemaName); 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/model/impl/osm/ObjectMappingError.java

    r25987 r28983  
    2929 
    3030    public ObjectMappingError(String message) { 
    31         super (message); 
     31        super(message); 
    3232    } 
    3333 
    3434    public ObjectMappingError(String message, Throwable cause) { 
    35         super (message, cause); 
     35        super(message, cause); 
    3636    } 
    3737 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/model/impl/osm/ObjectProperty.java

    r27627 r28983  
    4141 
    4242    public ObjectProperty(ObjectAdapter adapter, Property parent, Field field) { 
    43         super (adapter, parent, field); 
     43        super(adapter, parent, field); 
    4444    } 
    4545 
    46  
    4746    public ObjectProperty(ObjectAdapter adapter,  Property parent, Field field, int flags) { 
    48         super (adapter, parent, field, flags); 
     47        super(adapter, parent, field, flags); 
    4948    } 
    50  
    5149 
    5250    @Override 
     
    6664    } 
    6765 
    68  
    6966    private void readObject(ObjectInputStream in) 
    70     throws ClassNotFoundException, IOException { 
     67            throws ClassNotFoundException, IOException { 
    7168//      always perform the default de-serialization first 
    7269        in.defaultReadObject(); 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-facade/src/main/java/org/nuxeo/ecm/core/api/ejb/CoreFacadeBusinessDelegate.java

    r21298 r28983  
    4242    private static final long serialVersionUID = -3747397825256725506L; 
    4343 
    44     private static final Log log = LogFactory 
    45             .getLog(CoreFacadeBusinessDelegate.class); 
     44    private static final Log log = LogFactory.getLog(CoreFacadeBusinessDelegate.class); 
    4645 
    4746    protected JNDILookupHelper jndiHelper; 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-facade/src/main/java/org/nuxeo/ecm/core/api/ejb/DocumentManagerBean.java

    r28926 r28983  
    8585 
    8686    @Resource 
    87     EJBContext context; 
     87    transient EJBContext context; 
    8888 
    8989    @Override 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-facade/src/test/java/org/nuxeo/ecm/core/api/NameFilter.java

    r19250 r28983  
    2222public class NameFilter implements Filter { 
    2323 
     24    private static final long serialVersionUID = -7722352334757582134L; 
     25 
    2426    private final String prefix; 
    2527 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-facade/src/test/java/org/nuxeo/ecm/core/api/TestCustomVersioning.java

    r23533 r28983  
    3030    @Override 
    3131    protected void deployCustomVersioning() { 
    32         deploy("CustomVersioningService.xml"); 
     32        deployContrib("CustomVersioningService.xml"); 
    3333    } 
    3434 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-facade/src/test/java/org/nuxeo/ecm/core/api/TestSecurity.java

    r28363 r28983  
    5757    protected void setUp() throws Exception { 
    5858        super.setUp(); 
    59         deploy("CoreService.xml"); 
    60         deploy("TypeService.xml"); 
    61         deploy("PolicyService.xml"); 
    62         deploy("SecurityService.xml"); 
    63         deploy("RepositoryService.xml"); 
    64         deploy("test-CoreExtensions.xml"); 
    65         deploy("CoreTestExtensions.xml"); 
    66         deploy("DemoRepository.xml"); 
    67         deploy("LifeCycleService.xml"); 
    68         deploy("LifeCycleServiceExtensions.xml"); 
     59        deployContrib("CoreService.xml"); 
     60        deployContrib("TypeService.xml"); 
     61        deployContrib("PolicyService.xml"); 
     62        deployContrib("SecurityService.xml"); 
     63        deployContrib("RepositoryService.xml"); 
     64        deployContrib("test-CoreExtensions.xml"); 
     65        deployContrib("CoreTestExtensions.xml"); 
     66        deployContrib("DemoRepository.xml"); 
     67        deployContrib("LifeCycleService.xml"); 
     68        deployContrib("LifeCycleServiceExtensions.xml"); 
    6969 
    7070        Map<String, Serializable> ctx = new HashMap<String, Serializable>(); 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-io-api/src/main/java/org/nuxeo/ecm/core/io/api/ExportedDocument.java

    r28346 r28983  
    2020package org.nuxeo.ecm.core.io.api; 
    2121 
    22 import java.util.HashMap; 
    2322import java.util.Map; 
    2423 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-jca/src/main/java/org/nuxeo/ecm/core/jca/JCAManagedConnectionFactory.java

    r28346 r28983  
    4444    private static final long serialVersionUID = -8240471437665772556L; 
    4545 
    46     // the repository name - needed to be able to lazy load the repository desciptor 
     46    // the repository name - needed to be able to lazy load the repository descriptor 
    4747    // (the repository may not be yet registered at time of data source deployment) 
    4848    private String name; 
    4949 
    50     // loaded lazy when the repository is regsitered through nuxeo runtime extensions 
     50    // loaded lazily when the repository is registered through nuxeo runtime extensions 
    5151    private RepositoryDescriptor descriptor; 
    5252 
     
    122122            throws ResourceException { 
    123123        JCAConnectionFactory handle = new JCAConnectionFactory(this, cm); 
    124         log("Created repository handle (" + handle + ")"); 
     124        log("Created repository handle (" + handle + ')'); 
    125125        return handle; 
    126126    } 
     
    278278            repository = repositoryService.getRepositoryManager() 
    279279            .getOrRegisterRepository(descriptor); 
    280             log("Created repository " + descriptor.getName() + " (" + repository + ")"); 
     280            log("Created repository " + descriptor.getName() + " (" + repository + ')'); 
    281281        } catch (Exception e) { 
    282282            log("Failed to create repository", e); 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-jcr-connector-test/src/main/java/org/nuxeo/ecm/core/repository/jcr/testing/RepositoryTestCase.java

    r24461 r28983  
    4444        super.setUp(); 
    4545        // the core bundle 
    46         deploy("CoreService.xml"); 
    47         deploy("TypeService.xml"); 
    48         deploy("SecurityService.xml"); 
    49         deploy("RepositoryService.xml"); 
    50         deploy("test-CoreExtensions.xml"); 
     46        deployContrib("CoreService.xml"); 
     47        deployContrib("TypeService.xml"); 
     48        deployContrib("SecurityService.xml"); 
     49        deployContrib("RepositoryService.xml"); 
     50        deployContrib("test-CoreExtensions.xml"); 
    5151    } 
    5252 
     
    5959    public Repository getRepository() throws Exception { 
    6060        if (repository == null) { 
    61             // the repository should be deployed the last 
    62             // after any other bundle that is deploying doctypes 
    63             deploy("DemoRepository.xml"); 
     61            // the repository should be deployContribed the last 
     62            // after any other bundle that is deployContribing doctypes 
     63            deployContrib("DemoRepository.xml"); 
    6464            repository = NXCore.getRepositoryService() 
    6565                .getRepositoryManager().getRepository("demo"); 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-jcr-connector/src/main/java/org/nuxeo/ecm/core/repository/jcr/DocumentPartReader.java

    r28220 r28983  
    4848        // to be referenced later from the client -> TODO this should be refactored : lazy blob 
    4949        // replaced by streaming blobs which are also lazy 
    50         dp.setData(doc.getRepository().getName()+":"+doc.getSession().getUserSessionId()); 
     50        dp.setData( 
     51                doc.getRepository().getName() + ':' + doc.getSession().getUserSessionId()); 
    5152 
    5253        // proxy document is forwarding props to refered doc 
  • org.nuxeo.ecm.core/trunk/nuxeo-core-jcr-connector/src/main/java/org/nuxeo/ecm/core/repository/jcr/JCRHelper.java

    r25732 r28983  
    7171            return copy(doc.getNode(), 
    7272                    ModelAdapter.getContainerNode(target.getNode()), 
    73                     doc.getName() + "_" + doc.getUUID() + "_" + (cnt++)); 
     73                    doc.getName() + '_' + doc.getUUID() + '_' + (cnt++)); 
    7474        } catch (RepositoryException e) { 
    7575            throw new DocumentException("failed to copy node", e); 
  • org.nuxeo.ecm.core/trunk/nuxeo-core/src/main/java/org/nuxeo/ecm/core/lifecycle/impl/LifeCycleServiceImpl.java

    r20625 r28983  
    189189        } else { 
    190190            throw new LifeCycleException("Not allowed to follow transition <" 
    191                     + transitionName + "> from state <" + currentStateName 
    192                     + ">"); 
     191                    + transitionName + "> from state <" + currentStateName + '>'); 
    193192        } 
    194193    } 
  • org.nuxeo.runtime/trunk/nuxeo-runtime-jboss-extensions/src/main/java/org/nuxeo/runtime/jboss/deployment/preprocessor/FragmentDescriptor.java

    r25241 r28983  
    124124    @Override 
    125125    public String toString() { 
    126         return name + " [" + fileName + "]"
     126        return name + " [" + fileName + ']'
    127127    } 
    128128 
  • org.nuxeo.runtime/trunk/nuxeo-runtime-test/src/test/java/org/nuxeo/runtime/ComponentDeploymentTest.java

    r20573 r28983  
    3535    protected void setUp() throws Exception { 
    3636        super.setUp(); 
    37         deploy("MyComp1.xml"); 
    38         deploy("MyComp2.xml"); 
     37        deployContrib("MyComp1.xml"); 
     38        deployContrib("MyComp2.xml"); 
    3939    } 
    4040 
  • org.nuxeo.runtime/trunk/nuxeo-runtime-test/src/test/java/org/nuxeo/runtime/RuntimeInitializationTest.java

    r17316 r28983  
    3131    protected void setUp() throws Exception { 
    3232        super.setUp(); 
    33         deploy("MyComp1.xml"); 
    34         deploy("MyComp2.xml"); 
     33        deployContrib("MyComp1.xml"); 
     34        deployContrib("MyComp2.xml"); 
    3535    } 
    3636 
  • org.nuxeo.runtime/trunk/nuxeo-runtime-test/src/test/java/org/nuxeo/runtime/TestEventService.java

    r20573 r28983  
    3434    protected void setUp() throws Exception { 
    3535        super.setUp(); 
    36         deploy("EventService.xml"); 
    37         deploy("ListenerExtension.xml"); 
     36        deployContrib("EventService.xml"); 
     37        deployContrib("ListenerExtension.xml"); 
    3838    } 
    3939 
  • org.nuxeo.runtime/trunk/nuxeo-runtime/src/main/java/org/nuxeo/runtime/api/JBossServiceLocator.java

    r27917 r28983  
    4646        } 
    4747        if (host != null) { // overwrite default values (or those specified through properties) 
    48             String uri = "jnp://" + host + ":" + (port == 0 ? 1099 : port); 
     48            String uri = "jnp://" + host + ':' + (port == 0 ? 1099 : port); 
    4949            properties.put("java.naming.provider.url", uri); 
    5050        } 
  • org.nuxeo.runtime/trunk/nuxeo-runtime/src/main/java/org/nuxeo/runtime/util/SimpleRuntime.java

    r19031 r28983  
    7272        long stamp = System.currentTimeMillis(); 
    7373        counter++; 
    74         return Long.toHexString(stamp) + "-" 
    75             + System.identityHashCode(System.class) + "." + counter; 
     74        return Long.toHexString(stamp) + '-' 
     75            + System.identityHashCode(System.class) + '.' + counter; 
    7676    } 
    7777