I have created a screen on which user enters issues ID for particular days.
Now, how can i store these issue IDs and associated days into database for selected user ?
can you please share me detail steps to proceed.
Thank You
Community moderators have prevented the ability to post new answers.
hi dhaval,
you can start working on active objects for your requirement.
https://developer.atlassian.com/display/DOCS/Getting+Started+with+Active+Objects
regards,
tousif shaikh.
Hi ,
i have been follwing the activeobjects tutorial and added - activeobject dependencies:
< dependency > < groupId >com.atlassian.activeobjects</ groupId > < artifactId >activeobjects-plugin</ artifactId > < version >${ao.version}</ version > < scope >provided</ scope > </ dependency > and component reference.
Now, in eclipse , when i try to create entity then, unable to find "
net.java.ao.Entity" namespace to extend the interface.intelligence shows me - "com.atlassian.jira.entity", "org.dom4j" , "org.w3c.dom"
and net.* not found.
Developing plugin version : jira 5.1.8
can you please tell me how do i have to add missing dependency or packge.
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
add entry in atlassian-plugin.xml .
<ao key="ao-module">
<description>The module configuring the Active Objects service used by this plugin</description>
<entity>com.custom.yourclassforentity</entity>
</ao>
<component-import key="ao" name="Active Objects service" interface="com.atlassian.activeobjects.external.ActiveObjects">
<description>Component to access Active Objects functionality from the plugin</description>
</component-import>
it should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my eclipse editor, unabl e to find "net.java.ao.Entity" namespace .
Editor Intellience unable to show me , "net.java..."
Do i need to add any additonal package for - "net.java.ao.Entity" namespace.
My pom.xml contains:
<
dependency
>
<
groupId
>com.atlassian.activeobjects</
groupId
>
<
artifactId
>activeobjects-plugin</
artifactId
>
<
version
>${ao.version}</
version
>
<
scope
>provided</
scope
>
</
dependency
>
<dependency>
<groupId>com.atlassian.labs</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>0.5</version>
<type>atlassian-plugin</type>
</dependency>
atlassian-xml:
<component-import key="ao" name="Active Objects service" interface="com.atlassian.activeobjects.external.ActiveObjects">
<description>Component to access Active Objects functionality from the plugin</description>
</component-import>
<ao key="ao-module">
<description>The module configuring the Active Objects service used by this plugin</description>
<entity>com.company.jira.plugin.Reports.aoentities.InterfaceNameWhichExtendsEntity</entity>
</ao>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
update pom.xml and try . Refresh project
<dependency>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>0.9.6</version>
<scope>provided</scope>
</dependency>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have included your mentioned dependency block and also, in
pom.xml , have below block:
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<pluginArtifacts>
<pluginArtifact>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>0.9.6</version>
</pluginArtifact>
<pluginArtifact>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-jira-spi</artifactId>
<version>0.9.6</version>
</pluginArtifact>
</pluginArtifacts>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
</configuration>
</plugin>
I have compiled the code after that, through "atlas-cli --cli port 1025" and restrated eclipse .
And again tried to type - "net.java.ao.Entity" but this namespace was not appear through eclipse intelligence and shown me in red line only.
Is there any other dependency - refers "net.java.ao" package ?
http://activeobjects.java.net/0.8.2/api/net/java/ao/package-summary.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can get - com.atlassian.activeobjects and com.atlassian.activeobjects.spi name spaces
but not showing me - "net.java.ao"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Changed version from 0.9.6 to 0.20 and again compile through atlas-cli and succeed. Also, command prompt log shows download activeobject library texts.
Then, created Entity file as below:
package com.company.jira.plugin.Reports.aoentities;
import net.java.ao.Entity; //giving same error "The import net.java cannot be resolved"
public interface PlanIssues extends Entity { //"Entity red line error"
//
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have added manually - build path - external JAR file reference from .m2 repository/net/java/dev/activeobject/0.20/jar file and it resolves eclipse error.
so, its fine to go with this for now.
I am not sure , why i need to manually add reference even though downloaded correctly through pom.xml dependencies.
Thanks for your comments.
Dhaval soni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had to clean my entire area, after which the active objects plugin downloaded correctly and added itself (without me edditing my jars)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works!! Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pom.xml
<dependency>
<groupId>com.atlassian.labs</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>0.5</version>
<type>atlassian-plugin</type>
</dependency>
atlassian-plugin.xml
<ao key="ao-issueConfig">
<description>The module configuring the Active Objects service used by this plugin</description>
<entity>com.POJOCLASSREF</entity>
</ao>
POJOCLASSREF.java
public interface POJOCLASSREF extends Entity
{
// getter and setter methods
}
MainJAVACLASS.java
Depends on plugin module you can use ao, eg. Use ActiveObject in construction injection.
public class MainJAVACLASS
{
private final ActiveObjects ao;
}
public MainJAVACLASS(ActiveObject ao)
{
this.ao=ao;
}
and use ao object where ever you want in bussiness logic.
to store data in to DB
use ao scenario like this
ao.executeInTransaction(new TransactionCallback<POJOCLASSREF>() {
public IssueConfig doInTransaction()
{
final POJOCLASSREF pojoref=ao.create(POJOCLASSREF.class);
// USE SETTER METHOD TO SET PARAMETERS TO STORE IN DB
return pojoref;
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the comments. your commented stuff will also help me.. once resolved this namespace issue.
actually, i m facing an issue to get "net.java.ao.Entity" namespace as i posted in my last comment above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the package for "TransactionCallback<POJOCLASSREF>()" ?
It shows me - "TransactionCallback is not generic...."
i refer "com.atlassian.sal.api.transaction.TransactionCallback;".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It was resolve by removing argument and keep as "TransactionCallback()"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@dhaval - did you ever solve this? I feel like I am about to rip my hair out, but assume it is something trivial I am missing. -aaron
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.