X
- type key parses topublic abstract class PublicKeyComposite<X> extends AppUserComposite<AppUser,PublicKeyComposite> implements UpdateNoteProvider<AppUser>, AnonymisingComposite<AppUser>, SummaryContributer<AppUser>, MetaDataContributer<AppUser>, TemplateContributor<AppUser>, HistoryFieldContributor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NORMALISED_PUBLIC_KEY_META_ATTR |
static java.lang.String |
PUBLIC_KEY |
static java.lang.String |
PUBLIC_KEY_META_ATTR |
static Feature |
SSH_REQUIRE_RSA_FEATURE |
Constructor and Description |
---|
PublicKeyComposite(AppUserFactory fac) |
Modifier and Type | Method and Description |
---|---|
void |
addAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes,
AppUser target)
Add to the set of attributes.
|
void |
addMetaData(java.util.Map<java.lang.String,java.lang.Object> attributes,
AppUser person)
Add to the set of meta-data.
|
java.util.Set<java.lang.String> |
addOptional(java.util.Set<java.lang.String> optional)
generate the set of optional fields to be used to provide class specific defaults
in form creation/update.
|
java.util.Map<java.lang.String,Selector> |
addSelectors(java.util.Map<java.lang.String,Selector> selectors)
Get a Map of selectors to use for forms of this type.
|
void |
addToHistorySpecification(TableSpecification spec)
add fields to the history table default specification.
|
java.util.Map<java.lang.String,java.lang.String> |
addTranslations(java.util.Map<java.lang.String,java.lang.String> translations)
return a default set of translation between field names and text labels.
|
<CB extends ContentBuilder> |
addUpdateNotes(CB cb,
AppUser person)
add Notes to be included in a signup/update form.
|
void |
anonymise(AppUser target) |
protected abstract java.lang.String |
format(X key) |
protected abstract ParseAbstractInput<java.lang.String> |
getInput() |
java.lang.String |
getNormalisedPublicKey(AppUser person) |
java.lang.String |
getPublicKey(AppUser person) |
protected java.lang.Class<? super PublicKeyComposite> |
getType()
Returns the type the composite should be registered under.
|
boolean |
hasPublicKey(AppUser person) |
protected boolean |
isOptional() |
protected abstract X |
load(java.lang.String value) |
TableSpecification |
modifyDefaultTableSpecification(TableSpecification spec,
java.lang.String table)
Modify the
TableSpecification of the target factory. |
protected java.lang.String |
normalise(java.lang.String old) |
void |
postUpdate(AppUser o,
Form f,
java.util.Map<java.lang.String,java.lang.Object> orig,
boolean changed)
perform side effects after a formupdate
|
void |
setPublickey(AppUser person,
java.lang.String key) |
void |
setTemplateContent(TemplateFile template,
java.lang.String prefix,
AppUser target)
Set parameters in a template.
|
boolean |
usePublicKey() |
addDefaults, addFieldHelp, addSuppress, customiseForm, customiseUpdateForm, getContext, getFactory, getLogger, getRecord, getRepository, preRegister, release, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEraseFields
addFieldConstraints, addFormFields
public static final java.lang.String NORMALISED_PUBLIC_KEY_META_ATTR
public static final java.lang.String PUBLIC_KEY_META_ATTR
public static final Feature SSH_REQUIRE_RSA_FEATURE
public static final java.lang.String PUBLIC_KEY
public PublicKeyComposite(AppUserFactory fac)
protected java.lang.Class<? super PublicKeyComposite> getType()
Composite
getType
in class Composite<AppUser,PublicKeyComposite>
public java.util.Map<java.lang.String,java.lang.String> addTranslations(java.util.Map<java.lang.String,java.lang.String> translations)
TableStructureContributer
addTranslations
in interface TableStructureContributer<AppUser>
addTranslations
in class Composite<AppUser,PublicKeyComposite>
Map
protected java.lang.String normalise(java.lang.String old) throws java.lang.Exception
java.lang.Exception
protected abstract X load(java.lang.String value) throws java.lang.Exception
java.lang.Exception
protected abstract java.lang.String format(X key) throws java.lang.Exception
java.lang.Exception
protected abstract ParseAbstractInput<java.lang.String> getInput()
public java.util.Map<java.lang.String,Selector> addSelectors(java.util.Map<java.lang.String,Selector> selectors)
TableStructureContributer
addSelectors
in interface TableStructureContributer<AppUser>
addSelectors
in class Composite<AppUser,PublicKeyComposite>
Map
of modified selectors/inputspublic void postUpdate(AppUser o, Form f, java.util.Map<java.lang.String,java.lang.Object> orig, boolean changed) throws DataException
TableStructureContributer
postUpdate
in interface TableStructureContributer<AppUser>
postUpdate
in class Composite<AppUser,PublicKeyComposite>
DataException
public TableSpecification modifyDefaultTableSpecification(TableSpecification spec, java.lang.String table)
TableStructureContributer
TableSpecification
of the target factory.modifyDefaultTableSpecification
in interface TableStructureContributer<AppUser>
modifyDefaultTableSpecification
in class Composite<AppUser,PublicKeyComposite>
public java.util.Set<java.lang.String> addOptional(java.util.Set<java.lang.String> optional)
TableStructureContributer
addOptional
in interface TableStructureContributer<AppUser>
addOptional
in class Composite<AppUser,PublicKeyComposite>
Set
protected boolean isOptional()
public boolean usePublicKey()
public <CB extends ContentBuilder> CB addUpdateNotes(CB cb, AppUser person)
UpdateNoteProvider
addUpdateNotes
in interface UpdateNoteProvider<AppUser>
public java.lang.String getPublicKey(AppUser person)
public java.lang.String getNormalisedPublicKey(AppUser person) throws java.lang.Exception
java.lang.Exception
public void setPublickey(AppUser person, java.lang.String key)
public boolean hasPublicKey(AppUser person)
public void anonymise(AppUser target)
anonymise
in interface AnonymisingComposite<AppUser>
public void addAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes, AppUser target)
SummaryContributer
Table
so the data should be of a
type that can be displayed by Table
s
The keys should be display text.addAttributes
in interface SummaryContributer<AppUser>
public void addMetaData(java.util.Map<java.lang.String,java.lang.Object> attributes, AppUser person)
DataContributor
addMetaData
in interface DataContributor<AppUser>
public void setTemplateContent(TemplateFile template, java.lang.String prefix, AppUser target)
TemplateContributor
setTemplateContent
in interface TemplateContributor<AppUser>
template
- TemplateFile
to add content to.prefix
- String prefix to be pre-pended to property/region namestarget
- Object to take data frompublic void addToHistorySpecification(TableSpecification spec)
HistoryFieldContributor
addToHistorySpecification
in interface HistoryFieldContributor