You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2016/10/26 17:27:41 UTC
[1/4] isis git commit: ISIS-1519: adds XxxType.Meta classes as a new
idiom for holding max lengths of columns (replacing JdoColumnLength)
Repository: isis
Updated Branches:
refs/heads/master 7b8bdff83 -> c34f543e9
ISIS-1519: adds XxxType.Meta classes as a new idiom for holding max lengths of columns (replacing JdoColumnLength)
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/0ae29eb1
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/0ae29eb1
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/0ae29eb1
Branch: refs/heads/master
Commit: 0ae29eb105d530574750f66dd297d07f3f947018
Parents: 5df58cb
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Oct 26 16:54:18 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Oct 26 16:54:18 2016 +0100
----------------------------------------------------------------------
.../apache/isis/applib/annotation/Command.java | 5 +-
.../applib/annotation/CommandExecuteIn.java | 14 ++++
.../isis/applib/security/UserMemento.java | 34 ++++++++--
.../isis/applib/services/HasTransactionId.java | 15 ++++-
.../audit/AuditEntryPropertyIdType.java | 33 +++++++++
.../audit/AuditEntryPropertyValueType.java | 33 +++++++++
.../isis/applib/services/bookmark/Bookmark.java | 19 ++++++
.../isis/applib/services/command/Command.java | 3 +-
.../applib/services/publish/EventMetadata.java | 16 ++++-
.../isis/applib/services/publish/EventType.java | 16 ++++-
.../publish/PublishedEventStateType.java | 37 +++++++++++
.../publish/StatusMessageMessageType.java | 37 +++++++++++
.../applib/services/settings/SettingTypes.java | 70 ++++++++++++++++++++
.../isis/applib/types/DescriptionType.java | 33 +++++++++
.../isis/applib/types/MemberIdentifierType.java | 42 ++++++++++++
.../isis/applib/types/TargetActionType.java | 41 ++++++++++++
.../isis/applib/types/TargetClassType.java | 41 ++++++++++++
.../jdo/applib/service/JdoColumnLength.java | 50 +++++++++-----
18 files changed, 510 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
index 56407b6..a8e208c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Command.java
@@ -80,7 +80,10 @@ public @interface Command {
* @deprecated - use {@link CommandExecuteIn#BACKGROUND}
*/
@Deprecated
- BACKGROUND
+ BACKGROUND;
+
+
+
}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
index de793f5..ddd557d 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/CommandExecuteIn.java
@@ -58,4 +58,18 @@ public enum CommandExecuteIn {
throw new IllegalArgumentException("Unrecognized : executeIn" + commandExecuteIn);
}
+ public static class Type {
+
+ private Type() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 10;
+
+ private Meta() {}
+
+ }
+ }
+
+
}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java b/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java
index d2dd289..70876e3 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/security/UserMemento.java
@@ -33,6 +33,7 @@ import org.apache.isis.applib.annotation.NotPersistable;
@NotPersistable
public final class UserMemento {
+ //region > constructors
/**
* Creates a new user with the specified name and no roles.
*/
@@ -57,13 +58,16 @@ public final class UserMemento {
this.name = name;
this.roles.addAll(roles);
}
+ //endregion
- // {{ Identification: Title
+ //region > title
public String title() {
return name;
}
- // }}
+ //endregion
+
+ //region > name, NameType
// {{ (User) Name, isCurrentUser
private final String name;
@@ -76,6 +80,23 @@ public final class UserMemento {
return name;
}
+ public static class NameType {
+
+ private NameType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 50;
+
+ private Meta() {}
+
+ }
+
+ }
+
+ //endregion
+
+ //region > isCurrentUser
/**
* Determine if the specified name is this user.
*
@@ -90,9 +111,9 @@ public final class UserMemento {
return name.equals(userName);
}
- // }}
+ //endregion
- // {{ Roles
+ //region > roles
private final List<RoleMemento> roles = new ArrayList<RoleMemento>();
/**
@@ -125,8 +146,9 @@ public final class UserMemento {
return false;
}
- // }}
+ //endregion
+ //region > toString
@Override
public String toString() {
final StringBuilder buf = new StringBuilder();
@@ -136,4 +158,6 @@ public final class UserMemento {
return "User [name=" + getName() + ",roles=" + buf.toString() + "]";
}
+ //endregion
+
}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/HasTransactionId.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/HasTransactionId.java b/core/applib/src/main/java/org/apache/isis/applib/services/HasTransactionId.java
index 43e8384..365fb5a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/HasTransactionId.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/HasTransactionId.java
@@ -38,6 +38,17 @@ public interface HasTransactionId {
void setTransactionId(final UUID transactionId);
-
+ class TransactionIdType {
-}
+ private TransactionIdType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 36;
+
+ private Meta() {}
+
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyIdType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyIdType.java b/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyIdType.java
new file mode 100644
index 0000000..5a7af43
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyIdType.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.isis.applib.services.audit;
+
+public class AuditEntryPropertyIdType {
+
+ private AuditEntryPropertyIdType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 50;
+
+ private Meta() {}
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyValueType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyValueType.java b/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyValueType.java
new file mode 100644
index 0000000..613b0c2
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/audit/AuditEntryPropertyValueType.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.isis.applib.services.audit;
+
+public class AuditEntryPropertyValueType {
+
+ private AuditEntryPropertyValueType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 255;
+
+ private Meta() {}
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/Bookmark.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/Bookmark.java b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/Bookmark.java
index c3310c0..a152824 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/Bookmark.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/Bookmark.java
@@ -201,4 +201,23 @@ public class Bookmark implements Serializable {
public String toString() {
return state.getCode() + objectType + SEPARATOR + identifier;
}
+
+
+ public static class AsStringType {
+
+ private AsStringType() {}
+
+ public static class Meta {
+
+ /**
+ * Is based on the defacto limit of a request URL in web browsers such as IE8
+ */
+ public static final int MAX_LEN = 2000;
+
+ private Meta() {}
+
+ }
+
+ }
+
}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
index 7f311ef..137bd2a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
@@ -74,7 +74,6 @@ public interface Command extends HasTransactionId {
String ACTION_IDENTIFIER_FOR_EDIT = "(edit)";
-
//region > user (property)
/**
* The user that created the command.
@@ -140,7 +139,7 @@ public interface Command extends HasTransactionId {
* Implementation notes: set when the action is invoked (in <tt>ActionInvocationFacet</tt>) or in
* property edited (in <tt>PropertySetterFacet</tt>).
*/
- void setMemberIdentifier(String actionIdentifier);
+ void setMemberIdentifier(String memberIdentifier);
//endregion
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
index a62d8fd..b159e02 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
@@ -169,6 +169,21 @@ public class EventMetadata {
return title;
}
+ public static class TitleType {
+
+ private TitleType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 255;
+
+ private Meta() {}
+
+ }
+
+ }
+
+
public EventType getEventType() {
return eventType;
}
@@ -239,5 +254,4 @@ public class EventMetadata {
return getId();
}
-
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventType.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventType.java
index 7638bc1..4eab496 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventType.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventType.java
@@ -23,5 +23,19 @@ public enum EventType {
ACTION_INVOCATION,
OBJECT_CREATED,
OBJECT_UPDATED,
- OBJECT_DELETED,
+ OBJECT_DELETED;
+
+ public static class Type {
+
+ private Type() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 20;
+
+ private Meta() {}
+
+ }
+ }
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedEventStateType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedEventStateType.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedEventStateType.java
new file mode 100644
index 0000000..3faa275
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/publish/PublishedEventStateType.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.isis.applib.services.publish;
+
+/**
+ * @deprecated - used only by isis addons' publishing module, for state of events being polled.
+ */
+@Deprecated
+public class PublishedEventStateType {
+
+ private PublishedEventStateType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 20;
+
+ private Meta() {}
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/publish/StatusMessageMessageType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/StatusMessageMessageType.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/StatusMessageMessageType.java
new file mode 100644
index 0000000..7e9be32
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/publish/StatusMessageMessageType.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.isis.applib.services.publish;
+
+/**
+ * @deprecated - used only by isis addons' publishmq module, for its StatusMessage entity
+ */
+@Deprecated
+public class StatusMessageMessageType {
+
+ private StatusMessageMessageType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 255;
+
+ private Meta() {}
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/services/settings/SettingTypes.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/settings/SettingTypes.java b/core/applib/src/main/java/org/apache/isis/applib/services/settings/SettingTypes.java
new file mode 100644
index 0000000..2217f4b
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/settings/SettingTypes.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.isis.applib.services.settings;
+
+/**
+ * @deprecated - used only by isis addons' settings module.
+ */
+@Deprecated
+public class SettingTypes {
+
+ private SettingTypes() {}
+
+ public static class KeyType {
+
+ private KeyType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 20;
+
+ private Meta() {}
+
+ }
+
+ }
+
+ public static class TypeType {
+
+ private TypeType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 128;
+
+ private Meta() {}
+
+ }
+
+ }
+
+ public static class ValueRawType {
+
+ private ValueRawType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 255;
+
+ private Meta() {}
+
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/types/DescriptionType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/types/DescriptionType.java b/core/applib/src/main/java/org/apache/isis/applib/types/DescriptionType.java
new file mode 100644
index 0000000..86f008f
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/types/DescriptionType.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.isis.applib.types;
+
+public class DescriptionType {
+
+ private DescriptionType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 254;
+
+ private Meta() {}
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/types/MemberIdentifierType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/types/MemberIdentifierType.java b/core/applib/src/main/java/org/apache/isis/applib/types/MemberIdentifierType.java
new file mode 100644
index 0000000..644aeb9
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/types/MemberIdentifierType.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.isis.applib.types;
+
+import java.sql.Timestamp;
+import java.util.UUID;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.command.Command;
+import org.apache.isis.applib.services.publish.EventMetadata;
+
+/**
+ * As per {@link Command#getMemberIdentifier()}, {@link org.apache.isis.applib.services.audit.AuditerService#audit(UUID, int, String, Bookmark, String, String, String, String, String, Timestamp)} and {@link EventMetadata#getActionIdentifier()}.
+ */
+public class MemberIdentifierType {
+
+ private MemberIdentifierType() {
+ }
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 255;
+
+ private Meta() {
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/types/TargetActionType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/types/TargetActionType.java b/core/applib/src/main/java/org/apache/isis/applib/types/TargetActionType.java
new file mode 100644
index 0000000..79f6215
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/types/TargetActionType.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.isis.applib.types;
+
+import java.sql.Timestamp;
+import java.util.UUID;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.command.Command;
+import org.apache.isis.applib.services.publish.EventMetadata;
+
+/**
+ * A user-friendly name of an action, as per {@link Command#getTargetAction()}, {@link EventMetadata#getTargetAction()}, {@link org.apache.isis.applib.services.audit.AuditerService#audit(UUID, int, String, Bookmark, String, String, String, String, String, Timestamp)}.
+ */
+public class TargetActionType {
+
+ private TargetActionType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 50;
+
+ private Meta() {}
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/applib/types/TargetClassType.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/types/TargetClassType.java b/core/applib/src/main/java/org/apache/isis/applib/types/TargetClassType.java
new file mode 100644
index 0000000..43e5196
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/types/TargetClassType.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.isis.applib.types;
+
+import java.sql.Timestamp;
+import java.util.UUID;
+
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.command.Command;
+import org.apache.isis.applib.services.publish.EventMetadata;
+
+/**
+ * A user-friendly name of a class, as per {@link Command#getTargetClass()}, {@link EventMetadata#getTargetClass()}, {@link org.apache.isis.applib.services.audit.AuditerService#audit(UUID, int, String, Bookmark, String, String, String, String, String, Timestamp)}.
+ */
+public class TargetClassType {
+
+ private TargetClassType() {}
+
+ public static class Meta {
+
+ public static final int MAX_LEN = 50;
+
+ private Meta() {}
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/0ae29eb1/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/JdoColumnLength.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/JdoColumnLength.java b/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/JdoColumnLength.java
index 02b4298..86b540b 100644
--- a/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/JdoColumnLength.java
+++ b/core/applib/src/main/java/org/apache/isis/objectstore/jdo/applib/service/JdoColumnLength.java
@@ -18,6 +18,22 @@
*/
package org.apache.isis.objectstore.jdo.applib.service;
+import org.apache.isis.applib.annotation.CommandExecuteIn;
+import org.apache.isis.applib.security.UserMemento;
+import org.apache.isis.applib.services.HasTransactionId;
+import org.apache.isis.applib.services.bookmark.Bookmark;
+import org.apache.isis.applib.services.publish.EventMetadata;
+import org.apache.isis.applib.services.publish.EventType;
+import org.apache.isis.applib.services.audit.AuditEntryPropertyIdType;
+import org.apache.isis.applib.services.audit.AuditEntryPropertyValueType;
+import org.apache.isis.applib.services.publish.PublishedEventStateType;
+import org.apache.isis.applib.services.publish.StatusMessageMessageType;
+import org.apache.isis.applib.types.DescriptionType;
+import org.apache.isis.applib.services.settings.SettingTypes;
+import org.apache.isis.applib.types.MemberIdentifierType;
+import org.apache.isis.applib.types.TargetActionType;
+import org.apache.isis.applib.types.TargetClassType;
+
/**
* @deprecated
*/
@@ -31,7 +47,7 @@ public final class JdoColumnLength {
* @deprecated
*/
@Deprecated
- public final static int TRANSACTION_ID = 36;
+ public final static int TRANSACTION_ID = HasTransactionId.TransactionIdType.Meta.MAX_LEN;
/**
* ie OID str (based on the defacto limit of a request URL in web browsers such as IE8)
@@ -39,33 +55,33 @@ public final class JdoColumnLength {
* @deprecated
*/
@Deprecated
- public final static int BOOKMARK = 2000;
+ public final static int BOOKMARK = Bookmark.AsStringType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int MEMBER_IDENTIFIER = 255;
+ public static final int MEMBER_IDENTIFIER = MemberIdentifierType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int USER_NAME = 50;
+ public static final int USER_NAME = UserMemento.NameType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public final static int TARGET_CLASS = 50;
+ public final static int TARGET_CLASS = TargetClassType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public final static int TARGET_ACTION = 50;
+ public final static int TARGET_ACTION = TargetActionType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int DESCRIPTION = 254;
+ public static final int DESCRIPTION = DescriptionType.Meta.MAX_LEN;
/**
* @deprecated
@@ -78,17 +94,17 @@ public final class JdoColumnLength {
* @deprecated
*/
@Deprecated
- public static final int SETTING_KEY = 128;
+ public static final int SETTING_KEY = SettingTypes.KeyType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int SETTING_TYPE = 20;
+ public static final int SETTING_TYPE = SettingTypes.TypeType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int VALUE_RAW = 255;
+ public static final int VALUE_RAW = SettingTypes.ValueRawType.Meta.MAX_LEN;
}
/**
@@ -102,7 +118,7 @@ public final class JdoColumnLength {
* @deprecated
*/
@Deprecated
- public static final int EXECUTE_IN = 10;
+ public static final int EXECUTE_IN = CommandExecuteIn.Type.Meta.MAX_LEN;
}
/**
@@ -117,12 +133,12 @@ public final class JdoColumnLength {
* @deprecated
*/
@Deprecated
- public static final int PROPERTY_ID = 50;
+ public static final int PROPERTY_ID = AuditEntryPropertyIdType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int PROPERTY_VALUE = 255;
+ public static final int PROPERTY_VALUE = AuditEntryPropertyValueType.Meta.MAX_LEN;
}
/**
@@ -138,17 +154,17 @@ public final class JdoColumnLength {
* @deprecated
*/
@Deprecated
- public static final int TITLE = 255;
+ public static final int TITLE = EventMetadata.TitleType.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int EVENT_TYPE = 20;
+ public static final int EVENT_TYPE = EventType.Type.Meta.MAX_LEN;
/**
* @deprecated
*/
@Deprecated
- public static final int STATE = 20;
+ public static final int STATE = PublishedEventStateType.Meta.MAX_LEN;
}
/**
@@ -160,7 +176,7 @@ public final class JdoColumnLength {
* @deprecated
*/
@Deprecated
- public static final int MESSAGE = 255;
+ public static final int MESSAGE = StatusMessageMessageType.Meta.MAX_LEN;
/**
* @deprecated
*/
[2/4] isis git commit: ISIS-1514: removes the calendar hint for date
time
Posted by da...@apache.org.
ISIS-1514: removes the calendar hint for date time
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/e27619cd
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/e27619cd
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/e27619cd
Branch: refs/heads/master
Commit: e27619cdc0669756d35df019af970ea6f5930886
Parents: 0ae29eb
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Oct 26 16:54:54 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Oct 26 16:54:54 2016 +0100
----------------------------------------------------------------------
.../ui/components/scalars/ScalarPanelTextFieldAbstract.html | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/e27619cd/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.html
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.html
index 20c9ff3..7bbfcf0 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.html
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.html
@@ -35,9 +35,8 @@
</wicket:fragment>
<wicket:fragment wicket:id="date">
- <div class="input-group input-group-sm date">
- <input type="text" name="scalarValue" wicket:id="scalarValue" class="form-control scalarValue"/>
- <span class="input-group-addon"><i class="fa fa-fw fa-calendar"></i></span>
+ <div class="date">
+ <input type="text" name="scalarValue" wicket:id="scalarValue" class="form-control input-sm scalarValue"/>
</div>
</wicket:fragment>
[4/4] isis git commit: Merge branch 'maint-1.13.1'
Posted by da...@apache.org.
Merge branch 'maint-1.13.1'
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/c34f543e
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/c34f543e
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/c34f543e
Branch: refs/heads/master
Commit: c34f543e91f9c4342be54119fbe8da11a2c48b7e
Parents: 7b8bdff 314ed28
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Oct 26 18:14:59 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Oct 26 18:14:59 2016 +0100
----------------------------------------------------------------------
.../apache/isis/applib/annotation/Command.java | 5 +-
.../applib/annotation/CommandExecuteIn.java | 14 ++++
.../isis/applib/security/UserMemento.java | 34 ++++++++--
.../isis/applib/services/HasTransactionId.java | 15 ++++-
.../audit/AuditEntryPropertyIdType.java | 33 +++++++++
.../audit/AuditEntryPropertyValueType.java | 33 +++++++++
.../isis/applib/services/bookmark/Bookmark.java | 19 ++++++
.../isis/applib/services/command/Command.java | 3 +-
.../applib/services/publish/EventMetadata.java | 16 ++++-
.../isis/applib/services/publish/EventType.java | 16 ++++-
.../publish/PublishedEventStateType.java | 37 +++++++++++
.../publish/StatusMessageMessageType.java | 37 +++++++++++
.../applib/services/settings/SettingTypes.java | 70 ++++++++++++++++++++
.../isis/applib/types/DescriptionType.java | 33 +++++++++
.../isis/applib/types/MemberIdentifierType.java | 42 ++++++++++++
.../isis/applib/types/TargetActionType.java | 41 ++++++++++++
.../isis/applib/types/TargetClassType.java | 41 ++++++++++++
.../jdo/applib/service/JdoColumnLength.java | 50 +++++++++-----
.../scalars/ScalarPanelTextFieldAbstract.html | 5 +-
.../wicket/ui/pages/bootstrap-overrides.css | 14 +++-
20 files changed, 524 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/c34f543e/core/applib/src/main/java/org/apache/isis/applib/services/command/Command.java
----------------------------------------------------------------------
[3/4] isis git commit: ISIS-1527: makes the edit icon overlay
consistent for all property types, with a general fix for Firefox.
Posted by da...@apache.org.
ISIS-1527: makes the edit icon overlay consistent for all property types, with a general fix for Firefox.
The issue with Firefox is that cannot overlay on top of a disabled field. The solution adopted is to shift the overlay right
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/314ed28f
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/314ed28f
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/314ed28f
Branch: refs/heads/master
Commit: 314ed28f255ab0dcb29cfdb6a7b10b7ad77d9a4a
Parents: e27619c
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Oct 26 17:24:30 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Oct 26 17:24:30 2016 +0100
----------------------------------------------------------------------
.../viewer/wicket/ui/pages/bootstrap-overrides.css | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/314ed28f/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
----------------------------------------------------------------------
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
index 8edc19c..fefd454 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css
@@ -797,9 +797,19 @@ tr.headers th form input {
margin-bottom: 10px;
}
-.stringPanel .scalarValueInput .editing .edit {
+.scalarValueInput .editing .edit {
margin-top: -20px;
- z-index: 2;
+ z-index: 20000;
+}
+
+.booleanPanel .scalarValueInput .editing .edit {
+ margin-top: 0px;
+}
+
+@-moz-document url-prefix() {
+ .scalarValueInput .editing .edit {
+ margin-right: -17px;
+ }
}
.actions-right .scalarPlaceholder .scalarValueInput {