has inherited from jcontacts-lib.
Signed-off-by: Roland Häder <roland@mxchange.org>
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
-<project name="jcontacts-lib" default="default" basedir=".">
- <description>Builds, tests, and runs the project jcontacts-lib.</description>
+<project name="jcontacts-business-lib" default="default" basedir=".">
+ <description>Builds, tests, and runs the project jcontacts-business-lib.</description>
<import file="nbproject/build-impl.xml"/>
<!--
An example of overriding the target for project execution could look like this:
- <target name="run" depends="jcontacts-lib-impl.jar">
+ <target name="run" depends="jcontacts-business-lib-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
- cleanup
-->
-<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="jcontacts-lib-impl">
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="jcontacts-business-lib-impl">
<fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
</fileset>
</union>
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
- <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="jcontacts-lib" testname="TestNG tests" workingDir="${work.dir}">
+ <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="jcontacts-business-lib" testname="TestNG tests" workingDir="${work.dir}">
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
<propertyset>
<propertyref prefix="test-sys-prop."/>
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
<isset property="test.method"/>
</condition>
- <condition else="-suitename jcontacts-lib -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
+ <condition else="-suitename jcontacts-business-lib -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
<matches pattern=".*\.xml" string="@{testClass}"/>
</condition>
<delete dir="${build.test.results.dir}" quiet="true"/>
<delete file="${built-jar.properties}" quiet="true"/>
</target>
<target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
- <echo level="warn" message="Cycle detected: jcontacts-lib was already built"/>
+ <echo level="warn" message="Cycle detected: jcontacts-business-lib was already built"/>
</target>
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
<mkdir dir="${build.dir}"/>
<delete file="${built-clean.properties}" quiet="true"/>
</target>
<target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
- <echo level="warn" message="Cycle detected: jcontacts-lib was already built"/>
+ <echo level="warn" message="Cycle detected: jcontacts-business-lib was already built"/>
</target>
<target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
<mkdir dir="${build.dir}"/>
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
-application.title=jcontacts-lib
+application.title=jcontacts-business-lib
application.vendor=Roland H\u00e4der
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
build.classes.dir=${build.dir}/classes
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
-dist.jar=${dist.dir}/jcontacts-lib.jar
+dist.jar=${dist.dir}/jcontacts-business-lib.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
- <name>jcontacts-lib</name>
+ <name>jcontacts-business-lib</name>
<source-roots>
<root id="src.dir"/>
</source-roots>
+++ /dev/null
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontacts.contact;
-
-import java.io.Serializable;
-import javax.ejb.Remote;
-import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
-
-/**
- * A remote interface for administrative contact purposes
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Remote
-public interface AdminContactSessionBeanRemote extends Serializable {
-
- /**
- * Deletes given contact instance
- * <p>
- * @param contact Contact instance being deleted
- */
- void deleteContactData (final Contact contact);
-
- /**
- * Adds (persists) given contact instance, if not found. If successfull, the
- * field contactId contains the running number, otherwise an exception is
- * thrown.
- *
- * @param contact Contact to be added
- * <p>
- * @return Updated contact instance
- * <p>
- * @throws org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException
- * Contact already found
- */
- Contact addContact (final Contact contact) throws ContactAlreadyAddedException;
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontacts.contact;
-
-import java.io.Serializable;
-import java.util.List;
-import javax.ejb.Remote;
-import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
-
-/**
- * A remote interface for general contact purposes
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Remote
-public interface ContactSessionBeanRemote extends Serializable {
-
- /**
- * Checks whether the given email address is already registered. The email
- * address should be validated by EmailAddressValidator before calling this
- * method.
- * <p>
- * @param emailAddress Email address to check
- * <p>
- * @return Whether the email address is already registered
- */
- boolean isEmailAddressRegistered (final String emailAddress);
-
- /**
- * Checks if the given contact can be found by checking the whole list.
- * <p>
- * @param contact Contact instance to check
- * <p>
- * @return Whether the found instance or null
- */
- Contact lookupContact (final Contact contact);
-
- /**
- * Updates given contact data
- * <p>
- * @param contact Contact data to update
- * @param isMobileUnlinked Whether a mobile entry has been unlinked in
- * contact instance
- * @param isLandlineUnlinked Whether a land-line entry has been unlinked in
- * contact instance
- * @param isFaxUnlinked Whether a fax entry has been unlinked in contact
- * instance
- * <p>
- * @return Updated contact instance
- */
- Contact updateContactData (final Contact contact, final boolean isMobileUnlinked, final boolean isLandlineUnlinked, final boolean isFaxUnlinked);
-
- /**
- * Updates given contact in database. Please note that the id number must be
- * set. This method should also make sure that mobile, land-line and fix
- * numbers are updated, too.
- * <p>
- * @param contact Contact to update
- * <p>
- * @return Updated contact instance
- */
- Contact updateContactData (final Contact contact);
-
- /**
- * Returns a list of all found contacts
- * <p>
- * @return A list of call contacts
- */
- List<Contact> getAllContacts ();
-
- /**
- * Returns a list of all registered email addresses.
- * <p>
- * @return A list of all email addresses
- */
- List<String> getEmailAddressList ();
-
- /**
- * Returns a contact instance which has the given id number.
- * <p>
- * @param contactId Contact id
- * <p>
- * @return Contact instance
- * <p>
- * @throws ContactNotFoundException If the contact was not found
- */
- Contact findContactById (final Long contactId) throws ContactNotFoundException;
-
- /**
- * Returns a contact instance which has the given email address.
- * <p>
- * @param emailAddress Email address
- * <p>
- * @return Contact instance
- * <p>
- * @throws ContactNotFoundException If the contact was not found
- */
- Contact findContactByEmailAddress (final String emailAddress) throws ContactNotFoundException;
-
-}
+++ /dev/null
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontacts.phone;
-
-import java.io.Serializable;
-import javax.ejb.Remote;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jphone.exceptions.PhoneNumberAlreadyLinkedException;
-import org.mxchange.jphone.exceptions.PhoneNumberNotLinkedException;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
-
-/**
- * A remote interface for administrative purposes around contact's phone numbers
- * (any type).
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Remote
-public interface AdminContactsPhoneSessionBeanRemote extends Serializable {
-
- /**
- * Links existing fax number with given contact instance. The id number
- * should be set.
- * <p>
- * @param contact Contact to link to
- * @param faxNumber Fax number to link
- * <p>
- * @return Updated contact
- * <p>
- * @throws PhoneNumberAlreadyLinkedException If a fax number is already
- * linked in contact
- */
- Contact linkExistingFaxNumberWithContact (final Contact contact, final DialableFaxNumber faxNumber) throws PhoneNumberAlreadyLinkedException;
-
- /**
- * Links existing land-line number with given contact instance. The id
- * number should be set.
- * <p>
- * @param contact Contact to link to
- * @param landLineNumber Land-line number to link
- * <p>
- * @return Updated contact
- * <p>
- * @throws PhoneNumberAlreadyLinkedException If a land-line number is
- * already linked in contact
- */
- Contact linkExistingLandLineNumberWithContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws PhoneNumberAlreadyLinkedException;
-
- /**
- * Links existing mobile number with given contact instance. The id number
- * should be set.
- * <p>
- * @param contact Contact to link to
- * @param mobileNumber Mobile number to link
- * <p>
- * @return Updated contact
- * <p>
- * @throws PhoneNumberAlreadyLinkedException If a mobile number is already
- * linked in contact
- */
- Contact linkExistingMobileNumberWithContact (final Contact contact, final DialableMobileNumber mobileNumber) throws PhoneNumberAlreadyLinkedException;
-
- /**
- * Links new fax number with given contact instance. The id number should
- * NOT be set.
- * <p>
- * @param contact Contact to link to
- * @param faxNumber Fax number to link
- * <p>
- * @return Updated contact
- * <p>
- * @throws PhoneNumberAlreadyLinkedException If a fax number is already
- * linked in contact
- */
- Contact linkNewFaxNumberWithContact (final Contact contact, final DialableFaxNumber faxNumber) throws PhoneNumberAlreadyLinkedException;
-
- /**
- * Links new land-line number with given contact instance. The id number
- * should NOT be set.
- * <p>
- * @param contact Contact to link to
- * @param landLineNumber Land-line number to link
- * <p>
- * @return Updated contact
- * <p>
- * @throws PhoneNumberAlreadyLinkedException If a land-line number is
- * already linked in contact
- */
- Contact linkNewLandLineNumberWithContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws PhoneNumberAlreadyLinkedException;
-
- /**
- * Links new mobile number with given contact instance. The id number should
- * NOT be set.
- * <p>
- * @param contact Contact to link to
- * @param mobileNumber Mobile number to link
- * <p>
- * @return Updated contact
- * <p>
- * @throws PhoneNumberAlreadyLinkedException If a mobile number is already
- * linked in contact
- */
- Contact linkNewMobileNumberWithContact (final Contact contact, final DialableMobileNumber mobileNumber) throws PhoneNumberAlreadyLinkedException;
-
- /**
- * Unlinks fax data from given contact and returns the updated (managed)
- * version.
- * <p>
- * @param contact Contact to unlink mobile instance
- * @param faxNumber Fax number being unlinked
- * <p>
- * @return Updated contact instance
- * <p>
- * @throws PhoneNumberNotLinkedException If a mobile instance is not linked
- * (null) with this contact
- */
- Contact unlinkFaxDataFromContact (final Contact contact, final DialableFaxNumber faxNumber) throws PhoneNumberNotLinkedException;
-
- /**
- * Unlinks land-line data from given contact and returns the updated
- * (managed) version.
- * <p>
- * @param contact Contact to unlink mobile instance
- * @param landLineNumber Land-line number being unlinked
- * <p>
- * @return Updated contact instance
- * <p>
- * @throws PhoneNumberNotLinkedException If a mobile instance is not linked
- * (null) with this contact
- */
- Contact unlinkLandLineDataFromContact (final Contact contact, final DialableLandLineNumber landLineNumber) throws PhoneNumberNotLinkedException;
-
- /**
- * Unlinks mobile data from given contact and returns the updated (managed)
- * version.
- * <p>
- * @param contact Contact to unlink mobile instance
- * @param mobileNumber Mobile number being unlinked
- * <p>
- * @return Updated contact instance
- * <p>
- * @throws PhoneNumberNotLinkedException If a mobile instance is not linked
- * (null) with this contact
- */
- Contact unlinkMobileDataFromContact (final Contact contact, final DialableMobileNumber mobileNumber) throws PhoneNumberNotLinkedException;
-
-}
--- /dev/null
+/*
+ * Copyright (C) 2017 Roland Haeder<roland@mxchange.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness;
+
+import java.io.Serializable;
+import java.util.List;
+import javax.ejb.Remote;
+
+/**
+ * A remote interface for business contact data
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Remote
+public interface BusinessContactSessionBeanRemote extends Serializable {
+
+ /**
+ * Returns a list, even empty if not thing found, from all business
+ * contacts. NULL should not be returned by this method.
+ * <p>
+ * @return A list with all business contacts
+ */
+ List<BusinessContact> allBusinessContacts ();
+
+}