[JBoss JIRA] (FORGE-136) Provide the ability to add @Option Converters for custom types
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-136?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III commented on FORGE-136:
------------------------------------------
It should also support chaining and priority weighting to reduce conflicts w/extensions.
> Provide the ability to add @Option Converters for custom types
> --------------------------------------------------------------
>
> Key: FORGE-136
> URL: https://issues.jboss.org/browse/FORGE-136
> Project: Forge
> Issue Type: Enhancement
> Components: Plugin API, Shell
> Affects Versions: 1.0.0.Alpha2
> Reporter: Lincoln Baxter III
> Fix For: 2.0.0.Alpha1
>
>
> This process should be encapsulated with a Forge interface API, adapter, and ServiceLoader for extension.
> {code}
> void init(@Observes final Startup event, final PluginCommandCompleter pluginCompleter) throws Exception
> {
> BooleanConverter booleanConverter = new BooleanConverter();
> addConversionHandler(boolean.class, booleanConverter);
> addConversionHandler(Boolean.class, booleanConverter);
> addConversionHandler(File.class, new FileConverter());
> addConversionHandler(Dependency.class, new DependencyIdConverter());
> addConversionHandler(URL.class, new URLConverter());
> ...
> }
> public interface OptionValueConverter<T> {
> public boolean supports(Class<?> type);
> public T convert(Object value);
> }
> {code}
> This interface should support injection.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] (FORGE-133) Entity command should provide an option for using a Mapped Superclass
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-133?page=com.atlassian.jira.plugin.... ]
Lincoln Baxter III updated FORGE-133:
-------------------------------------
Fix Version/s: 1.0.7.Final
Priority: Optional (was: Major)
> Entity command should provide an option for using a Mapped Superclass
> ---------------------------------------------------------------------
>
> Key: FORGE-133
> URL: https://issues.jboss.org/browse/FORGE-133
> Project: Forge
> Issue Type: Enhancement
> Components: Builtin Plugins, Java EE APIs
> Affects Versions: 1.0.0.Alpha4
> Reporter: Lincoln Baxter III
> Priority: Optional
> Fix For: 1.0.7.Final
>
>
> Instead of putting version and ID in the entity itself, the entity command should allow for using a Mapped superclass (hopefully trying to check for version and id in the process, so that those fields may be omitted from the entity itself.)
> {code}
> /*
> * Copyright 2010 - Lincoln Baxter, III (lincoln(a)ocpsoft.com) - 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.
> */
> import java.io.Serializable;
> import java.util.Date;
> import javax.persistence.Column;
> import javax.persistence.GeneratedValue;
> import javax.persistence.GenerationType;
> import javax.persistence.Id;
> import javax.persistence.MappedSuperclass;
> import javax.persistence.PersistenceException;
> import javax.persistence.PrePersist;
> import javax.persistence.PreUpdate;
> import javax.persistence.Temporal;
> import javax.persistence.TemporalType;
> import javax.persistence.Version;
> @MappedSuperclass
> public abstract class PersistentObject<E extends PersistentObject<?>> implements Serializable
> {
> private static final long serialVersionUID = -1272280183658745494L;
> @Id
> @GeneratedValue(strategy = GenerationType.AUTO)
> @Column(name = "id", updatable = false, nullable = false)
> private Long id = null;
> @Version
> @Column(name = "version")
> private int version = 0;
> @Temporal(TemporalType.TIMESTAMP)
> @Column(name = "lastUpdate")
> private Date lastUpdate;
> @Temporal(TemporalType.TIMESTAMP)
> @Column(name = "createdOn", updatable = false, nullable = false)
> private Date createdOn;
> @PrePersist
> void prePersistSetCreationTimestamp()
> {
> createdOn = new Date();
> }
> @PreUpdate
> void preUpdateSetLastUpdatedTimestamp()
> {
> lastUpdate = new Date();
> }
> protected static boolean getBooleanValue(final Boolean value)
> {
> return Boolean.valueOf(String.valueOf(value));
> }
> public Long getId()
> {
> return id;
> }
> public boolean isPersistent()
> {
> return getId() != null;
> }
> @SuppressWarnings("unchecked")
> public E setId(final Long id)
> {
> if (this.id != null)
> {
> throw new PersistenceException("Cannot alter immutable ID of persistent object with id: " + id);
> }
> this.id = id;
> return (E) this;
> }
> public int getVersion()
> {
> return version;
> }
> @SuppressWarnings("unused")
> private void setVersion(final int version)
> {
> this.version = version;
> }
> public Date getLastUpdate()
> {
> return lastUpdate;
> }
> @SuppressWarnings("unchecked")
> public E setLastUpdate(final Date lastUpdate)
> {
> this.lastUpdate = lastUpdate;
> return (E) this;
> }
> public Date getCreatedOn()
> {
> return createdOn;
> }
> @SuppressWarnings("unchecked")
> public E setCreatedOn(final Date createdOn)
> {
> this.createdOn = createdOn;
> return (E) this;
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (SEAMFORGE-342) Get online help from plugin's javadoc
by Jonathan Fuerth (JIRA)
Get online help from plugin's javadoc
-------------------------------------
Key: SEAMFORGE-342
URL: https://issues.jboss.org/browse/SEAMFORGE-342
Project: Seam Forge
Issue Type: Feature Request
Components: Plugin API
Reporter: Jonathan Fuerth
Priority: Minor
IDEs already have lots of great tooling to help write good javadoc and keep it neatly formatted and up to date. It would be excellent if forge's source of help text for plugins came straight from the javadoc. This could be done either via a doclet that operates on the Java source code, or by scraping the output of the default doclet (like Eclipse will do if you attach generated JavaDoc rather than library source code).
Lowering the barrier to providing high-quality documentation should help encourage plugin authors to provide good help, and in turn that should help everyone pick up and learn Forge faster.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] (FORGE-378) Add "environments" as a first class construct
by Pete Muir (Created) (JIRA)
Add "environments" as a first class construct
---------------------------------------------
Key: FORGE-378
URL: https://issues.jboss.org/browse/FORGE-378
Project: Forge
Issue Type: Feature Request
Reporter: Pete Muir
Assignee: Lincoln Baxter III
For example:
{code}
set environment JBOSS_AS7 --version 7.1.0.Final
{code}
Where JBOSS_AS7 is a built in profile that contains necessary info on various versions of JBoss AS 7.
For example, the persistence plugin could read from this, changing
{code}
persistence setup --provider HIBERNATE --container JBOSS_AS7
{code}
to
{code}
persistence setup
{code}
Or, when setting up CDI, this would remove the need to ask ask which API to use (always use the Java EE BOM with JBoss AS), and as the metadata builds, remove the need to ask the version of the spec BOM to use.
Lot's of other places where this could provide better defaulting, or remove the need to ask questions.
This also seems fairly consistent with the Forge approach - good understanding of the project in question.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] (FORGE-93) AbstractResource.getFullyQualifiedName() returns wrong file path on Windows
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-93?page=com.atlassian.jira.plugin.s... ]
Lincoln Baxter III updated FORGE-93:
------------------------------------
Fix Version/s: 1.0.7.Final
Git Pull Request: https://github.com/forge/core/pull/22 (was: https://github.com/forge/core/pull/22)
Affects Version/s: 1.0.6.Final
Component/s: Resources API
> AbstractResource.getFullyQualifiedName() returns wrong file path on Windows
> ---------------------------------------------------------------------------
>
> Key: FORGE-93
> URL: https://issues.jboss.org/browse/FORGE-93
> Project: Forge
> Issue Type: Bug
> Components: Resources API
> Affects Versions: 1.0.6.Final
> Reporter: Liu Jianhong
> Assignee: Koen Aers
> Priority: Minor
> Fix For: 1.0.0.Alpha4, 1.0.7.Final
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> 1,cd to C:\Users
> 2,Get path use AbstractResource.getFullyQualifiedName() and it returns /Users
> 3,Execute "cd /Users" produces error of "[cd] no such resources:Users"
> So,the following test failed:
> org.junit.ComparisonFailure: expected:</Users[/Administrator]> but was:</Users[]>
> at org.junit.Assert.assertEquals(Assert.java:123)
> at org.junit.Assert.assertEquals(Assert.java:145)
> at org.jboss.forge.shell.test.plugins.builtin.ChangeDirectoryPluginTest.testAbsolutePath(ChangeDirectoryPluginTest.java:137)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:251)
> at org.jboss.arquillian.protocol.local.LocalMethodExecutor.invoke(LocalMethodExecutor.java:40)
> at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:50)
> at org.jboss.arquillian.impl.handler.ContainerTestExecuter.callback(ContainerTestExecuter.java:40)
> at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
> at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
> at org.jboss.arquillian.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:157)
> at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:244)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:207)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.jboss.arquillian.junit.Arquillian$5$1.evaluate(Arquillian.java:225)
> at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:221)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)
> at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months