001    package com.mockrunner.mock.connector.cci;
002    
003    import javax.resource.cci.ResourceAdapterMetaData;
004    
005    /**
006     * Mock implementation of <code>ResourceAdapterMetaData</code>.
007     */
008    public class MockResourceAdapterMetaData implements ResourceAdapterMetaData
009    {
010        private String adapterName = "Mockrunner Adapter";
011        private String shortDescription = "Mockrunner Adapter";
012        private String vendorName = "Mockrunner";
013        private String adapterVersion = "";
014        private String[] specsSupported = new String[0];
015        private String specVersion = "1.5";
016        private boolean supportsExecuteWithInAndOut = true;
017        private boolean supportsExecuteWithInOnly = true;
018        private boolean supportsLocalTransactionDemarcation = true;
019        
020        public String getAdapterName()
021        {
022            return adapterName;
023        }
024    
025        public String getAdapterShortDescription()
026        {
027            return shortDescription;
028        }
029    
030        public String getAdapterVendorName()
031        {
032            return vendorName;
033        }
034    
035        public String getAdapterVersion()
036        {
037            return adapterVersion;
038        }
039    
040        public String[] getInteractionSpecsSupported()
041        {
042            return specsSupported;
043        }
044    
045        public String getSpecVersion()
046        {
047            return specVersion;
048        }
049    
050        public boolean supportsExecuteWithInputAndOutputRecord()
051        {
052            return supportsExecuteWithInAndOut;
053        }
054    
055        public boolean supportsExecuteWithInputRecordOnly()
056        {
057            return supportsExecuteWithInOnly;
058        }
059    
060        public boolean supportsLocalTransactionDemarcation()
061        {
062            return supportsLocalTransactionDemarcation;
063        }
064        
065        public void setAdapterName(String adapterName)
066        {
067            this.adapterName = adapterName;
068        }
069    
070        public void setAdapterShortDescription(String shortDescription)
071        {
072            this.shortDescription = shortDescription;
073        }
074    
075        public void setAdapterVendorName(String vendorName)
076        {
077            this.vendorName = vendorName;
078        }
079    
080        public void setAdapterVersion(String adapterVersion)
081        {
082            this.adapterVersion = adapterVersion;
083        }
084    
085        public void setInteractionSpecsSupported(String[] specsSupported)
086        {
087            this.specsSupported = specsSupported;
088        }
089    
090        public void setSpecVersion(String specVersion)
091        {
092            this.specVersion = specVersion;
093        }
094    
095        public void setSupportsExecuteWithInputAndOutputRecord(boolean supportsExecuteWithInAndOut)
096        {
097            this.supportsExecuteWithInAndOut = supportsExecuteWithInAndOut;
098        }
099    
100        public void setSupportsExecuteWithInputRecordOnly(boolean supportsExecuteWithInOnly)
101        {
102            this.supportsExecuteWithInOnly = supportsExecuteWithInOnly;
103        }
104    
105        public void setSupportsLocalTransactionDemarcation(boolean supportsLocalTransactionDemarcation)
106        {
107            this.supportsLocalTransactionDemarcation = supportsLocalTransactionDemarcation;
108        }
109    }