@Override public List<String> categories() { return metadata.getCategories(); }
@Override public List<DiscussionRecord> discussion() { return metadata.getDiscussion(); }
public Metadata build() { return new Metadata( path, checkinComment, lastContributor, creator, lastModified, dateCreated, subject, type, externalRelation, externalSource, description, categories, discussion, version ); }
readOnlyDate( metadata.getLastModified() ) ); addAttribute( MetadataConstants.INSTANCE.ModifiedByMetaData(), readOnlyText( metadata.getLastContributor() ) ); addAttribute( MetadataConstants.INSTANCE.NoteMetaData(), readOnlyText( metadata.getCheckinComment() ) ); readOnlyDate( metadata.getDateCreated() ) ); readOnlyText( metadata.getCreator() ) ); readOnlyText( getClientTypeRegistry().resolve( metadata.getPath() ).getShortName() ) ); addAttribute( "URI:", readOnlyText( metadata.getPath().toURI() ) );
/** * Appy the change (selected path to be added). */ public void addToCategory( final String category ) { data.addCategory( category ); resetBox(); }
private void loadData( final Metadata metadata ) { text.setText( metadata.getDescription() ); text.addChangeHandler( new ChangeHandler() { public void onChange( ChangeEvent event ) { metadata.setDescription( text.getText() ); makeDirty(); } } ); if ( metadata.getDescription() == null || "".equals( metadata.getDescription() ) ) { text.setText( MetadataConstants.INSTANCE.documentationDefault() ); } } }
public void onClick( final ClickEvent sender ) { if ( Window.confirm( MetadataConstants.INSTANCE.EraseAllCommentsWarning() ) ) { metadata.eraseDiscussion(); makeDirty(); updateCommentList(); } } } );
public void callback( final Long timestamp ) { showNewCommentButton(); metadata.addDiscussion( new DiscussionRecord( timestamp, identity.getName(), text ) ); makeDirty(); updateCommentList(); } }, AppConfigService.class ).getTimestamp();
private void updateCommentList() { commentList.clear(); for ( final DiscussionRecord dr : metadata.getDiscussion() ) { appendComment( dr ); } }
private void loadData( final FlexTable list ) { for ( int i = 0; i < data.getCategories().size(); i++ ) { final int idx = i; final String categoryPath = data.getCategories().get( idx ); list.setWidget( i, 0, new SmallLabel( categoryPath ) ); if ( !readOnly ) { final Image del = Images.INSTANCE.Trash(); del.setTitle( MetadataConstants.INSTANCE.RemoveThisCategory() ); del.addClickHandler( new ClickHandler() { public void onClick( final ClickEvent event ) { removeCategory( idx ); } } ); list.setWidget( i, 1, del ); } } }