syncope-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Martelli <fabio.marte...@gmail.com>
Subject Re: [GSoC 2016] [Syncope 808]
Date Tue, 21 Jun 2016 09:34:58 GMT
Il 21/06/2016 04:36, Nuwan Sameera ha scritto:
>
> Hi,
> I need to set template to new mail template or report template. I 
> tried using setMailTemplate(key,format,input stream). There are some 
> problems. Please give me java example to this.
>
Hi Nuwan, please take a look at [1] to solve your issue.
In particular, set template by using setFormat like as shown below

...
         // 3. set TEXT
         String textTemplate = "Hi there, I am ${username}.";
         mailTemplateService.setFormat(key, MailTemplateFormat.TEXT, 
IOUtils.toInputStream(textTemplate, SyncopeConstants.DEFAULT_CHARSET));
...

About your code, please take care to remove all unused imports, to 
declare final variable when needed and to provide a valid 
serialVersionUID for every serializable class.

Furthermore, it seems that the plugin does not work fine:

  * Right clicking just delete operation is available.
  * Something seems to be missed: see the attachment.
  * Demo server was rebooting when I tried the first time to connect to.
    I tried out again after, when it was ready to accept requests again,
    but it continued to fail just by showing what you can see in the
    attachment.
  * If I do a double-click it asks for a file format. Unfortunately it
    asks for the format by showing always the same select options. It
    seems that position of the double-click is not relevant.

Please, let me know if I'm missing some step.

Regards,
F.

[1] 
https://github.com/apache/syncope/blob/7bd895148270969737496c17fb918219efbac0dd/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MailTemplateITCase.java#L62-L152
>
> Regards,
> Nuwan Sameera
>
> On 20 Jun 2016 12:45, nuwansameera74@gmail.com 
> <mailto:nuwansameera74@gmail.com> wrote:
>
>     Hi,
>     I completed add, remove template. Also view template data in
>     editor view. Source code available in github.
>     I tried to do edit and save feature of template.
>     I tried using setTemplate() method. Not still completed.
>     Please give me feedback.
>
>     Regards.
>     Nuwan sameera.
>
>     On 8 Jun 2016 01:48, "Fabio Martelli" <fabio.martelli@gmail.com
>     <mailto:fabio.martelli@gmail.com>> wrote:
>
>         Hi Nuwan, go on for the moment.
>         Refinements are welcome later, at more deeply integration time.
>
>         Regards,
>         F.
>
>         Il 7 giugno 2016 17:33:34 CEST, Nuwan Sameera
>         <nuwansameera74@gmail.com <mailto:nuwansameera74@gmail.com>>
>         ha scritto:
>
>             Hi,
>
>               OK I will do it. Is others are ok.
>             Can I continue works this manner?
>
>             Regards,
>             Nuwan Sameera.
>
>             On Tue, Jun 7, 2016 at 8:57 PM, Fabio Martelli
>             <fabio.martelli@gmail.com
>             <mailto:fabio.martelli@gmail.com>> wrote:
>
>                 Hi, it seems that the new version preserve the theme.
>                 Please try to find a proper solution to edit
>                 configuration.
>
>                 Please let me know.
>                 Regards,
>                 F.
>
>                 On Tue, Jun 7, 2016 at 10:55 AM, Nuwan Sameera
>                 <nuwansameera74@gmail.com
>                 <mailto:nuwansameera74@gmail.com>> wrote:
>                 > Hi,
>                 >
>                 > I updated my plugin. Source code available in [1]
>                 >   
>                 [1]https://github.com/NuwanSameera/syncope/tree/master/netbeans-plugin
>                 >
>                 > Also following issues are solved.
>                 >
>                 >     1. Plugin installation/use seems to corrupt my
>                 Netbeans theme.
>                 > Remove UI theme.
>                 >
>                 >      2. I cannot find the way to change plugin
>                 configuration
>                 > Now data save UserData.txt in root folder.
>                 configuration can change by edit
>                 > it. It might be changed in proper way.
>                 >
>                 > No way to edit template content (take administration
>                 console)
>                 > No way to edit a specific format
>                 >
>                 > These are solved.
>                 >
>                 > Please check and give me feedback.
>                 >
>                 > Thanks and Regards,
>                 >
>                 > Nuwan Sameera.
>                 >
>                 >
>                 > On Mon, Jun 6, 2016 at 2:12 PM, Fabio Martelli
>                 <fabio.martelli@gmail.com
>                 <mailto:fabio.martelli@gmail.com>>
>                 > wrote:
>                 >>
>                 >> Il 06/06/2016 10:22, Nuwan Sameera ha scritto:
>                 >>
>                 >> Hi,
>                 >>
>                 >> Please give me response for my plugin development
>                 available in
>                 >>      [1]
>                 >>
>                 https://github.com/NuwanSameera/syncope/tree/master/netbeans-plugin
>                 >>
>                 >> Steps in above mail.
>                 >>
>                 >> Hi Nuwan, see my comments below.
>                 >>
>                 >> Plugin installation/use seems to corrupt my
>                 Netbeans theme.
>                 >> I cannot find the way to change plugin configuration
>                 >> No way to edit template content (take
>                 administration console [1] as
>                 >> reference)
>                 >> No way to edit a specific format
>                 >> Not sure about the position btw keep it there for
>                 the moment
>                 >>
>                 >> Regards,
>                 >> F.
>                 >>
>                 >> [1]
>                 http://syncope-vm.apache.org:9080/syncope-console/login?1
>                 >>
>                 >>
>                 >> Regards.
>                 >> Nuwan Sameera.
>                 >>
>                 >> On Fri, Jun 3, 2016 at 11:07 AM, Nuwan Sameera
>                 <nuwansameera74@gmail.com
>                 <mailto:nuwansameera74@gmail.com>>
>                 >> wrote:
>                 >>>
>                 >>> Hi,
>                 >>>  Done. Plugin build with syncope. Thanks. Source
>                 code in [1]
>                 >>>
>                 >>>   [1]
>                 https://github.com/NuwanSameera/syncope/tree/master/netbeans-plugin
>                 >>>
>                 >>> Steps to build and run plugin.
>                 >>>
>                 >>> (01) go to syncope/netbeans-plugin and run mvn
>                 clean install
>                 >>> (02) After build success create
>                 netbeans-plugin-2.0.0-SNAPSHOT.jar and
>                 >>> netbeans-plugin-2.0.0-SNAPSHOT.nbm in /target folder
>                 >>> (03) Open netbaens ide and go to
>                 tools->pluging->Downloaded->Add Plugins
>                 >>> and add .nbm file and click install
>                 >>>
>                 >>>   Then it work as netbeans plugin.
>                 >>>
>                 >>> Also we can test this easily.
>                 >>>
>                 >>> (01) Open netbeans-plugin source using netbeans IDE.
>                 >>> (02) Right click on project and run Clean and Build.
>                 >>> (03) After build success right click and select Run
>                 >>>
>                 >>>   Then open new netbeans instance with installed
>                 plugin.
>                 >>>
>                 >>> Plugin Running steps.
>                 >>>
>                 >>> (01) Go to Window->Apache Syncope. Then open
>                 resource tree.
>                 >>> (02) Load existing mail,report templates to tree.
>                 >>> (03) When double click on element open instance on
>                 editor pane.
>                 >>> (04) You can create new element using right click
>                 and select New.
>                 >>> (05) You can delete element using right click and
>                 select Delete.
>                 >>>
>                 >>> Please check run and give me feed back.
>                 >>>
>                 >>> Regards.
>                 >>> Nuwan Sameera.
>                 >>>
>                 >>> On Fri, Jun 3, 2016 at 7:59 PM, Nuwan Sameera
>                 <nuwansameera74@gmail.com
>                 <mailto:nuwansameera74@gmail.com>>
>                 >>> wrote:
>                 >>>>
>                 >>>> Hi,
>                 >>>>
>                 >>>> Thank you. I try this.
>                 >>>> Now can I send pr to upstream.
>                 >>>>
>                 >>>> Regards.
>                 >>>> Nuwan sameera
>                 >>>>
>                 >>>> On 3 Jun 2016 7:48 pm, "Fabio Martelli"
>                 <fabio.martelli@gmail.com
>                 <mailto:fabio.martelli@gmail.com>>
>                 >>>> wrote:
>                 >>>>>
>                 >>>>> Il 03/06/2016 13:16, Nuwan Sameera ha scritto:
>                 >>>>>
>                 >>>>> Hi,
>                 >>>>>
>                 >>>>> Thank you. It is solved. But next step given a
>                 problem.
>                 >>>>>
>                 >>>>> Failed to execute goal
>                 >>>>>
>                 org.codehaus.mojo:ianal-maven-plugin:1.0-alpha-1:verify-legal-files
>                 >>>>> (default) on project netbeans-plugin: Artifact
>                 does not contain any legal
>                 >>>>> files: netbeans-plugin-2.0.0-SNAPSHOT.jar
>                 >>>>>
>                 >>>>> Sorry for the disturb.
>                 >>>>>
>                 >>>>> Override ianal plugin configuration
>                 >>>>>
>                 >>>>>       <plugin>
>                 >>>>>  <groupId>org.codehaus.mojo</groupId>
>                 >>>>>  <artifactId>ianal-maven-plugin</artifactId>
>                 >>>>>  <version>1.0-alpha-1</version>
>                 >>>>>  <configuration>
>                 >>>>>  <skip>true</skip>
>                 >>>>>  </configuration>
>                 >>>>>       </plugin>
>                 >>>>>
>                 >>>>>
>                 http://lmgtfy.com/?q=Disable+a+Maven+plugin+defined+in+a+parent+POM
>                 >>>>> ;)
>                 >>>>>
>                 >>>>> Hope this help.
>                 >>>>> Regards,
>                 >>>>> F.
>                 >>>>>
>                 >>>>>
>                 >>>>> Regards,
>                 >>>>> Nuwan Sameera.
>                 >>>>>
>                 >>>>>
>                 >>>>> On Fri, Jun 3, 2016 at 4:32 PM, Fabio Martelli
>                 >>>>> <fabio.martelli@gmail.com
>                 <mailto:fabio.martelli@gmail.com>> wrote:
>                 >>>>>>
>                 >>>>>> Il 03/06/2016 12:59, Nuwan Sameera ha scritto:
>                 >>>>>>
>                 >>>>>> Hi,
>                 >>>>>>
>                 >>>>>> I try to build plugin by adding following to
pom.
>                 >>>>>>
>                 >>>>>> <properties>
>                 >>>>>> ...
>                 >>>>>>  <checkstyle.skip>true</checkstyle.skip>
>                 >>>>>>
>                 >>>>>>
>                 >>>>>> Add
>                 >>>>>> <rat.skip>true</rat.skip>
>                 >>>>>>
>                 >>>>>> Regards,
>                 >>>>>> F.
>                 >>>>>>
>                 >>>>>>
>                 >>>>>> ...
>                 >>>>>> </properties>
>                 >>>>>>
>                 >>>>>>
>                 >>>>>> But given an error. Error log
>                 >>>>>>
>                 >>>>>> Failed to execute goal
>                 org.apache.rat:apache-rat-plugin:0.11:check
>                 >>>>>> (rat-check) on project netbeans-plugin: Too
>                 many files with unapproved
>                 >>>>>> license: 16 See RAT report in:
>                 >>>>>>
>                 /home/nuwan/Projects/gsoc/syncope/netbeans-plugin/target/rat.txt
>                 -> [Help 1]
>                 >>>>>>
>                 >>>>>> Please help.
>                 >>>>>>
>                 >>>>>> Regards.
>                 >>>>>> Nuwan Sameera.
>                 >>>>>>
>                 >>>>>> On Fri, Jun 3, 2016 at 3:34 PM, Fabio Martelli
>                 >>>>>> <fabio.martelli@gmail.com
>                 <mailto:fabio.martelli@gmail.com>> wrote:
>                 >>>>>>>
>                 >>>>>>> Hi, see my comments/questions in-line.
>                 >>>>>>> Regards,
>                 >>>>>>> F.
>                 >>>>>>>
>                 >>>>>>> Il 03/06/2016 10:37, Nuwan Sameera ha scritto:
>                 >>>>>>>
>                 >>>>>>> Hi,
>                 >>>>>>>
>                 >>>>>>> I added java code to list existing mail
>                 templates and report
>                 >>>>>>> templates to plugin tree. My codes available
in
>                 >>>>>>>
>                 >>>>>>> Please, provide me with a list of steps
to see
>                 results in netbeans.
>                 >>>>>>> build, install plugin, restart .... and
....
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>>
>                 https://github.com/NuwanSameera/syncope/tree/master/netbeans-plugin
>                 >>>>>>>
>                 >>>>>>> Currently plugin not in maven tree because
>                 check-style given error.
>                 >>>>>>> But plugin can build and run without errors.
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>> Why don't you try to develop without including
>                 in your project
>                 >>>>>>> syncope sources?
>                 >>>>>>> It should be enough to specify the parent.
>                 >>>>>>> Checkstyle can be disabled for your project;
>                 you could add the
>                 >>>>>>> following property into your pom.xml:
>                 >>>>>>>
>                 >>>>>>> <properties>
>                 >>>>>>> ...
>                 >>>>>>>  <checkstyle.skip>true</checkstyle.skip>
>                 >>>>>>> ...
>                 >>>>>>> </properties>
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>> Please check and give me feedback.
>                 >>>>>>>
>                 >>>>>>> Regards.
>                 >>>>>>> Nuwan Sameera.
>                 >>>>>>>
>                 >>>>>>> On Mon, May 30, 2016 at 1:37 PM, Fabio Martelli
>                 >>>>>>> <fabio.martelli@gmail.com
>                 <mailto:fabio.martelli@gmail.com>> wrote:
>                 >>>>>>>>
>                 >>>>>>>> Il 30/05/2016 10:00, Nuwan Sameera ha
scritto:
>                 >>>>>>>>>
>                 >>>>>>>>> Hi,
>                 >>>>>>>>>  I do changes in netbeans plugin
>                 development. These changes
>                 >>>>>>>>> available in
>                 >>>>>>>>>  [1]
>                 >>>>>>>>>
>                 https://github.com/NuwanSameera/syncope/tree/master/netbeans-plugin
>                 >>>>>>>>>
>                 >>>>>>>>> (01)  nbm folder created when netbeans
>                 module creation. If we
>                 >>>>>>>>> rename it manifest.mf don't edit
with
>                 changes. I cannot find a method to
>                 >>>>>>>>> change default manifest.mf path.
>                 >>>>>>>>> (02)  .java file and .form file
create on
>                 same folder and I cannot
>                 >>>>>>>>> find way to move .form file to resource
>                 directory.
>                 >>>>>>>>>  (03) Rename Bundle.properties to
>                 bundle.properties.
>                 >>>>>>>>>  (04) Change image position and
path.
>                 >>>>>>>>>
>                 >>>>>>>>>  Please give me solutions for the
(01) and (02).
>                 >>>>>>>>
>                 >>>>>>>> Please, leave it as is and go on.
>                 >>>>>>>> We will take a look forward.
>                 >>>>>>>>>
>                 >>>>>>>>>  Also am I correct with (03) and
(04)
>                 >>>>>>>>
>                 >>>>>>>> ok.
>                 >>>>>>>>>
>                 >>>>>>>>>
>                 >>>>>>>>> Thanks and Regards.
>                 >>>>>>>>
>                 >>>>>>>> Regards,
>                 >>>>>>>> F.
>                 >>>>>>>>
>                 >>>>>>>>
>                 >>>>>>>> --
>                 >>>>>>>> Fabio Martelli
>                 >>>>>>>>
>                 https://it.linkedin.com/pub/fabio-martelli/1/974/a44
>                 >>>>>>>> http://blog.tirasa.net/author/fabio/index.html
>                 >>>>>>>>
>                 >>>>>>>> Tirasa - Open Source Excellence
>                 >>>>>>>> http://www.tirasa.net/
>                 >>>>>>>>
>                 >>>>>>>> Apache Syncope PMC
>                 >>>>>>>> http://people.apache.org/~fmartelli/
>                 <http://people.apache.org/%7Efmartelli/>
>                 >>>>>>>>
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>> --
>                 >>>>>>> Nuwan Sameera.
>                 >>>>>>> Undergraduate,
>                 >>>>>>> Electronic and Telecommunication Engineering,
>                 >>>>>>> University of Moratuwa.
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>>
>                 >>>>>>> --
>                 >>>>>>> Fabio Martelli
>                 >>>>>>>
>                 https://it.linkedin.com/pub/fabio-martelli/1/974/a44
>                 >>>>>>> http://blog.tirasa.net/author/fabio/index.html
>                 >>>>>>>
>                 >>>>>>> Tirasa - Open Source Excellence
>                 >>>>>>> http://www.tirasa.net/
>                 >>>>>>>
>                 >>>>>>> Apache Syncope PMC
>                 >>>>>>> http://people.apache.org/~fmartelli/
>                 <http://people.apache.org/%7Efmartelli/>
>                 >>>>>>
>                 >>>>>>
>                 >>>>>>
>                 >>>>>>
>                 >>>>>> --
>                 >>>>>> Nuwan Sameera.
>                 >>>>>> Undergraduate,
>                 >>>>>> Electronic and Telecommunication Engineering,
>                 >>>>>> University of Moratuwa.
>                 >>>>>>
>                 >>>>>>
>                 >>>>>>
>                 >>>>>> --
>                 >>>>>> Fabio Martelli
>                 >>>>>>
>                 https://it.linkedin.com/pub/fabio-martelli/1/974/a44
>                 >>>>>> http://blog.tirasa.net/author/fabio/index.html
>                 >>>>>>
>                 >>>>>> Tirasa - Open Source Excellence
>                 >>>>>> http://www.tirasa.net/
>                 >>>>>>
>                 >>>>>> Apache Syncope PMC
>                 >>>>>> http://people.apache.org/~fmartelli/
>                 <http://people.apache.org/%7Efmartelli/>
>                 >>>>>
>                 >>>>>
>                 >>>>>
>                 >>>>>
>                 >>>>> --
>                 >>>>> Nuwan Sameera.
>                 >>>>> Undergraduate,
>                 >>>>> Electronic and Telecommunication Engineering,
>                 >>>>> University of Moratuwa.
>                 >>>>>
>                 >>>>>
>                 >>>>>
>                 >>>>> --
>                 >>>>> Fabio Martelli
>                 >>>>> https://it.linkedin.com/pub/fabio-martelli/1/974/a44
>                 >>>>> http://blog.tirasa.net/author/fabio/index.html
>                 >>>>>
>                 >>>>> Tirasa - Open Source Excellence
>                 >>>>> http://www.tirasa.net/
>                 >>>>>
>                 >>>>> Apache Syncope PMC
>                 >>>>> http://people.apache.org/~fmartelli/
>                 <http://people.apache.org/%7Efmartelli/>
>                 >>>
>                 >>>
>                 >>>
>                 >>>
>                 >>> --
>                 >>> Nuwan Sameera.
>                 >>> Undergraduate,
>                 >>> Electronic and Telecommunication Engineering,
>                 >>> University of Moratuwa.
>                 >>
>                 >>
>                 >>
>                 >>
>                 >> --
>                 >> Nuwan Sameera.
>                 >> Undergraduate,
>                 >> Electronic and Telecommunication Engineering,
>                 >> University of Moratuwa.
>                 >>
>                 >>
>                 >>
>                 >> --
>                 >> Fabio Martelli
>                 >> https://it.linkedin.com/pub/fabio-martelli/1/974/a44
>                 >> http://blog.tirasa.net/author/fabio/index.html
>                 >>
>                 >> Tirasa - Open Source Excellence
>                 >> http://www.tirasa.net/
>                 >>
>                 >> Apache Syncope PMC
>                 >> http://people.apache.org/~fmartelli/
>                 <http://people.apache.org/%7Efmartelli/>
>                 >
>                 >
>                 >
>                 >
>                 > --
>                 > Nuwan Sameera.
>                 > Undergraduate,
>                 > Electronic and Telecommunication Engineering,
>                 > University of Moratuwa.
>
>
>
>
>         -- Inviato dal mio cellulare Android con K-9 Mail.
>


-- 
Fabio Martelli
https://it.linkedin.com/pub/fabio-martelli/1/974/a44
http://blog.tirasa.net/author/fabio/index.html

Tirasa - Open Source Excellence
http://www.tirasa.net/

Apache Syncope PMC
http://people.apache.org/~fmartelli/


Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message