From: Sanjay Dalal Date: Thu, 26 Nov 2009 00:37:25 +0000 (+0000) Subject: NOJIRA renamed AnchorName to ScreenName X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=7245cf931c93836a9b0abf9c3edb209b0e417f88;p=tmp%2Fjakarta-migration.git NOJIRA renamed AnchorName to ScreenName test: mvn test on account service M services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountDocumentHandler.java M services/account/jaxb/src/main/resources/accounts_common.xsd M services/account/client/src/test/java/org/collectionspace/services/client/test/AccountTest.java M services/account/client/src/test/java/org/collectionspace/services/client/test/AccountServiceTest.java M services/account/client/src/main/resources/db/mysql/account.sql M services/account/client/pom.xml --- diff --git a/services/account/client/pom.xml b/services/account/client/pom.xml index eb2b3786e..3f6da54f1 100644 --- a/services/account/client/pom.xml +++ b/services/account/client/pom.xml @@ -127,6 +127,7 @@ 2.2 + process-test-resources hbm2ddl @@ -161,6 +162,7 @@ maven-antrun-plugin + process-test-resources diff --git a/services/account/client/src/main/resources/db/mysql/account.sql b/services/account/client/src/main/resources/db/mysql/account.sql index 4ad291461..dbecbbb4a 100644 --- a/services/account/client/src/main/resources/db/mysql/account.sql +++ b/services/account/client/src/main/resources/db/mysql/account.sql @@ -1,2 +1,2 @@ drop table if exists accounts_common; -create table accounts_common (csid varchar(255) not null, anchor_name varchar(128) not null, email longtext not null, first_name longtext not null, last_name longtext not null, mi varchar(1), mobile varchar(15), phone varchar(15), primary key (csid)); +create table accounts_common (csid varchar(255) not null, email longtext not null, first_name longtext not null, last_name longtext not null, mi varchar(1), mobile varchar(15), phone varchar(15), screen_name varchar(128) not null, primary key (csid)); diff --git a/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountServiceTest.java b/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountServiceTest.java index f009e76e1..95ec4e34f 100644 --- a/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountServiceTest.java +++ b/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountServiceTest.java @@ -215,8 +215,8 @@ public class AccountServiceTest extends AbstractServiceTest { for (AccountsCommonList.AccountListItem item : items) { logger.debug(testName + ": list-item[" + i + "] csid=" + item.getCsid()); - logger.debug(testName + ": list-item[" + i + "] anchorName=" + - item.getAnchorName()); + logger.debug(testName + ": list-item[" + i + "] screenName=" + + item.getScreenName()); logger.debug(testName + ": list-item[" + i + "] URI=" + item.getUri()); i++; @@ -406,14 +406,14 @@ public class AccountServiceTest extends AbstractServiceTest { // --------------------------------------------------------------- // Utility methods used by tests above // --------------------------------------------------------------- - private AccountsCommon createAccountInstance(String firstName, String lastName, String anchorName, + private AccountsCommon createAccountInstance(String firstName, String lastName, String screenName, String passwd, String email) { AccountsCommon account = new AccountsCommon(); account.setFirstName(firstName); account.setLastName(lastName); - account.setAnchorName(anchorName); - account.setUserName(anchorName); + account.setScreenName(screenName); + account.setUserName(screenName); byte[] b64passwd = Base64.encodeBase64(passwd.getBytes()); account.setPassword(b64passwd); account.setEmail(email); diff --git a/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountTest.java b/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountTest.java index e6b77b9f9..2e3b06cc5 100644 --- a/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountTest.java +++ b/services/account/client/src/test/java/org/collectionspace/services/client/test/AccountTest.java @@ -56,7 +56,7 @@ public class AccountTest { @Test(dataProvider = "testName", dataProviderClass = AccountTest.class) public void create(String testName) throws Exception { AccountsCommon account = new AccountsCommon(); - account.setAnchorName("john"); + account.setScreenName("john"); account.setFirstName("John"); account.setLastName("Doe"); account.setEmail("john.doe@berkeley.edu"); @@ -85,9 +85,9 @@ public class AccountTest { } } - private AccountsCommon findAccount(String anchorName) throws Exception { - Query q = em.createQuery("select a from org.collectionspace.services.account.AccountsCommon a where a.anchorName = :anchorname"); - q.setParameter("anchorname", anchorName); + private AccountsCommon findAccount(String screenName) throws Exception { + Query q = em.createQuery("select a from org.collectionspace.services.account.AccountsCommon a where a.screenName = :screenname"); + q.setParameter("screenname", screenName); return (AccountsCommon) q.getSingleResult(); } diff --git a/services/account/jaxb/src/main/resources/accounts_common.xsd b/services/account/jaxb/src/main/resources/accounts_common.xsd index 8eca84f96..4c8914f7c 100644 --- a/services/account/jaxb/src/main/resources/accounts_common.xsd +++ b/services/account/jaxb/src/main/resources/accounts_common.xsd @@ -40,11 +40,11 @@ - + - + @@ -148,7 +148,7 @@ - + diff --git a/services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountDocumentHandler.java b/services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountDocumentHandler.java index a42b50bbb..1273ad5b2 100644 --- a/services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountDocumentHandler.java +++ b/services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountDocumentHandler.java @@ -91,7 +91,7 @@ public class AccountDocumentHandler for (Object obj : wrapDoc.getWrappedObject()) { AccountsCommon account = (AccountsCommon) obj; AccountListItem accListItem = new AccountListItem(); - accListItem.setAnchorName(account.getAnchorName()); + accListItem.setScreenName(account.getScreenName()); accListItem.setEmail(account.getEmail()); accListItem.setFirstName(account.getFirstName()); accListItem.setLastName(account.getLastName());