asterisk-java-cvs Mailing List for Asterisk-Java Library (Page 96)
Brought to you by:
srt
You can subscribe to this list here.
2005 |
Jan
(4) |
Feb
(75) |
Mar
(211) |
Apr
(70) |
May
(12) |
Jun
(7) |
Jul
(96) |
Aug
(90) |
Sep
(11) |
Oct
(42) |
Nov
(45) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
|
Sep
(4) |
Oct
(2) |
Nov
(10) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(3) |
Aug
(73) |
Sep
(13) |
Oct
(4) |
Nov
(1) |
Dec
(7) |
2009 |
Jan
(1) |
Feb
(2) |
Mar
(48) |
Apr
(21) |
May
(14) |
Jun
(11) |
Jul
(9) |
Aug
(2) |
Sep
(11) |
Oct
(14) |
Nov
(6) |
Dec
(4) |
2010 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
|
May
(3) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(12) |
2011 |
Jan
(1) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(10) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
2012 |
Jan
(3) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
(2) |
Dec
(2) |
2013 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(25) |
May
(10) |
Jun
(4) |
Jul
(7) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
2016 |
Jan
|
Feb
(42) |
Mar
(6) |
Apr
(15) |
May
(3) |
Jun
(1) |
Jul
(11) |
Aug
|
Sep
|
Oct
(17) |
Nov
(2) |
Dec
|
2017 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
(3) |
Jul
(7) |
Aug
(11) |
Sep
(5) |
Oct
(7) |
Nov
(4) |
Dec
(4) |
2018 |
Jan
(11) |
Feb
(11) |
Mar
(3) |
Apr
|
May
(9) |
Jun
(6) |
Jul
(17) |
Aug
(9) |
Sep
(2) |
Oct
(4) |
Nov
(3) |
Dec
(3) |
2019 |
Jan
(13) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(5) |
Jun
|
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2020 |
Jan
(2) |
Feb
(72) |
Mar
(8) |
Apr
(11) |
May
(12) |
Jun
(3) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(4) |
Nov
|
Dec
(9) |
2021 |
Jan
|
Feb
(31) |
Mar
(6) |
Apr
(3) |
May
|
Jun
(2) |
Jul
|
Aug
(2) |
Sep
|
Oct
(9) |
Nov
|
Dec
(32) |
2022 |
Jan
(5) |
Feb
(7) |
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(2) |
Oct
(111) |
Nov
(105) |
Dec
(26) |
2023 |
Jan
(25) |
Feb
(6) |
Mar
(10) |
Apr
(54) |
May
(41) |
Jun
(24) |
Jul
(6) |
Aug
(11) |
Sep
(9) |
Oct
(8) |
Nov
(55) |
Dec
(34) |
2024 |
Jan
(6) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(89) |
Sep
(48) |
Oct
(31) |
Nov
(9) |
Dec
(19) |
2025 |
Jan
(12) |
Feb
(18) |
Mar
(9) |
Apr
(7) |
May
|
Jun
(7) |
Jul
(7) |
Aug
(3) |
Sep
(22) |
Oct
(2) |
Nov
|
Dec
|
From: Stefan R. <sr...@us...> - 2005-03-01 19:28:49
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26804/src/java/net/sf/asterisk/manager/action Modified Files: MailboxStatusAction.java Log Message: Fixed comment for mailbox attribute Index: MailboxStatusAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/MailboxStatusAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- MailboxStatusAction.java 23 Feb 2005 22:50:58 -0000 1.2 +++ MailboxStatusAction.java 1 Mar 2005 19:28:17 -0000 1.3 @@ -52,7 +52,7 @@ public class MailboxStatusAction extends /** * Sets the name of the mailbox to query.<br> - * This can either be only the number of the mailbox or a string of the form + * This can either be only the name of the mailbox or a string of the form * mailboxnumber@context. If no context is specified "default" is assumed.<br> * Multiple mailboxes may be given, separated by ','. In this case the action checks whether at * least one of the given mailboxes has waiting messages.<br> |
From: Stefan R. <sr...@us...> - 2005-03-01 19:27:25
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26470/src/java/net/sf/asterisk/manager/response Modified Files: MailboxStatusResponse.java Log Message: Changed type of waiting to Boolean Index: MailboxStatusResponse.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/response/MailboxStatusResponse.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- MailboxStatusResponse.java 23 Feb 2005 22:50:58 -0000 1.2 +++ MailboxStatusResponse.java 1 Mar 2005 19:27:00 -0000 1.3 @@ -17,8 +17,8 @@ package net.sf.asterisk.manager.response; /** - * A MailboxStatusResponse is sent in response to a MailboxStatusAction and indicates if a mailbox - * contains waiting messages. + * A MailboxStatusResponse is sent in response to a MailboxStatusAction and indicates if a set + * of mailboxes contains waiting messages. * * @see net.sf.asterisk.manager.action.MailboxStatusAction * @@ -31,11 +31,20 @@ public class MailboxStatusResponse exten * Serial version identifier */ private static final long serialVersionUID = -7193581424292429279L; + + /** + * The name of the mailbox. + */ private String mailbox; - private Integer waiting; + + /** + * Indicates if there are new messages waiting in the given set of mailboxes. + */ + private Boolean waiting; /** - * Returns the name of the mailbox. + * Returns the names of the mailboxes, separated by ",". + * @return the names of the mailbox. */ public String getMailbox() { @@ -43,7 +52,8 @@ public class MailboxStatusResponse exten } /** - * Sets the name of the mailbox. + * Sets the names of the mailboxes. + * @param mailbox the names of the mailboxes. */ public void setMailbox(String mailbox) { @@ -51,17 +61,19 @@ public class MailboxStatusResponse exten } /** - * Returns 1 if the mailbox has waiting messages; 0 otherwise. + * Returns Boolean.TRUE if at least one of the given mailboxes contains new messages; + * Boolean.FALSE otherwise. */ - public Integer getWaiting() + public Boolean getWaiting() { return waiting; } /** - * Set to 1 if the mailbox has waiting messages; 0 otherwise. + * Set to Boolean.TRUE if at least one of the mailboxes contains new messages; + * Boolean.FALSE otherwise. */ - public void setWaiting(Integer waiting) + public void setWaiting(Boolean waiting) { this.waiting = waiting; } |
From: Stefan R. <sr...@us...> - 2005-03-01 19:26:00
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26211/src/test/net/sf/asterisk/manager Added Files: ResponseBuilderTest.java Log Message: Extracted response building into a separte class --- NEW FILE: ResponseBuilderTest.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.manager; import java.util.HashMap; import java.util.Map; import net.sf.asterisk.manager.response.ChallengeResponse; import net.sf.asterisk.manager.response.ExtensionStateResponse; import net.sf.asterisk.manager.response.MailboxCountResponse; import net.sf.asterisk.manager.response.MailboxStatusResponse; import net.sf.asterisk.manager.response.ManagerError; import net.sf.asterisk.manager.response.ManagerResponse; import junit.framework.TestCase; public class ResponseBuilderTest extends TestCase { private ResponseBuilder responseBuilder; private Map attributes; public void setUp() { this.responseBuilder = new ResponseBuilder(); this.attributes = new HashMap(); } public void testBuildResponse() { ManagerResponse response; attributes.put("response", "Success"); response = responseBuilder.buildResponse(attributes); assertEquals("Response of wrong type", ManagerResponse.class, response.getClass()); assertEquals("Response not set correctly", "Success", response.getResponse()); } public void testBuildError() { ManagerResponse response; attributes.put("response", "Error"); attributes.put("message", "Missing action in request"); response = responseBuilder.buildResponse(attributes); assertEquals("Response of wrong type", ManagerError.class, response.getClass()); assertEquals("Message not set correctly", "Missing action in request", response.getMessage()); } public void testBuildErrorWithActionId() { ManagerResponse response; attributes.put("response", "Error"); attributes.put("actionid", "1234"); attributes.put("message", "Missing action in request"); response = responseBuilder.buildResponse(attributes); assertEquals("ActionId not set correctly", "1234", response.getActionId()); } public void testBuildChallengeResponse() { ManagerResponse response; attributes.put("response", "Success"); attributes.put("challenge", "131494410"); response = responseBuilder.buildResponse(attributes); assertEquals("Response of wrong type", ChallengeResponse.class, response.getClass()); assertEquals("Challenge not set correctly", "131494410", ((ChallengeResponse) response).getChallenge()); } public void testBuildMailboxStatusResponse() { ManagerResponse response; attributes.put("response", "Success"); attributes.put("message", "Mailbox Status"); attributes.put("mailbox", "123"); attributes.put("waiting", "1"); response = responseBuilder.buildResponse(attributes); assertEquals("Response of wrong type", MailboxStatusResponse.class, response.getClass()); MailboxStatusResponse mailboxStatusResponse = (MailboxStatusResponse) response; assertEquals("Mailbox not set correctly", "123", mailboxStatusResponse.getMailbox()); assertEquals("Waiting not set correctly", Boolean.TRUE, mailboxStatusResponse.getWaiting()); } public void testBuildMailboxStatusResponseWithNoWaiting() { ManagerResponse response; attributes.put("response", "Success"); attributes.put("message", "Mailbox Status"); attributes.put("mailbox", "123,user2"); attributes.put("waiting", "0"); response = responseBuilder.buildResponse(attributes); assertEquals("Response of wrong type", MailboxStatusResponse.class, response.getClass()); MailboxStatusResponse mailboxStatusResponse = (MailboxStatusResponse) response; assertEquals("Mailbox not set correctly", "123,user2", mailboxStatusResponse.getMailbox()); assertEquals("Waiting not set correctly", Boolean.FALSE, mailboxStatusResponse.getWaiting()); } public void testBuildMailboxCountResponse() { ManagerResponse response; attributes.put("response", "Success"); attributes.put("message", "Mailbox Message Count"); attributes.put("mailbox", "123@myctx"); attributes.put("newmessages", "2"); attributes.put("oldmessages", "5"); response = responseBuilder.buildResponse(attributes); assertEquals("Response of wrong type", MailboxCountResponse.class, response.getClass()); MailboxCountResponse mailboxCountResponse = (MailboxCountResponse) response; assertEquals("Mailbox not set correctly", "123@myctx", mailboxCountResponse.getMailbox()); assertEquals("New messages not set correctly", new Integer(2), mailboxCountResponse.getNewMessages()); assertEquals("Old messages set correctly", new Integer(5), mailboxCountResponse.getOldMessages()); } public void testBuildExtensionStateResponse() { ManagerResponse response; attributes.put("response", "Success"); attributes.put("message", "Extension Status"); attributes.put("exten", "1"); attributes.put("context", "default"); attributes.put("hint", ""); attributes.put("status", "-1"); response = responseBuilder.buildResponse(attributes); assertEquals("Response of wrong type", ExtensionStateResponse.class, response.getClass()); ExtensionStateResponse extensionStateResponse = (ExtensionStateResponse) response; assertEquals("Exten not set correctly", "1", extensionStateResponse.getExten()); assertEquals("Context not set correctly", "default", extensionStateResponse.getContext()); assertEquals("Hint not set correctly", "", extensionStateResponse.getHint()); assertEquals("Status not set correctly", new Integer(-1), extensionStateResponse.getStatus()); } } |
From: Stefan R. <sr...@us...> - 2005-03-01 19:25:59
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26211/src/java/net/sf/asterisk/manager Modified Files: ManagerReader.java Added Files: ResponseBuilder.java Log Message: Extracted response building into a separte class --- NEW FILE: ResponseBuilder.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.manager; import java.util.Map; import net.sf.asterisk.manager.response.ChallengeResponse; import net.sf.asterisk.manager.response.ExtensionStateResponse; import net.sf.asterisk.manager.response.MailboxCountResponse; import net.sf.asterisk.manager.response.MailboxStatusResponse; import net.sf.asterisk.manager.response.ManagerError; import net.sf.asterisk.manager.response.ManagerResponse; /** * Transforms maps of attributes to instances of ManagerResponse. * * @see net.sf.asterisk.manager.response.ManagerResponse * @author srt * @version $Id: ResponseBuilder.java,v 1.1 2005/03/01 19:25:35 srt Exp $ */ public class ResponseBuilder { /** * Constructs an instance of ManagerResponse based on a map of attributes. * * @param attributes the attributes and their values. The keys of this map must be all lower * case. * @return the response with the given attributes. */ public ManagerResponse buildResponse(final Map attributes) { ManagerResponse response; String responseType; responseType = (String) attributes.get("response"); // determine type if ("error".equalsIgnoreCase(responseType)) { response = new ManagerError(); } else if (attributes.containsKey("challenge")) { ChallengeResponse challengeResponse = new ChallengeResponse(); challengeResponse.setChallenge((String) attributes.get("challenge")); response = challengeResponse; } else if (attributes.containsKey("mailbox") && attributes.containsKey("waiting")) { MailboxStatusResponse mailboxStatusResponse = new MailboxStatusResponse(); mailboxStatusResponse.setMailbox((String) attributes.get("mailbox")); if ("1".equals((String) attributes.get("waiting"))) { mailboxStatusResponse.setWaiting(Boolean.TRUE); } else { mailboxStatusResponse.setWaiting(Boolean.FALSE); } response = mailboxStatusResponse; } else if (attributes.containsKey("mailbox") && attributes.containsKey("newmessages") && attributes.containsKey("oldmessages")) { MailboxCountResponse mailboxCountResponse = new MailboxCountResponse(); mailboxCountResponse.setMailbox((String) attributes.get("mailbox")); mailboxCountResponse.setNewMessages(new Integer((String) attributes.get("newmessages"))); mailboxCountResponse.setOldMessages(new Integer((String) attributes.get("oldmessages"))); response = mailboxCountResponse; } else if (attributes.containsKey("exten") && attributes.containsKey("context") && attributes.containsKey("hint") && attributes.containsKey("status")) { ExtensionStateResponse extensionStateResponse = new ExtensionStateResponse(); extensionStateResponse.setExten((String) attributes.get("exten")); extensionStateResponse.setContext((String) attributes.get("context")); extensionStateResponse.setHint((String) attributes.get("hint")); extensionStateResponse.setStatus(new Integer((String) attributes.get("status"))); response = extensionStateResponse; } else { response = new ManagerResponse(); } // fill known attributes response.setResponse(responseType); if (attributes.containsKey("actionid")) { response.setActionId((String) attributes.get("actionid")); } if (attributes.containsKey("message")) { response.setMessage((String) attributes.get("message")); } if (attributes.containsKey("uniqueid")) { response.setUniqueId((String) attributes.get("uniqueid")); } return response; } } Index: ManagerReader.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerReader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- ManagerReader.java 28 Feb 2005 16:45:44 -0000 1.3 +++ ManagerReader.java 1 Mar 2005 19:25:35 -0000 1.4 @@ -25,12 +25,7 @@ import java.util.List; import java.util.Map; import net.sf.asterisk.manager.event.ManagerEvent; -import net.sf.asterisk.manager.response.ChallengeResponse; import net.sf.asterisk.manager.response.CommandResponse; -import net.sf.asterisk.manager.response.ExtensionStateResponse; -import net.sf.asterisk.manager.response.MailboxCountResponse; -import net.sf.asterisk.manager.response.MailboxStatusResponse; -import net.sf.asterisk.manager.response.ManagerError; import net.sf.asterisk.manager.response.ManagerResponse; import org.apache.commons.logging.Log; @@ -54,13 +49,19 @@ class ManagerReader extends Thread private Log log = LogFactory.getLog(getClass()); private static int threadCount = 0; - + /** - * The event builder utility to convert a map of attributes reveived from asterisk - * to instances of registered event classes. + * The event builder utility to convert a map of attributes reveived from asterisk to instances + * of registered event classes. */ private EventBuilder eventBuilder; - + + /** + * The response builder utility to convert a map of attributes reveived from asterisk to instances + * of well known response classes. + */ + private ResponseBuilder responseBuilder; + /** * If set to <code>true</code>, terminates and closes the reader. */ @@ -77,6 +78,7 @@ class ManagerReader extends Thread this.reader = reader; this.eventBuilder = new EventBuilder(); + this.responseBuilder = new ResponseBuilder(); } /** @@ -120,7 +122,6 @@ class ManagerReader extends Thread commandResponse.setDateReceived(new Date()); commandResponse.setResult(commandResult); connection.dispatchResponse(commandResponse); - commandResult = new ArrayList(); processingCommandResult = false; } else @@ -129,9 +130,14 @@ class ManagerReader extends Thread } continue; } + + // Reponse: Follows indicates that the output starting on the next line until + // --END COMMAND-- must be treated as raw output of a command executed by a + // CommandAction. if ("Response: Follows".equalsIgnoreCase(line)) { processingCommandResult = true; + commandResult.clear(); continue; } @@ -183,6 +189,7 @@ class ManagerReader extends Thread } } } + connection.handleDisconnection(); } catch (IOException e) @@ -211,68 +218,14 @@ class ManagerReader extends Thread private ManagerResponse buildResponse(Map buffer) { ManagerResponse response; - String responseType = (String) buffer.get("response"); - // determine type - if ("error".equals(responseType)) - { - response = new ManagerError(); - } - else if (buffer.containsKey("challenge")) - { - ChallengeResponse challengeResponse = new ChallengeResponse(); - challengeResponse.setChallenge((String) buffer.get("challenge")); - response = challengeResponse; - } - else if (buffer.containsKey("mailbox") && buffer.containsKey("waiting")) - { - MailboxStatusResponse mailboxStatusResponse = new MailboxStatusResponse(); - mailboxStatusResponse.setMailbox((String) buffer.get("mailbox")); - mailboxStatusResponse.setWaiting(new Integer((String) buffer.get("mailbox"))); - response = mailboxStatusResponse; - } - else if (buffer.containsKey("mailbox") && buffer.containsKey("newmessages") - && buffer.containsKey("oldmessages")) - { - MailboxCountResponse mailboxCountResponse = new MailboxCountResponse(); - mailboxCountResponse.setMailbox((String) buffer.get("mailbox")); - mailboxCountResponse.setNewMessages(new Integer((String) buffer.get("newmessages"))); - mailboxCountResponse.setOldMessages(new Integer((String) buffer.get("oldmessages"))); - response = mailboxCountResponse; - } - else if (buffer.containsKey("exten") && buffer.containsKey("context") && buffer.containsKey("hint") - && buffer.containsKey("status")) - { - ExtensionStateResponse extensionStateResponse = new ExtensionStateResponse(); - extensionStateResponse.setExten((String) buffer.get("exten")); - extensionStateResponse.setContext((String) buffer.get("context")); - extensionStateResponse.setHint((String) buffer.get("hint")); - extensionStateResponse.setStatus(new Integer((String) buffer.get("status"))); - response = extensionStateResponse; - } - else - { - response = new ManagerResponse(); - } - - // fill known attributes - response.setResponse(responseType); + response = responseBuilder.buildResponse(buffer); - if (buffer.containsKey("actionid")) - { - response.setActionId((String) buffer.get("actionid")); - } - if (buffer.containsKey("message")) - { - response.setMessage((String) buffer.get("message")); - } - if (buffer.containsKey("uniqueid")) + if (response != null) { - response.setUniqueId((String) buffer.get("uniqueid")); + response.setDateReceived(new Date()); } - response.setDateReceived(new Date()); - return response; } @@ -280,7 +233,7 @@ class ManagerReader extends Thread { ManagerEvent event; - event = this.eventBuilder.buildEvent(source, buffer); + event = eventBuilder.buildEvent(source, buffer); if (event != null) { |
From: Stefan R. <sr...@us...> - 2005-03-01 19:25:10
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25921/src/java/net/sf/asterisk/manager Modified Files: EventBuilder.java Log Message: Added javadoc Simplified exception handling Index: EventBuilder.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/EventBuilder.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- EventBuilder.java 26 Feb 2005 20:14:17 -0000 1.3 +++ EventBuilder.java 1 Mar 2005 19:24:35 -0000 1.4 @@ -17,7 +17,6 @@ package net.sf.asterisk.manager; import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.HashMap; @@ -69,6 +68,9 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** + * Transforms maps of attributes to instances of ManagerEvent. + * + * @see net.sf.asterisk.manager.event.ManagerEvent * @author srt * @version $Id$ */ @@ -223,17 +225,7 @@ public class EventBuilder { event = (ManagerEvent) constructor.newInstance(new Object[]{source}); } - catch (InstantiationException ex) - { - logger.error("Unable to create new instance of " + eventClass, ex); - return null; - } - catch (IllegalAccessException ex) - { - logger.error("Unable to create new instance of " + eventClass, ex); - return null; - } - catch (InvocationTargetException ex) + catch (Exception ex) { logger.error("Unable to create new instance of " + eventClass, ex); return null; |
From: Stefan R. <sr...@us...> - 2005-02-28 16:45:53
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30279/src/java/net/sf/asterisk/manager Modified Files: ManagerReader.java Log Message: Index: ManagerReader.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ManagerReader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- ManagerReader.java 23 Feb 2005 22:50:57 -0000 1.2 +++ ManagerReader.java 28 Feb 2005 16:45:44 -0000 1.3 @@ -54,7 +54,16 @@ class ManagerReader extends Thread private Log log = LogFactory.getLog(getClass()); private static int threadCount = 0; + + /** + * The event builder utility to convert a map of attributes reveived from asterisk + * to instances of registered event classes. + */ private EventBuilder eventBuilder; + + /** + * If set to <code>true</code>, terminates and closes the reader. + */ private boolean die = false; private BufferedReader reader; private DefaultManagerConnection connection; |
From: Stefan R. <sr...@us...> - 2005-02-27 23:49:45
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9347 Modified Files: project.xml Log Message: Added reports Added URLs for dependencies Removed unused resources Index: project.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -p -r1.5 -r1.6 --- project.xml 24 Feb 2005 22:28:04 -0000 1.5 +++ project.xml 27 Feb 2005 23:49:36 -0000 1.6 @@ -9,9 +9,25 @@ <url>http://www.apache.org/licenses/LICENSE-2.0</url> </license> </licenses> + <reports> + <report>maven-clover-plugin</report> + <report>maven-jdepend-plugin</report> + <report>maven-junit-report-plugin</report> + <report>maven-license-plugin</report> + <report>maven-linkcheck-plugin</report> + <report>maven-statcvs-plugin</report> + <report>maven-jxr-plugin</report> + <report>maven-changelog-plugin</report> + <report>maven-changes-plugin</report> + <report>maven-developer-activity-plugin</report> + <report>maven-file-activity-plugin</report> + <report>maven-javadoc-plugin</report> + <report>maven-checkstyle-plugin</report> + <report>maven-pmd-plugin</report> + </reports> <id>asterisk-java</id> <name>asterisk-java</name> - <currentVersion>0.1-dev</currentVersion> + <currentVersion>0.1-SNAPSHOT</currentVersion> <organization> <name>Stefan Reuter</name> <url>http://sourceforge.net/projects/asterisk-java/</url> @@ -34,7 +50,7 @@ <distributionDirectory>/home/groups/a/as/asterisk-java/htdocs/maven</distributionDirectory> <repository> <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/asterisk-java:asterisk-java</connection> - <developerConnection>scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/asterisk-java:acegisecurity</developerConnection> + <developerConnection>scm:cvs:ext:${maven.username}@cvs1.sourceforge.net:/cvsroot/asterisk-java:asterisk-java</developerConnection> <url>http://cvs.sourceforge.net/viewcvs.py/asterisk-java/asterisk-java/</url> </repository> <versions> @@ -80,46 +96,20 @@ </developers> <dependencies> <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.8</version> - <type>jar</type> - <properties> - <dependencyType>lib</dependencyType> - </properties> - </dependency> - <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.0.3</version> <type>jar</type> + <url>http://jakarta.apache.org/commons/logging/</url> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.0</version> - <jar>/home/srt/workspace/asterisk-java/lib/commons-lang-2.0.jar</jar> + <jar>lib/commons-lang-2.0.jar</jar> <type>jar</type> + <url>http://jakarta.apache.org/commons/lang/</url> </dependency> - <!-- - <dependency> - <groupId>bcel</groupId> - <artifactId>bcel</artifactId> - <version>5.0</version> - <url>http://jakarta.apache.org/bcel/</url> - </dependency> - - . - . - . - - <dependency> - <groupId>regexp</groupId> - <artifactId>regexp</artifactId> - <version>1.2</version> - <url>http://jakarta.apache.org/regexp/</url> - </dependency> ---> </dependencies> <build> <nagEmailAddress>sr...@re...</nagEmailAddress> @@ -134,24 +124,6 @@ <exclude>**/RepositoryTest.java</exclude> </excludes> </unitTest> - <!-- J A R R E S O U R C E S --> - <!-- Resources that are packaged up inside the JAR file --> - <resources> - <resource> - <directory>${basedir}/src/resources/misc</directory> - <includes> - <include>*.xsd</include> - </includes> - <filtering>false</filtering> - </resource> - <resource> - <directory>${basedir}/src/resources/logging</directory> - <includes> - <include>log4j.properties</include> - </includes> - <filtering>false</filtering> - </resource> - </resources> </build> </project> |
From: Stefan R. <sr...@us...> - 2005-02-27 15:20:03
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21623/src/java/net/sf/asterisk/manager/event Modified Files: AgentLogoffEvent.java Log Message: Removed unused attributes loginChan and reason Index: AgentLogoffEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AgentLogoffEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AgentLogoffEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ AgentLogoffEvent.java 27 Feb 2005 15:19:54 -0000 1.3 @@ -31,10 +31,12 @@ public class AgentLogoffEvent extends Ma * Serializable version identifier */ private static final long serialVersionUID = -3482474719161350942L; + + /** + * The name of the agent that logged off. + */ private String agent; - private String loginChan; private String loginTime; - private String reason; private String uniqueId; /** @@ -47,6 +49,8 @@ public class AgentLogoffEvent extends Ma /** * Returns the name of the agent that logged off. + * + * @return the name of the agent that logged off. */ public String getAgent() { @@ -55,6 +59,8 @@ public class AgentLogoffEvent extends Ma /** * Sets the name of the agent that logged off. + * + * @param agent the name of the agent that logged off. */ public void setAgent(String agent) { |
From: Stefan R. <sr...@us...> - 2005-02-27 15:15:15
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20196/src/java/net/sf/asterisk/manager/event Modified Files: AlarmClearEvent.java Log Message: Removed unused attribute alarm Index: AlarmClearEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/AlarmClearEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- AlarmClearEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ AlarmClearEvent.java 27 Feb 2005 15:15:02 -0000 1.3 @@ -29,7 +29,10 @@ public class AlarmClearEvent extends Man * Serializable version identifier */ private static final long serialVersionUID = -3584791971422266558L; - private String alarm; + + /** + * The number of the zap channel that left alarm state. + */ private Integer channel; /** @@ -41,7 +44,9 @@ public class AlarmClearEvent extends Man } /** - * Returns the number of the channel that left alarm state. + * Returns the number of the zap channel that left alarm state. + * + * @return the number of the zap channel that left alarm state. */ public Integer getChannel() { @@ -49,7 +54,9 @@ public class AlarmClearEvent extends Man } /** - * Sets the number of the channel that left alarm state. + * Sets the number of the zap channel that left alarm state. + * + * @param channel the number of the zap channel that left alarm state. */ public void setChannel(Integer channel) { |
From: Stefan R. <sr...@us...> - 2005-02-27 15:12:28
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19492/src/java/net/sf/asterisk/manager/action Modified Files: QueueRemoveAction.java Log Message: Removed unued attribute penality Index: QueueRemoveAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/QueueRemoveAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- QueueRemoveAction.java 23 Feb 2005 22:50:58 -0000 1.2 +++ QueueRemoveAction.java 27 Feb 2005 15:12:16 -0000 1.3 @@ -29,12 +29,17 @@ public class QueueRemoveAction extends M * Serializable version identifier */ private static final long serialVersionUID = -4296471882045706821L; + + /** + * The name of the queue the member will be removed from. + */ private String queue; private String iface; - private Integer penality; /** * Returns the name of this action, i.e. "QueueRemove". + * + * @return the name of this action. */ public String getAction() { @@ -43,6 +48,8 @@ public class QueueRemoveAction extends M /** * Returns the name of the queue the member will be removed from. + * + * @return the name of the queue the member will be removed from. */ public String getQueue() { @@ -52,6 +59,8 @@ public class QueueRemoveAction extends M /** * Sets the name of the queue the member will be removed from.<br> * This property is mandatory. + * + * @param queue the name of the queue the member will be removed from. */ public void setQueue(String queue) { |
From: Stefan R. <sr...@us...> - 2005-02-27 15:10:14
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18972/src/java/net/sf/asterisk/manager/action Modified Files: StopMonitorAction.java Log Message: Removed unused attributes Index: StopMonitorAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/StopMonitorAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- StopMonitorAction.java 23 Feb 2005 22:50:58 -0000 1.2 +++ StopMonitorAction.java 27 Feb 2005 15:10:02 -0000 1.3 @@ -29,13 +29,16 @@ public class StopMonitorAction extends M * Serializable version identifier */ private static final long serialVersionUID = -6316010713240389305L; + + /** + * The name of the channel to end monitoring. + */ private String channel; - private String file; - private String format; - private Boolean mix; /** * Returns the name of this action, i.e. "StopMonitor". + * + * @return the name of this action. */ public String getAction() { @@ -44,6 +47,8 @@ public class StopMonitorAction extends M /** * Returns the name of the channel to end monitoring. + * + * @return the name of the channel to end monitoring. */ public String getChannel() { @@ -53,6 +58,8 @@ public class StopMonitorAction extends M /** * Sets the name of the channel to end monitoring.<br> * This property is mandatory. + * + * @param channel the name of the channel to end monitoring. */ public void setChannel(String channel) { |
From: Stefan R. <sr...@us...> - 2005-02-26 20:50:41
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22678/src/java/net/sf/asterisk/manager/event Modified Files: ChannelEvent.java NewCallerIdEvent.java Log Message: Fixed javadoc comment for callerId parameter in setCallerId Index: ChannelEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ChannelEvent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- ChannelEvent.java 25 Feb 2005 11:58:43 -0000 1.3 +++ ChannelEvent.java 26 Feb 2005 20:50:31 -0000 1.4 @@ -106,7 +106,7 @@ public abstract class ChannelEvent exten /** * Sets the Caller*ID of the channel. * - * @param the Caller*ID of the channel. + * @param callerId the Caller*ID of the channel. */ public void setCallerId(String callerId) { Index: NewCallerIdEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/NewCallerIdEvent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- NewCallerIdEvent.java 25 Feb 2005 11:58:43 -0000 1.3 +++ NewCallerIdEvent.java 26 Feb 2005 20:50:31 -0000 1.4 @@ -111,7 +111,7 @@ public class NewCallerIdEvent extends Ma /** * Sets the new Caller*ID. * - * @param the new Caller*ID. + * @param callerId the new Caller*ID. */ public void setCallerId(String callerId) { |
From: Stefan R. <sr...@us...> - 2005-02-26 20:16:18
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12349/src/test/net/sf/asterisk/manager Modified Files: EventBuilderTest.java Log Message: Added test with empty attributes Added test with response event Index: EventBuilderTest.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager/EventBuilderTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- EventBuilderTest.java 24 Feb 2005 00:43:09 -0000 1.1 +++ EventBuilderTest.java 26 Feb 2005 20:15:53 -0000 1.2 @@ -20,11 +20,14 @@ import java.util.HashMap; import java.util.Map; import junit.framework.TestCase; +import net.sf.asterisk.manager.event.CdrEvent; import net.sf.asterisk.manager.event.ChannelEvent; import net.sf.asterisk.manager.event.ManagerEvent; import net.sf.asterisk.manager.event.NewChannelEvent; import net.sf.asterisk.manager.event.NewExtenEvent; +import net.sf.asterisk.manager.event.ResponseEvent; import net.sf.asterisk.manager.event.ShutdownEvent; +import net.sf.asterisk.manager.event.StatusCompleteEvent; /** * @author srt @@ -135,4 +138,41 @@ public class EventBuilderTest extends Te assertNull(event); } + + public void testBuildEventWithEmptyAttributes() + { + Map properties = new HashMap(); + ManagerEvent event; + + event = eventBuilder.buildEvent(this, properties); + + assertNull(event); + } + + public void testBuildEventWithResponseEvent() + { + Map properties = new HashMap(); + ManagerEvent event; + + properties.put("event", "StatusComplete"); + properties.put("actionid", "1234-origId"); + event = eventBuilder.buildEvent(this, properties); + + assertNotNull(event); + assertEquals("Returned event is of wrong type", StatusCompleteEvent.class, event.getClass()); + assertEquals("ActionId not set correctly", "origId", ((ResponseEvent) event).getActionId()); + } + + public void testBuildEventWithSourceProperty() + { + Map properties = new HashMap(); + ManagerEvent event; + + properties.put("event", "Cdr"); + properties.put("source", "source value"); + event = eventBuilder.buildEvent(this, properties); + + assertNotNull(event); + assertEquals("Src property not set correctly", "source value", ((CdrEvent) event).getSrc()); + } } |
From: Stefan R. <sr...@us...> - 2005-02-26 20:14:27
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11869/src/java/net/sf/asterisk/manager Modified Files: EventBuilder.java Log Message: Removed superflous check for a setter being public Index: EventBuilder.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/EventBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- EventBuilder.java 23 Feb 2005 22:50:57 -0000 1.2 +++ EventBuilder.java 26 Feb 2005 20:14:17 -0000 1.3 @@ -347,12 +347,6 @@ public class EventBuilder continue; } - // skip non public methods - if ((method.getModifiers() & Modifier.PUBLIC) == 0) - { - continue; - } - // skip methods with != 1 parameters if (method.getParameterTypes().length != 1) { |
From: Stefan R. <sr...@us...> - 2005-02-26 20:12:43
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11378 Modified Files: project.properties Log Message: Added jar override for clover Index: project.properties =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- project.properties 25 Feb 2005 22:49:50 -0000 1.4 +++ project.properties 26 Feb 2005 20:12:28 -0000 1.5 @@ -1,9 +1,8 @@ -maven.repo.remote = http://www.ibiblio.org/maven,http://maven.reucon.net/maven +maven.repo.remote = http://www.ibiblio.org/maven,http://maven.reucon.com/maven # Site generation properties maven.xdoc.date = left maven.xdoc.version = ${pom.currentVersion} -maven.html2xdoc.enabled = true # Deploying site maven.remote.group = asterisk-java @@ -11,12 +10,16 @@ maven.site.deploy.method = ssh # Repository to deploy to maven.repo.list = asterisk-java -maven.repo.asterisk-java = scpexe://shell.sourceforge.net -maven.repo.asterisk-java.directory = /home/groups/a/as/asterisk-java/htdocs/maven +maven.repo.asterisk-java = scpexe://maven.reucon.com +maven.repo.asterisk-java.directory = /var/www/maven.reucon.com/htdocs/maven +#maven.repo.asterisk-java = scpexe://shell.sourceforge.net +#maven.repo.asterisk-java.directory = /home/groups/a/as/asterisk-java/htdocs/maven maven.repo.asterisk-java.username = ${maven.username} maven.jar.override = on maven.jar.commons-lang = lib/commons-lang-2.0.jar +maven.jar.clover-ant=1.3.3_01 +maven.clover.license.path=lib/clover/clover.license maven.checkstyle.properties = checkstyle.xml |
From: Stefan R. <sr...@us...> - 2005-02-26 20:11:58
|
Update of /cvsroot/asterisk-java/asterisk-java/lib/clover In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11146/lib/clover Added Files: clover.license Log Message: Added clover license kindly donated by cenqua --- NEW FILE: clover.license --- Product: Clover License: Open Source License, 0.x, 1.x Issued: Thu Oct 21 2004 21:27:21 CDT Expiry: Never Key: 7e1c2ed27ee858f42adedd953 Name: Stefan Reuter Org: asterisk-java Certificate: AAABsm+Ow8B7/zEbxOMqqKwwrdpP+a1COmJGHco7sCNLjHkHnajPF+dQW Ct12PMy0uml0s9xuus5wKngJ9OFk5XFeh01dzQF66bhXH1bvegLfvja3Kle6BYtDv4LZgE gk3E0aJN4IbgTn+TgUckSevXDR4KzK77NWJfrVzkxV3/Jer0jWuM7QJbvwkyoXjNEVc/ye OTlpI6MQPLOI4Og5zfT4dHD72UJcFEgGvSx6kEeWPn+RGX8xt3GVb8MJ1ywMWYUIcFWe2m JfmT8OoDi6VDKGj/p0gCEpn+6zEmWuUoleg59zSy9cEHoJVDLjoVAqhUmFnDYl2Tk9LLP3 3Gn0yLWqYQk2fzWw7d6BiJrcX/2seoMHkW4+l9l5JKzy0XyFHUIsTFzbjbeTmZpk24hkje f9PFP3hFn89RVjsozstxYnbhGeHhQZNk/uG0ftnAR0bXdFv0ZYFU0t/597/Kxw9gpyss1w r/rdMDm0c+7KgckZjxPrfvvFgAFuutYe//Ol8Be8lguE7Fkews81gIyc4d0NvU+gu7qUZo WOOjTVMuDM7TJWIHlKT54UGPELrE8E/I7XICOJa8WipV+qmMXPXk/q2oiu1udzSy7Tmvyi hZ85yCnuH9DBnpBZRbS88AtM6Lje56JhNykODYtRipYlvD8vlukR+/c4sBWNkJlYG7FU/o SP8Hrnh8VSFASymIfLGF/6v+wzRsoiAyO3MlQPDajIsCnmFIFanUVG453AmktJwxbKU0= License Agreement: CLOVER VERSION 1 (ONE) SOFTWARE LICENSE AGREEMENT 1. Licenses and Software Cortex eBusiness Pty Ltd, an Australian Proprietary Limited Company ("CENQUA") hereby grants to the purchaser (the "LICENSEE") a limited, revocable, worldwide, non-exclusive, non-transferable, non-sublicensable license to use the Clover version 1 (one) software (the "Software"), including any minor upgrades thereof during the Term (hereinafter defined) up to, but not including the next major version of the Software. The licensee shall not, or knowingly allow others to, reverse engineer, decompile, disassemble, modify, adapt, create derivative works from or otherwise attempt to derive source code from the Software provided. And, in accordance with the terms and conditions of this Software License Agreement (the "Agreement"), the Software shall be used solely by the licensed users in accordance with the following edition specific conditions: a) Server Edition A Server Edition license entitles the Licensee to execute one instance of Clover Server Edition on one (1) machine for the purposes of instrumenting source code and generating reports. There are no limitations on the use of the instrumented source code or generated reports produced by Server Edition. b) Workstation Edition A Workstation Edition license entitles the licensee to use Clover Workstation Edition on one (1) machine by one (1) individual end user. Workstation Edition does not permit the generation of reports for distribution. c) Team Edition A Team Edition license entitles the licensee to use Clover Team edition on any number of machines solely by the licensed number of users. Reports generated by Clover Team Edition are strictly for use only by the licensed number of individual end users. 2. License Fee In exchange for the License(s), the Licensee shall pay to Cenqua a one-time, up front, non-refundable license fee. At the sole discretion of Cenqua this fee will be waived for non-commercial projects. Notwithstanding the Licensee's payment of the License Fee, Cenqua reserves the right to terminate the License if Cenqua discovers that the Licensee and/or the Licensee's use of the Software is in breach of this Agreement. 3. Proprietary Rights Cenqua will retain all right, title and interest in and to the Software, all copies thereof, and Cenqua website(s), software, and other intellectual property, including, but not limited to, ownership of all copyrights, look and feel, trademark rights, design rights, trade secret rights and any and all other intellectual property and other proprietary rights therein. The Licensee will not directly or indirectly obtain or attempt to obtain at any time, any right, title or interest by registration or otherwise in or to the trademarks, service marks, copyrights, trade names, symbols, logos or designations or other intellectual property rights owned or used by Cenqua. All technical manuals or other information provided by Cenqua to the Licensee shall be the sole property of Cenqua. 4. Term and Termination Subject to the other provisions hereof, this Agreement shall commence upon the Licensee's opting into this Agreement and continue until the Licensee discontinues use of the Software or the Agreement terminates automatically upon the Licensee's breach of any term or condition of this Agreement (the "Term"). Upon any such termination, the Licensee will delete the Software immediately. 5. Copying & Transfer The Licensee may copy the Software for back-up purposes only. The Licensee may not assign or otherwise transfer the Software to any third party. 6. Specific Disclaimer of Warranty and Limitation of Liability THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND. CENQUA DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. CENQUA WILL NOT BE LIABLE FOR ANY DAMAGES ASSOCIATED WITH THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ORDINARY, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN IF CENQUA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. Warranties and Representations Licensee Indemnification. CENQUA agrees to indemnify, defend and hold the Licensee harmless from and against any and all liabilities, damages, losses, claims, costs, and expenses (including reasonable legal fees) arising out of or resulting from the Software or the use thereof infringing upon, misappropriating or violating any patents, copyrights, trademarks, or trade secret rights or other proprietary rights of persons, firms or entities who are not parties to this Agreement. CENQUA Indemnification. The Licensee warrants and represents that the Licensee's actions with regard to the Software will be in compliance with all applicable laws; and the Licensee agrees to indemnify, defend, and hold CENQUA harmless from and against any and all liabilities, damages, losses, claims, costs, and expenses (including reasonable legal fees) arising out of or resulting from the Licensee's failure to observe the use restrictions set forth herein. 8. Publicity The Licensee grants permission for CENQUA to use Licensee's name solely in customer lists. CENQUA shall not, without prior consent in writing, use the Licensee's name, or that of its affiliates, in any form with the specific exception of customer lists. CENQUA agrees to remove Licensee's name from any and all materials within 7 days if notified by the Licensee in writing. 9. Governing Law This Agreement shall be governed by the laws of New South Wales, Australia. 10. Independent Contractors The parties are independent contractors with respect to each other, and nothing in this Agreement shall be construed as creating an employer-employee relationship, a partnership, agency relationship or a joint venture between the parties. 11. Assignment This Agreement is not assignable or transferable by the Licensee. CENQUA in its sole discretion may transfer a license to a third party at the written request of the Licensee. 12. Entire Agreement This Agreement constitutes the entire agreement between the parties concerning the Licensee's use of the Software. This Agreement supersedes any prior verbal understanding between the parties and any Licensee purchase order or other ordering document, regardless of whether such document is received by CENQUA before or after execution of this Agreement. This Agreement may be amended only in writing by CENQUA. |
From: Stefan R. <sr...@us...> - 2005-02-26 20:11:28
|
Update of /cvsroot/asterisk-java/asterisk-java/lib/clover In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11087/lib/clover Log Message: Directory /cvsroot/asterisk-java/asterisk-java/lib/clover added to the repository |
From: Stefan R. <sr...@us...> - 2005-02-25 23:35:32
|
Update of /cvsroot/asterisk-java/asterisk-java/src/test/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23034/src/test/net/sf/asterisk/manager Added Files: ActionBuilderTest.java Log Message: Added test case for ActionBuilder --- NEW FILE: ActionBuilderTest.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.manager; import junit.framework.TestCase; import net.sf.asterisk.manager.action.ManagerAction; public class ActionBuilderTest extends TestCase { private ActionBuilder actionBuilder; public void setUp() { this.actionBuilder = new ActionBuilder(); } public void testBuildAction() { MyAction myAction; String actual; myAction = new MyAction(); myAction.setFirstProperty("first value"); myAction.setSecondProperty(new Integer(2)); myAction.setNonPublicProperty("private"); actual = actionBuilder.buildAction(myAction); assertTrue("Action name missing", actual.indexOf("action: My\r\n") >= 0); assertTrue("First property missing", actual.indexOf("firstproperty: first value\r\n") >= 0); assertTrue("Second property missing", actual.indexOf("secondproperty: 2\r\n") >= 0); assertTrue("Missing trailing CRNL CRNL", actual.endsWith("\r\n\r\n")); assertEquals("Incorrect length", 61, actual.length()); } public void testBuildActionWithNullValue() { MyAction myAction; String actual; myAction = new MyAction(); myAction.setFirstProperty("first value"); actual = actionBuilder.buildAction(myAction); assertTrue("Action name missing", actual.indexOf("action: My\r\n") >= 0); assertTrue("First property missing", actual.indexOf("firstproperty: first value\r\n") >= 0); assertTrue("Missing trailing CRNL CRNL", actual.endsWith("\r\n\r\n")); assertEquals("Incorrect length", 42, actual.length()); } class MyAction extends ManagerAction { private static final long serialVersionUID = 3257568425345102641L; private String firstProperty; private Integer secondProperty; private String nonPublicProperty; public String getAction() { return "My"; } public String getFirstProperty() { return firstProperty; } public void setFirstProperty(String firstProperty) { this.firstProperty = firstProperty; } public Integer getSecondProperty() { return secondProperty; } public void setSecondProperty(Integer secondProperty) { this.secondProperty = secondProperty; } protected String getNonPublicProperty() { return nonPublicProperty; } protected void setNonPublicProperty(String privateProperty) { this.nonPublicProperty = privateProperty; } public String get() { return "This method must not be considered a getter"; } public String getIndexedProperty(int i) { return "This method must not be considered a getter relevant for building the action"; } } } |
From: Stefan R. <sr...@us...> - 2005-02-25 23:35:05
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22641/src/java/net/sf/asterisk/manager Modified Files: ActionBuilder.java Log Message: Removed superflous check for a getter being public Added check to exclude zero length properties Index: ActionBuilder.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/ActionBuilder.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- ActionBuilder.java 23 Feb 2005 22:50:57 -0000 1.3 +++ ActionBuilder.java 25 Feb 2005 23:34:52 -0000 1.4 @@ -18,7 +18,6 @@ package net.sf.asterisk.manager; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -140,12 +139,6 @@ public class ActionBuilder continue; } - // skip non public methods - if ((method.getModifiers() & Modifier.PUBLIC) == 0) - { - continue; - } - // skip methods with != 0 parameters if (method.getParameterTypes().length != 0) { @@ -154,6 +147,12 @@ public class ActionBuilder // ok seems to be an accessor name = methodName.substring("get".length()).toLowerCase(); + + if (name.length() == 0) + { + continue; + } + accessors.put(name, method); } |
From: Stefan R. <sr...@us...> - 2005-02-25 22:49:59
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10436 Modified Files: project.properties Log Message: Fixed absolute directory for commons-lang override Index: project.properties =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -p -r1.3 -r1.4 --- project.properties 23 Feb 2005 16:15:24 -0000 1.3 +++ project.properties 25 Feb 2005 22:49:50 -0000 1.4 @@ -10,13 +10,13 @@ maven.remote.group = asterisk-java maven.site.deploy.method = ssh # Repository to deploy to -maven.repo.list = reucon -maven.repo.reucon = scpexe://maven.reucon.com -maven.repo.reucon.directory = /var/www/maven.reucon.com/htdocs/maven -maven.repo.reucon.username = ${maven.username} +maven.repo.list = asterisk-java +maven.repo.asterisk-java = scpexe://shell.sourceforge.net +maven.repo.asterisk-java.directory = /home/groups/a/as/asterisk-java/htdocs/maven +maven.repo.asterisk-java.username = ${maven.username} maven.jar.override = on -maven.jar.commons-lang = /home/srt/workspace/asterisk-java/lib/commons-lang-2.0.jar +maven.jar.commons-lang = lib/commons-lang-2.0.jar maven.checkstyle.properties = checkstyle.xml |
From: Stefan R. <sr...@us...> - 2005-02-25 11:59:08
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15363/src/java/net/sf/asterisk/manager/event Modified Files: ChannelEvent.java NewCallerIdEvent.java Log Message: Addedd attribute callerIdName (Bug #1151384) Index: ChannelEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/ChannelEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- ChannelEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ ChannelEvent.java 25 Feb 2005 11:58:43 -0000 1.3 @@ -30,9 +30,29 @@ public abstract class ChannelEvent exten */ static final long serialVersionUID = 5906599407896179295L; + /** + * The name of the channel. + */ private String channel; + + /** + * The state of the channel. + */ private String state; + + /** + * This Caller*ID of the channel. + */ private String callerId; + + /** + * The Caller*ID Name of the channel. + */ + private String callerIdName; + + /** + * The unique id of the channel. + */ private String uniqueId; /** @@ -76,7 +96,7 @@ public abstract class ChannelEvent exten } /** - * Returns the caller id of the channel if set or "unknown" if none has been set. + * Returns the Caller*ID of the channel if set or "≶unknown>" if none has been set. */ public String getCallerId() { @@ -84,7 +104,9 @@ public abstract class ChannelEvent exten } /** - * Sets the caller id of the channel. + * Sets the Caller*ID of the channel. + * + * @param the Caller*ID of the channel. */ public void setCallerId(String callerId) { @@ -92,6 +114,26 @@ public abstract class ChannelEvent exten } /** + * Returns the Caller*ID Name of the channel if set or "≶unknown>" if none has been set. + * + * @return the Caller*ID Name of the channel. + */ + public String getCallerIdName() + { + return callerIdName; + } + + /** + * Sets the Caller*ID Name of the channel. + * + * @param callerIdName the Caller*ID Name of the channel. + */ + public void setCallerIdName(String callerIdName) + { + this.callerIdName = callerIdName; + } + + /** * Returns the (new) state of the channel.<br> * The following states are used:<br> * <ul> Index: NewCallerIdEvent.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/event/NewCallerIdEvent.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- NewCallerIdEvent.java 23 Feb 2005 22:50:58 -0000 1.2 +++ NewCallerIdEvent.java 25 Feb 2005 11:58:43 -0000 1.3 @@ -30,8 +30,24 @@ public class NewCallerIdEvent extends Ma */ static final long serialVersionUID = 6639570533512201213L; + /** + * The new Caller*ID. + */ private String callerId; + + /** + * The new Caller*ID Name. + */ + private String callerIdName; + + /** + * The name of the channel. + */ private String channel; + + /** + * The unique id of the channel. + */ private String uniqueId; /** @@ -44,6 +60,8 @@ public class NewCallerIdEvent extends Ma /** * Returns the name of the channel. + * + * @return the name of the channel. */ public String getChannel() { @@ -52,6 +70,8 @@ public class NewCallerIdEvent extends Ma /** * Sets the name of the channel. + * + * @param channel the name of the channel */ public void setChannel(String channel) { @@ -60,6 +80,8 @@ public class NewCallerIdEvent extends Ma /** * Returns the unique id of the channel. + * + * @return the unique id of the channel. */ public String getUniqueId() { @@ -68,6 +90,8 @@ public class NewCallerIdEvent extends Ma /** * Sets the unique id of the channel. + * + * @param uniqueId the unique id of the channel. */ public void setUniqueId(String uniqueId) { @@ -76,6 +100,8 @@ public class NewCallerIdEvent extends Ma /** * Returns the new caller id. + * + * @return the new caller id. */ public String getCallerId() { @@ -83,10 +109,32 @@ public class NewCallerIdEvent extends Ma } /** - * Sets the new caller id. + * Sets the new Caller*ID. + * + * @param the new Caller*ID. */ public void setCallerId(String callerId) { this.callerId = callerId; } + + /** + * Returns the new Caller*ID Name if set or "≶Unknown>" if none has been set. + * + * @return the new Caller*ID Name. + */ + public String getCallerIdName() + { + return callerIdName; + } + + /** + * Sets the new Caller*ID Name if set or "≶Unknown>" if none has been set. + * + * @param callerIdName the Caller*ID Name to set. + */ + public void setCallerIdName(String callerIdName) + { + this.callerIdName = callerIdName; + } } |
From: Stefan R. <sr...@us...> - 2005-02-25 11:26:17
|
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7244/src/java/net/sf/asterisk/manager/action Added Files: SetVarAction.java Log Message: Added SetVarAction (named SetVar to match the already existing GetVarAction) (Patch #1151288) --- NEW FILE: SetVarAction.java --- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package net.sf.asterisk.manager.action; /** * The SetVar action will set the value of a variable for a given channel. * * @author Asteria Solutions Group, Inc. <http://www.asteriasgi.com> * @version $Id: SetVarAction.java,v 1.1 2005/02/25 11:25:49 srt Exp $ */ public class SetVarAction extends ManagerAction { /** * Serial version identifier */ private static final long serialVersionUID = 3978144348493591607L; /** * The channel on which to set the variable. */ public String channel; /** * The name of the variable to set. */ public String variable; /** * The value to store. */ public String value; /** * Returns the name of this action, i.e. "SetVar". * * @return the name of this action */ public String getAction() { return "SetVar"; } /** * Returns the name of the channel. * * @return the name of channel. */ public String getChannel() { return channel; } /** * Sets the name of the channel. * * @param channel the name of the channel to set. */ public void setChannel(String channel) { this.channel = channel; } /** * Returns the name of the variable to set. * * @return the name of the variable to set. */ public String getVariable() { return variable; } /** * Sets the name of the variable to set. * * @param variable the name of the variable to set. */ public void setVariable(String variable) { this.variable = variable; } /** * Returns the value to store. * * @return the value to store. */ public String getValue() { return value; } /** * Sets the value to store. * * @param value the value to set. */ public void setValue(String value) { this.value = value; } } |
From: Stefan R. <sr...@us...> - 2005-02-24 23:05:27
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25004/xdocs Modified Files: navigation.xml Log Message: Added mailing lists to main menu Index: navigation.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/xdocs/navigation.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- navigation.xml 24 Feb 2005 15:07:35 -0000 1.1 +++ navigation.xml 24 Feb 2005 23:05:18 -0000 1.2 @@ -26,7 +26,7 @@ <menu name="Overview"> <item name="Home" href="index.html"/> <item name="Building with Maven" href="building.html"/> - <item name="Downloads" href="downloads.html"/> + <item name="Mailing Lists" href="mail-lists.html"/> </menu> <menu name="Documentation"> <item name="Samples" href="samples.html"/> |
From: Stefan R. <sr...@us...> - 2005-02-24 22:28:32
|
Update of /cvsroot/asterisk-java/asterisk-java In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14281 Modified Files: project.xml Log Message: Added links to mailing list archives Index: project.xml =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/project.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- project.xml 24 Feb 2005 00:43:09 -0000 1.4 +++ project.xml 24 Feb 2005 22:28:04 -0000 1.5 @@ -49,17 +49,19 @@ <name>Asterisk-java User List</name> <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</subscribe> <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-users</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-users</archive> </mailingList> <mailingList> <name>Asterisk-java Developer List</name> <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</subscribe> <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-devel</unsubscribe> + <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-devel</archive> </mailingList> <mailingList> <name>Asterisk-java CVS Commit List</name> <subscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</subscribe> <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/asterisk-java-cvs</unsubscribe> - <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=43809</archive> + <archive>http://sourceforge.net/mailarchive/forum.php?forum=asterisk-java-cvs</archive> </mailingList> </mailingLists> <developers> |
From: Stefan R. <sr...@us...> - 2005-02-24 22:26:29
|
Update of /cvsroot/asterisk-java/asterisk-java/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13686/xdocs Added Files: samples.xml building.xml Log Message: Added dummy pages --- NEW FILE: samples.xml --- <?xml version="1.0"?> <!-- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ --> <document> <properties> <author email="srt at users.sourceforge.net">Stefan Reuter</author> <title>Samples</title> </properties> <meta name="keyword" content="asterisk,java,pbx,manager api,library"/> <body> <section name="Samples"> <p>To be done.</p> </section> </body> </document> --- NEW FILE: building.xml --- <?xml version="1.0"?> <!-- /* * Copyright 2004-2005 Stefan Reuter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ --> <document> <properties> <author email="srt at users.sourceforge.net">Stefan Reuter</author> <title>Building with Maven</title> </properties> <meta name="keyword" content="asterisk,java,pbx,manager api,library"/> <body> <section name="Building with Maven"> <p>To be done.</p> </section> </body> </document> |