OW2 Consortium elastic-grid

Rev

Rev 205 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 205 Rev 456
Line 1... Line 1...
1
/**
1
/**
2
 * Elastic Grid
-
 
3
 * Copyright (C) 2008-2009 Elastic Grid, LLC.
-
 
4
 * 
-
 
5
 * This program is free software: you can redistribute it and/or modify
-
 
6
 * it under the terms of the GNU Affero General Public License as
-
 
7
 * published by the Free Software Foundation, either version 3 of the
-
 
8
 * License, or (at your option) any later version.
-
 
9
 * 
-
 
10
 * This program is distributed in the hope that it will be useful,
-
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
-
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-
 
13
 * GNU Affero General Public License for more details.
-
 
14
 * 
-
 
15
 * You should have received a copy of the GNU Affero General Public License
-
 
-
 
2
 * Elastic Grid
-
 
3
 * Copyright (C) 2008-2009 Elastic Grid, LLC.
-
 
4
 * 
-
 
5
 * This program is free software: you can redistribute it and/or modify
-
 
6
 * it under the terms of the GNU Affero General Public License as
-
 
7
 * published by the Free Software Foundation, either version 3 of the
-
 
8
 * License, or (at your option) any later version.
-
 
9
 * 
-
 
10
 * This program is distributed in the hope that it will be useful,
-
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
-
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-
 
13
 * GNU Affero General Public License for more details.
-
 
14
 * 
-
 
15
 * You should have received a copy of the GNU Affero General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
17
 */
18

18

19
package com.elasticgrid.amazon.sdb.impl;
19
package com.elasticgrid.amazon.sdb.impl;
20

20

Line 22... Line 22...
22
import com.elasticgrid.amazon.sdb.Domain;
22
import com.elasticgrid.amazon.sdb.Domain;
23
import com.elasticgrid.amazon.sdb.SimpleDBException;
23
import com.elasticgrid.amazon.sdb.SimpleDBException;
24
import com.xerox.amazonws.sdb.SDBException;
24
import com.xerox.amazonws.sdb.SDBException;
25
import com.xerox.amazonws.sdb.ListDomainsResult;
25
import com.xerox.amazonws.sdb.ListDomainsResult;
26
import org.springframework.beans.factory.InitializingBean;
26
import org.springframework.beans.factory.InitializingBean;
27
import org.springframework.beans.factory.annotation.Required;
-
 
28
import org.springframework.stereotype.Service;
-
 
29

-
 
30
import java.util.logging.Logger;
27
import java.util.logging.Logger;
31
import java.util.logging.Level;
28
import java.util.logging.Level;
32
import java.util.List;
29
import java.util.List;
33
import java.util.ArrayList;
30
import java.util.ArrayList;
34

31

35
@Service
-
 
36
public class SimpleDBImpl implements SimpleDB, InitializingBean {
32
public class SimpleDBImpl implements SimpleDB, InitializingBean {
37
    private com.xerox.amazonws.sdb.SimpleDB sdb;
33
    private com.xerox.amazonws.sdb.SimpleDB sdb;
38
    private String awsAccessID, awsSecretKey;
34
    private String awsAccessID, awsSecretKey;
39
    private static final Logger logger = Logger.getLogger(SimpleDB.class.getName());
35
    private static final Logger logger = Logger.getLogger(SimpleDB.class.getName());
40

36

Line 78... Line 74...
78
        } catch (SDBException e) {
74
        } catch (SDBException e) {
79
            throw new SimpleDBException("Can't list domains", e);
75
            throw new SimpleDBException("Can't list domains", e);
80
        }
76
        }
81
    }
77
    }
82

78

83
    @Required
-
 
84
    public void setAwsAccessID(String awsAccessID) {
79
    public void setAwsAccessID(String awsAccessID) {
85
        this.awsAccessID = awsAccessID;
80
        this.awsAccessID = awsAccessID;
86
    }
81
    }
87

82

88
    @Required
-
 
89
    public void setAwsSecretKey(String awsSecretKey) {
83
    public void setAwsSecretKey(String awsSecretKey) {
90
        this.awsSecretKey = awsSecretKey;
84
        this.awsSecretKey = awsSecretKey;
91
    }
85
    }
92

86

93
    public void afterPropertiesSet() throws Exception {
87
    public void afterPropertiesSet() throws Exception {