BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.security.UserPreferences Class Reference
Inheritance diagram for org.turro.elephant.impl.security.UserPreferences:
Collaboration diagram for org.turro.elephant.impl.security.UserPreferences:

Public Member Functions

boolean isEqual (String id)
 
Object put (String key, Object value)
 

Static Public Member Functions

static UserPreferences getSystem ()
 
static UserPreferences getInstance (String id)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 29 of file UserPreferences.java.

Member Function Documentation

◆ getInstance()

static UserPreferences org.turro.elephant.impl.security.UserPreferences.getInstance ( String  id)
static

Definition at line 41 of file UserPreferences.java.

41  {
42  File root = new File(ElephantContext.getRealPath(PREFERENCES_ROOT));
43  if (!root.exists()) {
44  root.mkdirs();
45  }
46  File file = new File(ElephantContext.getRealPath(PREFERENCES_ROOT + "/" + id + ".preferences"));
47  UserPreferences up = (UserPreferences) Serializer.deserialize(file);
48  if(up == null) {
49  up = new UserPreferences();
50  }
51  up.setId(id);
52  up.setFile(file);
53  return up;
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSystem()

static UserPreferences org.turro.elephant.impl.security.UserPreferences.getSystem ( )
static

Definition at line 37 of file UserPreferences.java.

37  {
38  return getInstance("ElephantSystem");
39  }
static UserPreferences getInstance(String id)
Here is the call graph for this function:

◆ isEqual()

boolean org.turro.elephant.impl.security.UserPreferences.isEqual ( String  id)

Definition at line 56 of file UserPreferences.java.

56  {
57  return this.id.equals(id);
58  }
Here is the caller graph for this function:

◆ put()

Object org.turro.elephant.impl.security.UserPreferences.put ( String  key,
Object  value 
)

Definition at line 61 of file UserPreferences.java.

61  {
62  Object obj = super.put(key, value);
63  Serializer.serialize(file, this);
64  return obj;
65  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: