Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for DB-specific "clean" URLs via frostillicus.AliasManager
- Loading branch information
1 parent
8040f99
commit 49dce44
Showing
13 changed files
with
435 additions
and
11 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
disk-collaborationtoday/Code/Java/frostillicus/AbstractKeyMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package frostillicus; | ||
|
||
import java.util.*; | ||
|
||
public abstract class AbstractKeyMap<K, V> implements Map<K, V> { | ||
|
||
public boolean containsKey(Object key) { throw new UnsupportedOperationException(); } | ||
public boolean containsValue(Object value) { throw new UnsupportedOperationException(); } | ||
|
||
public void clear() { throw new UnsupportedOperationException(); } | ||
public Set<java.util.Map.Entry<K, V>> entrySet() { throw new UnsupportedOperationException(); } | ||
public boolean isEmpty() { throw new UnsupportedOperationException(); } | ||
public Set<K> keySet() { throw new UnsupportedOperationException(); } | ||
public V put(K key, V value) { throw new UnsupportedOperationException(); } | ||
public void putAll(Map<? extends K, ? extends V> m) { throw new UnsupportedOperationException(); } | ||
public V remove(Object key) { throw new UnsupportedOperationException(); } | ||
public int size() { throw new UnsupportedOperationException(); } | ||
public Collection<V> values() { throw new UnsupportedOperationException(); } | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
disk-collaborationtoday/Code/Java/frostillicus/AbstractKeyMap.java.metadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><note class="form" replicaid="85257AD1004C558E" version="9.0" xmlns="http://www.lotus.com/dxl"> | ||
<noteinfo noteid="2cee" sequence="3" unid="ACADEE3180A0B2F985257ADB00781EAD"> | ||
<created><datetime>20121221T165201,73-05</datetime></created> | ||
<modified><datetime>20121221T165202,59-05</datetime></modified> | ||
<revised><datetime>20121221T165202,57-05</datetime></revised> | ||
<lastaccessed><datetime>20121221T165202,57-05</datetime></lastaccessed> | ||
<addedtofile><datetime>20121221T165201,73-05</datetime></addedtofile></noteinfo> | ||
<updatedby><name>CN=Jesse Gallagher/O=Frost</name></updatedby> | ||
<wassignedby><name>CN=Jesse Gallagher/O=Frost</name></wassignedby> | ||
<item name="$Flags"><text>34567Cg~[</text></item> | ||
<item name="$TITLE"><text>frostillicus/AbstractKeyMap.java</text></item> | ||
<item name="$DesignerVersion"><text>8.5.3</text></item> | ||
|
||
|
||
<item name="$FileNames" sign="true"><text>frostillicus/AbstractKeyMap.java</text></item></note> |
54 changes: 54 additions & 0 deletions
54
disk-collaborationtoday/Code/Java/frostillicus/AliasManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package frostillicus; | ||
|
||
import java.util.*; | ||
import java.io.Serializable; | ||
|
||
import com.ibm.xsp.extlib.util.ExtLibUtil; | ||
|
||
import lotus.domino.*; | ||
|
||
public class AliasManager extends AbstractKeyMap<String, String> implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private Map<String, String> cache = new HashMap<String, String>(); | ||
|
||
public AliasManager() throws NotesException { | ||
this.regenerateCache(); | ||
} | ||
|
||
public String get(Object key) { | ||
if(!(key instanceof String)) { throw new IllegalArgumentException(); } | ||
|
||
if(this.cache.containsKey(key)) { | ||
return this.cache.get(key); | ||
} | ||
return (String)key; | ||
} | ||
|
||
@Override | ||
public void clear() { | ||
this.cache.clear(); | ||
try { this.regenerateCache(); } catch(NotesException ne) { } | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
private void regenerateCache() throws NotesException { | ||
Database database = ExtLibUtil.getCurrentDatabase(); | ||
View aliases = database.getView("Aliases"); | ||
aliases.setAutoUpdate(false); | ||
ViewNavigator viewNav = aliases.createViewNav(); | ||
ViewEntry entry = viewNav.getFirst(); | ||
while(entry != null) { | ||
entry.setPreferJavaDates(true); | ||
List<Object> columnValues = entry.getColumnValues(); | ||
|
||
this.cache.put((String)columnValues.get(0), (String)columnValues.get(1)); | ||
|
||
ViewEntry tempEntry = entry; | ||
entry = viewNav.getNext(entry); | ||
tempEntry.recycle(); | ||
} | ||
viewNav.recycle(); | ||
aliases.recycle(); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
disk-collaborationtoday/Code/Java/frostillicus/AliasManager.java.metadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><note class="form" replicaid="85257AD1004C558E" version="9.0" xmlns="http://www.lotus.com/dxl"> | ||
<noteinfo noteid="2cea" sequence="3" unid="390868F8BB48E44585257ADB00780CC1"> | ||
<created><datetime>20121221T165115,85-05</datetime></created> | ||
<modified><datetime>20121221T165116,26-05</datetime></modified> | ||
<revised><datetime>20121221T165116,24-05</datetime></revised> | ||
<lastaccessed><datetime>20121221T165116,24-05</datetime></lastaccessed> | ||
<addedtofile><datetime>20121221T165115,85-05</datetime></addedtofile></noteinfo> | ||
<updatedby><name>CN=Jesse Gallagher/O=Frost</name></updatedby> | ||
<wassignedby><name>CN=Jesse Gallagher/O=Frost</name></wassignedby> | ||
<item name="$Flags"><text>34567Cg~[</text></item> | ||
<item name="$TITLE"><text>frostillicus/AliasManager.java</text></item> | ||
<item name="$DesignerVersion"><text>8.5.3</text></item> | ||
|
||
|
||
<item name="$FileNames" sign="true"><text>frostillicus/AliasManager.java</text></item></note> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"> | ||
<xp:link value="#{url[compositeData.value]}" text="#{compositeData.text}" styleClass="#{compositeData.styleClass}"> | ||
<xp:callback/> | ||
</xp:link> | ||
</xp:view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faces-config> | ||
<faces-config-extension> | ||
<namespace-uri>http://www.ibm.com/xsp/custom</namespace-uri> | ||
<default-prefix>xc</default-prefix> | ||
</faces-config-extension> | ||
<composite-component> | ||
<component-type>link</component-type> | ||
<composite-name>link</composite-name> | ||
<composite-file>/link.xsp</composite-file> | ||
<composite-extension> | ||
<designer-extension> | ||
<in-palette>true</in-palette> | ||
</designer-extension> | ||
</composite-extension> | ||
<property> | ||
<property-name>value</property-name> | ||
<property-class>string</property-class> | ||
</property> | ||
<property> | ||
<property-name>text</property-name> | ||
<property-class>string</property-class> | ||
</property> | ||
<property> | ||
<property-name>styleClass</property-name> | ||
<property-class>string</property-class> | ||
</property> | ||
</composite-component> | ||
</faces-config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><note class="form" replicaid="85257AD1004C558E" version="9.0" xmlns="http://www.lotus.com/dxl"> | ||
<noteinfo noteid="2d02" sequence="4" unid="561A5AC247E7B46F85257ADB0078453D"> | ||
<created><datetime>20121221T165340,45-05</datetime></created> | ||
<modified><datetime>20121221T165340,90-05</datetime></modified> | ||
<revised><datetime>20121221T165340,88-05</datetime></revised> | ||
<lastaccessed><datetime>20121221T165340,88-05</datetime></lastaccessed> | ||
<addedtofile><datetime>20121221T165340,45-05</datetime></addedtofile></noteinfo> | ||
<updatedby><name>CN=Jesse Gallagher/O=Frost</name></updatedby> | ||
<wassignedby><name>CN=Jesse Gallagher/O=Frost</name></wassignedby> | ||
<item name="$TITLE"><text>link.xsp</text></item> | ||
<item name="$Flags"><text>gC~4;</text></item> | ||
|
||
|
||
<item name="$FileNames" sign="true"><text>link.xsp</text></item> | ||
|
||
</note> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<note class='form' xmlns='http://www.lotus.com/dxl' version='9.0' replicaid='85257AD1004C558E'> | ||
<noteinfo noteid='2cf6' unid='EDE1D25546AED14F85257ADB00782C89' sequence='4'> | ||
<created><datetime>20121221T165237,21-05</datetime></created> | ||
<modified><datetime>20121221T165732,68-05</datetime></modified> | ||
<revised><datetime>20121221T165732,66-05</datetime></revised> | ||
<lastaccessed><datetime>20121221T165732,66-05</datetime></lastaccessed> | ||
<addedtofile><datetime>20121221T165237,21-05</datetime></addedtofile></noteinfo> | ||
<updatedby><name>CN=Jesse Gallagher/O=Frost</name></updatedby> | ||
<wassignedby><name>CN=Jesse Gallagher/O=Frost</name></wassignedby> | ||
<item name='$Comment' sign='true'><text/></item> | ||
<item name='$SubForm_RepIDs' sign='true'><text>0000000000000000</text></item> | ||
<item name='Date' summary='false' sign='true'> | ||
<rawitemdata type='400'> | ||
AAAAAAAAAAA= | ||
</rawitemdata></item> | ||
<item name='Time' summary='false' sign='true'> | ||
<rawitemdata type='400'> | ||
AAAAAAAAAAA= | ||
</rawitemdata></item> | ||
<item name='DateTime' summary='false' sign='true'> | ||
<rawitemdata type='400'> | ||
AAAAAAAAAAA= | ||
</rawitemdata></item> | ||
<item name='DateComposed' summary='false' sign='true'> | ||
<rawitemdata type='400'> | ||
AAAAAAAAAAA= | ||
</rawitemdata></item> | ||
<item name='DateModified' summary='false' sign='true'> | ||
<rawitemdata type='400'> | ||
AAAAAAAAAAA= | ||
</rawitemdata></item> | ||
<item name='$HTMLCode' sign='true'> | ||
<rawitemdata type='1'> | ||
X/8QAAIADwAHAAAAAAAAAA== | ||
</rawitemdata></item> | ||
<item name='$TITLE'><text>Alias</text></item> | ||
<item name='$Info' sign='true'> | ||
<rawitemdata type='1'> | ||
hhgBAIAAAAAAgAAAAQABAP///wAQAAAA | ||
</rawitemdata></item> | ||
<item name='$WindowTitle' sign='true'><formula>"Alias"</formula></item> | ||
<item name='$Flags'><text/></item> | ||
<item name='$XPageAlt'><text>Project.xsp</text></item> | ||
<item name='$DesignerVersion'><text>8.5.3</text></item> | ||
<item name='$$ScriptName' summary='false' sign='true'><text>Project</text></item> | ||
<item name='From' placeholder='true'> | ||
<rawitemdata type='0'> | ||
</rawitemdata></item> | ||
<item name='To' placeholder='true'> | ||
<rawitemdata type='0'> | ||
</rawitemdata></item> | ||
<item name='$$Title' placeholder='true'> | ||
<rawitemdata type='0'> | ||
</rawitemdata></item> | ||
<item name='$$Creator' placeholder='true'> | ||
<rawitemdata type='0'> | ||
</rawitemdata></item> | ||
<item name='$Fields'><textlist><text>$$Creator</text><text>$$Title</text><text | ||
>To</text><text>From</text></textlist></item> | ||
<item name='$Body' sign='true'> | ||
<rawitemdata type='1'> | ||
gQKC/1oAAQAAAAAAAAAAAKAFAACgBQAAAAAAAAAAAAAAAA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AAAAAAAAAAAIr/OACEAAAFADACAAAAAAAAAgEAAAoKAAAAAAAAAAkAAAAAAAoAAAAIAPQA | ||
AwAkJENyZWF0b3IA3gYAAIr/hf8IAAEAAAo= | ||
</rawitemdata></item> | ||
<item name='$V5ACTIONS' sign='true'> | ||
<rawitemdata type='1'> | ||
vRwjAAAAAQABAAAAAQAAAAAAAAAAAAAACAACAHn/bAABANTQyAABAAAAAAAJAAAAAAABANTQyAAA | ||
AB8AAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPz/OgAAAAAAAQAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAC+/zwAAAABAAQAjwAAAQYAAAAEAAAARGVsZXRlIAAAABIA | ||
AgDaBwAAAAAAAO0BAwAHAAwABQAJMFMwRQC+/5YAAAABAAUADwAAAAQAXAABAAAARWRpdCAAAAAS | ||
AAIA6AcAAAAAAADtAQMABwAMAAUACTBTMEUAXAAKAAQAAAA+AIsAAgApAQAAAAAAAPsCKgH7AVQB | ||
AAAAAAAAAAAQQA4CAgAFAAAAAAAAAPQAtAJ5AAoCBAAeARwCAwAHABgAEQAJNlM5UzEwUzExUzEy | ||
UzE4UwC+/4wAAAABAAAAkwEQAAQAAAACAAAAU2F2ZXIACgAEAAAARgD7AAUBAQADAFdlYgAKAuQA | ||
HQKvACwAIAACAMYLAAAAAAAA7QECAOgHAAAAAAAA7QGzAq4ADAABAAAArgAEALUDAwAHACYAHwAJ | ||
MlJUNVM2UzhTMTBSVFQxNVJUVDE5UlQyMVJUMjJSAPb/OQAAAAAAAwATABcAAAAAAAAAAAAAAAAA | ||
AAAAAAAAAAB0YW5nb1xkb2N1bWVudC1zYXZlLmdpZj++/5YAAAABAAAAkwEQAA4AAAADAAAAU2F2 | ||
ZSBhbmQgQ2xvc2Vy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