Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
version/build-date/build-number cleanup:
Browse files Browse the repository at this point in the history
+ client and server get version info from associated properties file,
  which is filtered during the build to include the version declared in the pom
+ changed client's About screen "Release Date" to "Build Date" so
  this info can automatically come from Client.properties
+ client also now prints build number in the About screen
+ server now also logs the build date at startup
minor admin gui change:
+ default size of fedora-admin window and object editor frame increased
  (but still fits within 1024x768 screens)
misc:
+ got rid of old, unused MakePatch utility class
  • Loading branch information
Chris Wilper committed Dec 17, 2009
1 parent e4f1e1d commit f1b44f6
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 439 deletions.
9 changes: 0 additions & 9 deletions fcrepo-client/fcrepo-client-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@

<build>

<!--
Note: Need to filter following variables:
filter token="version" value="${fedora.version}"
filter token="releaseDate" value="${fedora.releaseDate}"
-->
<resources>
<resource>
<directory>../resources/server</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ public class Administrator

public static String VERSION = s_const.getString("version");

public static String RELEASE_DATE = s_const.getString("releaseDate");
public static String BUILD_DATE = s_const.getString("buildDate");

public static String BUILD_NUMBER = s_const.getString("buildNumber");

public static final void showErrorDialog(Component parent,
String title,
Expand Down Expand Up @@ -231,6 +233,7 @@ public Administrator(String protocol,
m_aboutPic = new JLabel(aboutIcon);
m_aboutText =
new JLabel("<html>"
+ "<p>Copyright 2009, DuraSpace</p>"
+ "<p>Copyright 2008-2009, Fedora Commons, Inc.</p>"
+ "<p>Copyright 2002-2007, The Rector and Visitors of the</p>"
+ "<p>University of Virginia and Cornell University.</p><p></p>"
Expand All @@ -243,13 +246,11 @@ public Administrator(String protocol,
+ "<p>basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.</p>"
+ "<p>See the License for the specific language governing rights and</p>"
+ "<p>limitations under the License.</p><p></p>"
+ "<p>Version: "
+ VERSION
+ "</p>"
+ "<p>Release Date: "
+ RELEASE_DATE
+ "</p>"
+ "<p>See http://www.fedora-commons.org/ for more information.</p></html>");
+ "<p><b>Version: </b>" + VERSION + "</p>"
+ "<p><b>Build Date: </b>" + BUILD_DATE + "</p>"
+ "<p><b>Build Number: </b>" + BUILD_NUMBER + "</p>"
+ "<p></p>"
+ "<p>See http://fedora-commons.org/ for more information.</p></html>");

m_aboutText.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
JPanel splashPicAndText = new JPanel();
Expand Down Expand Up @@ -303,8 +304,8 @@ public void windowClosing(WindowEvent e) {
splashScreen.setVisible(false);
s_instance = this;

int xs = 850;
int ys = 655;
int xs = 1000;
int ys = 744;
Dimension sz = getToolkit().getScreenSize();
int xl = sz.width / 2 - xs / 2;
int yl = sz.height / 2 - ys / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ public ObjectEditorFrame(String pid, int startTab)
//setFrameIcon(openIcon);
pack();
Dimension dims = getSize();
if (dims.height < 545) {
dims.height = 545;
} else if (dims.height > 580) {
dims.height = 580;
if (dims.height < 675) {
dims.height = 675;
} else if (dims.height > 700) {
dims.height = 700;
}
if (dims.width < 740) {
dims.width = 740;
} else if (dims.width > 820) {
dims.width = 820;
if (dims.width < 925) {
dims.width = 925;
} else if (dims.width > 950) {
dims.width = 950;
}
setSize(dims);
show();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Client properties. Values generated at build from Server.properties
version=@version@
releaseDate=@releaseDate@
compatibleServerVersions=2.2 2.2.1 2.2.2 2.2.3 2.2.4 3.0b1 3.0b2 3.0 3.1 3.2 3.2.1 @version@
# Client properties

version=${version}
buildDate=${timestamp}
buildNumber=${buildNumber}
compatibleServerVersions=2.2 2.2.1 2.2.2 2.2.3 2.2.4 3.0b1 3.0b2 3.0 3.1 3.2 3.2.1 ${version}
14 changes: 0 additions & 14 deletions fcrepo-client/fcrepo-client-messaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@

<build>

<!--
Note: Need to filter following variables:
filter token="version" value="${fedora.version}"
filter token="releaseDate" value="${fedora.releaseDate}"
-->
<!--
<resources>
<resource>
<directory>../resources/server</directory>
<filtering>true</filtering>
</resource>
</resources>
-->

<resources>
<resource>
<directory>**/resources</directory>
Expand Down
15 changes: 9 additions & 6 deletions fcrepo-server/src/main/java/fedora/server/BasicServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@ public void initServer() throws ServerInitializationException {
+ "not given, but it's required.");
}

LOG.info("Fedora Version: " + VERSION_MAJOR + "." + VERSION_MINOR);
LOG.info("Fedora Build: " + BUILD_NUMBER);
LOG.info("Fedora Version: " + Server.VERSION);
LOG.info("Fedora Build Date: " + Server.BUILD_DATE);
LOG.info("Fedora Build Number: " + Server.BUILD_NUMBER);

ServerStatusFile status = getStatusFile();
try {
status.append(ServerState.STARTING, "Fedora Version: "
+ VERSION_MAJOR + "." + VERSION_MINOR);
status.append(ServerState.STARTING, "Fedora Build: "
+ BUILD_NUMBER);
status.append(ServerState.STARTING,
"Fedora Version: " + Server.VERSION);
status.append(ServerState.STARTING,
"Fedora Build Date: " + Server.BUILD_DATE);
status.append(ServerState.STARTING,
"Fedora Build Number: " + Server.BUILD_NUMBER);
status.append(ServerState.STARTING, "Server Host Name: "
+ fedoraServerHost);
status.append(ServerState.STARTING, "Server Port: "
Expand Down
12 changes: 5 additions & 7 deletions fcrepo-server/src/main/java/fedora/server/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ public abstract class Server
private static ResourceBundle s_const =
ResourceBundle.getBundle("fedora.server.resources.Server");

/** The major version of this release. */
public static String VERSION_MAJOR = s_const.getString("version.major");
/** The version of this release. */
public static String VERSION = s_const.getString("version");

/** The minor version of this release. */
public static String VERSION_MINOR = s_const.getString("version.minor");
/** The build date of this release. */
public static String BUILD_DATE = s_const.getString("buildDate");

/** The build number of this release. */
public static String BUILD_NUMBER =
s_const.getString("version.buildNumber");
public static String BUILD_NUMBER = s_const.getString("buildNumber");

/** The name of the property that tells the server where it's based. */
public static String HOME_PROPERTY = s_const.getString("home.property");
Expand Down Expand Up @@ -123,7 +122,6 @@ public abstract class Server
*/
public static String NAMESPACE_PREFIX =
MessageFormat.format(s_const.getString("namespace.prefix"),
//new Object[] {VERSION_MAJOR, VERSION_MINOR});
new Object[] {"1", "0"}); // so config namespace uses 1/0/

/** The configuration file elements' namespace. 0={namespace.prefix} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,7 @@ public RepositoryInfo describeRepository(Context context)
repositoryInfo.repositoryBaseURL =
reposBaseURL + "/" + context.getEnvironmentValue(Constants.FEDORA_APP_CONTEXT_NAME);

repositoryInfo.repositoryVersion =
Server.VERSION_MAJOR + "." + Server.VERSION_MINOR;
repositoryInfo.repositoryVersion = Server.VERSION;
Module domgr = getServer().getModule("fedora.server.storage.DOManager");
repositoryInfo.repositoryPIDNamespace =
domgr.getParameter("pidNamespace");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public class MessagingImpl implements Messaging {
private final Map<String, List<String>> mdMap;
private final JMSManager jmsMgr;
private final String fedoraBaseUrl;
private final static String serverVersion = Server.VERSION_MAJOR + Server.VERSION_MINOR;
private final static String messageFormat = Constants.ATOM_APIM1_0.uri;

/**
Expand Down Expand Up @@ -94,7 +93,7 @@ public void send(String destName, FedoraMethod method, FedoraMessage message)
public void send(FedoraMethod method) throws MessagingException {
if (Management.class == method.getMethod().getDeclaringClass()) {

APIMMessage message = new AtomAPIMMessage(method, fedoraBaseUrl, serverVersion, messageFormat);
APIMMessage message = new AtomAPIMMessage(method, fedoraBaseUrl, Server.VERSION, messageFormat);

String methodName = method.getName();
if (methodName.startsWith("ingest")
Expand Down
Loading

0 comments on commit f1b44f6

Please sign in to comment.