net.sourceforge.jfacets.simpleprofiles
Class SimpleProfileRepository

java.lang.Object
  extended by net.sourceforge.jfacets.simpleprofiles.SimpleProfileRepository
All Implemented Interfaces:
IProfileRepository

public class SimpleProfileRepository
extends Object
implements IProfileRepository

The SimpleProfileRepository, a very basic PR implementation that allows to quickly get started with JFacets. It can be used directly in your application as a "mock" of the final real graph.
At the moment, it creates a tree-like graph that's used for JFacets tests :


This graph is created in the default constructor, you just have to override it in order to get another graph.


Constructor Summary
SimpleProfileRepository()
           
 
Method Summary
 SimpleProfile createProfile(String id)
           
 void destroy()
           
protected  void feed()
          To be overridden to instantiate the graph using the createProfile() method.
 IProfile getProfileById(String profileId)
          Return a profile by its ID
 IProfile[] getSuperProfiles(IProfile profile)
          Return passed profile's parents in an array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleProfileRepository

public SimpleProfileRepository()
Method Detail

destroy

public void destroy()

feed

protected void feed()
To be overridden to instantiate the graph using the createProfile() method.


createProfile

public SimpleProfile createProfile(String id)

getProfileById

public IProfile getProfileById(String profileId)
Description copied from interface: IProfileRepository
Return a profile by its ID

Specified by:
getProfileById in interface IProfileRepository

getSuperProfiles

public IProfile[] getSuperProfiles(IProfile profile)
Description copied from interface: IProfileRepository
Return passed profile's parents in an array

Specified by:
getSuperProfiles in interface IProfileRepository


Copyright © 2012. All Rights Reserved.